PUT/v1/devices/{device-id}/nameSet a device name

Sets the name of a device. Organization-SuperUsers and Device-administrators can set updateForEverybody to 'true'. Everybody else should call the method with 'false', and leaving it empty will assume 'true' for backwards compatibility
headerAuthorizationAuthentication token (bearer token or API key).
{
"name" : String,
"updateForEverybody" : Boolean
}

Response

status200All ok
status401Invalid authentication token
status403Insufficient rights
status404Device not found
{}

Example: Set a global device name as an Account

PUT/v1/devices/1/name

headerAuthorizationBearer e02d13d1-a0ba-4f54-b2f6-3c4b175d7454
{
"name": "Front door",
"updateForEverybody": true
}

Response

status200
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
{}

Example: Set a personal device name as an Account

PUT/v1/devices/1/name

headerAuthorizationBearer 873f91f2-bd07-4e97-9fc7-6d035406f2c7
{
"name": "Front door",
"updateForEverybody": false
}

Response

status200
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
{}

Example: Fail to set a business device name as an Account

PUT/v1/devices/3/name

headerAuthorizationBearer a5e98092-8780-4d54-a19e-6ee0dbbc08dc
{
"name": "Front door",
"updateForEverybody": true
}

Response

status403
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
{
"message": "The request was a legal request, but the server is refusing to respond to it.",
"errorMessage": "The request was a legal request, but the server is refusing to respond to it."
}