POST/v1/device-groups/{id}/devices/{deviceId}Add a device to a device group

Add a device to a group description
headerAuthorizationAuthentication token (bearer token or API key).

Response

status200All ok
status400Device must be registered/Group and device do not belong to the same account
status401Invalid authentication token
status403Insufficient rights
status404Device group/device not found
{}

Example: Add a device to a group for POST request to /v1/device-groups/{deviceGroupId}/devices/{deviceId}

POST/v1/device-groups/35/devices/23

headerAuthorizationBearer d5e071a9-e148-4c5f-99b5-2bdd0a2e3db6

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=()
true

Example: Fail to add a device from another organization to a group for POST request to /v1/device-groups/{deviceGroupId}/devices/{deviceId}

POST/v1/device-groups/38/devices/26

headerAuthorizationBearer fb477275-a591-4843-ac4d-019c2b76ede6

Response

status400
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": "Group and device do not belong to the same account",
"code": "groupAndDeviceShouldBeInTheSameError",
"errorMessage": "Group and device do not belong to the same account",
"errorCode": "groupAndDeviceShouldBeInTheSameError"
}