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/1/devices/1

headerAuthorizationBearer 3c7b8ad2-5936-440f-8a29-62a0b4ab815a

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/1/devices/2

headerAuthorizationBearer efd2a410-bb2c-458c-b4c6-35d6bac43f6a

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"
}