Favicon

You are here: Home > API Reference > Smart Attributes > Update a smart attribute

PUT /organizations/:organizationId/smart-attributes/:smartAttributeId

Required Permission: mdm.global.smartAttribute.update

Applies partial updates to an existing smart attribute

PUT
/v1/organizations/:organizationId/smart-attributes/:smartAttributeId
Copy to clipboard

Update a smart attribute

Required Permission: mdm.global.smartAttribute.update

Applies partial updates to an existing smart attribute

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
smartAttributeId string
required
Match pattern: ^[a-fA-F0-9]{24}$
Body Params application/json
segmentId number optional
name string required
≤ 256 characters
description string optional
≤ 500 characters
output object required
type string required
string number boolean date
input object required
type string required
script
value object required
admDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
aosDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
emmDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
winDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
source string required
device
field object optional
label string optional
≤ 256 characters
description string optional
≤ 500 characters
placeholder string optional
≤ 256 characters
{
    "segmentId": 0,
    "name": "string",
    "description": "string",
    "output": {
        "type": "string"
    },
    "input": {
        "type": "constant",
        "value": {
            "admDevice": {
                "value": "string"
            },
            "aosDevice": {
                "value": "string"
            },
            "emmDevice": {
                "value": "string"
            },
            "winDevice": {
                "value": "string"
            }
        },
        "source": "constant"
    }
}

Responses

200 Response application/json
status boolean required
data object required
id string required
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Match pattern: ^[a-fA-F0-9]{24}$
segmentId number optional
name string required
≤ 256 characters
description string optional
≤ 500 characters
output object required
type string required
string number boolean date
input object required
type string required
script
value object required
admDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
aosDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
emmDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
winDevice object optional
value string required
≤ 1000 characters
runner string optional
sh ps1
source string required
device
field object optional
label string optional
≤ 256 characters
description string optional
≤ 500 characters
placeholder string optional
≤ 256 characters
loopTime number required
createdAt string required
updatedAt string required
version number optional
counts object optional
android object required
smartAttributeAssignments integer required
≥ 0 · ≤ 9007199254740991
smartAttributeAssignmentsEnforced integer required
≥ 0 · ≤ 9007199254740991
apple object required
smartAttributeAssignments integer required
≥ 0 · ≤ 9007199254740991
smartAttributeAssignmentsEnforced integer required
≥ 0 · ≤ 9007199254740991
windows object required
smartAttributeAssignments integer required
≥ 0 · ≤ 9007199254740991
smartAttributeAssignmentsEnforced integer required
≥ 0 · ≤ 9007199254740991
{
    "status": true,
    "data": {
        "id": "string",
        "organizationId": "string",
        "segmentId": 0,
        "name": "string",
        "description": "string",
        "output": {
            "type": "string"
        },
        "input": {
            "type": "constant",
            "value": {
                "admDevice": {
                    "value": "string"
                },
                "aosDevice": {
                    "value": "string"
                },
                "emmDevice": {
                    "value": "string"
                },
                "winDevice": {
                    "value": "string"
                }
            },
            "source": "constant"
        },
        "createdAt": "string",
        "updatedAt": "string",
        "version": 0,
        "counts": {
            "android": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            },
            "apple": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            },
            "windows": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            }
        }
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5221
message string optional
Unable to process smart attribute request
{
    "status": false,
    "error": {
        "code": 5221,
        "message": "Unable to process smart attribute request"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}