In this article
Get Group Devices
Get Devices Linked to a Group
URL
https://{{HOST}}/security/group/devices?groupId={groupId}&v={version}
Method
GET
Required IMS Scopes
- securityapi_all
Versions Supported
- 2.0 (Default)
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the api to use | /group?v=2.0 | number |
| groupId required |
The ID of the group. | /group?groupId=testGroup | string |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | IMS access token |
Example
Request
curl -X GET
'https://{{HOST}}/security/group/devices?groupId=testGroup&v=2.0'
-H 'Authorization: Bearer {access_token}'
Response
[{
"properties": {
"DeviceID": "myDeviceId3",
"HubEnabledState": null,
"CreatedTime": "2017-02-22T20:23:04.4042226Z",
"DeviceState": "normal",
"UpdatedTime": "2017-02-22T20:23:04.3660203Z"
},
"commands": [{
"name": "bar",
"status": null,
"parameters": null
}],
"telemetries": null,
"shadow": {
"revision": 0,
"schemaVersion": 1,
"deviceType": 0
},
"id": "myDeviceId3",
"subject": null
}]
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| Object Name | Description | object definition |
| properties | Description | object definition |
| commands | Description | object definition |
| telemetries | Description | object definition |
| shadow | Description | object definition |
| id | Description | object definition |
| subject | Description | object definition |