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/73/name

headerAuthorizationBearer ed0cd8fe-856b-4590-9298-1449f5c352da
{
"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/77/name

headerAuthorizationBearer 112ab987-1a7a-4984-a6ee-e815c58d3e23
{
"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/83/name

headerAuthorizationBearer 7cb601ad-f3af-4bc7-b07b-ed15ad9711da
{
"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."
}