GROUPS
Use the groups API to:
- Get all groups
- Get a single group
- Add a new group
- Edit an existing group
- Delete a group
HTTP Headers
The HTTP headers used to access all RTLS APIs are listed below. Before submitting requests to the Groups API, set the following headers:
| Header Name | Example Value | Description |
|---|---|---|
| X-User-Email | admin@example.com | Email of the user performing HTTP requests to the API. |
| X-User-Token | Drv3yU7PdyqUMtr89erZ | Token allowing user access to the API. |
| X-User-Project | OfOgUA4kTs2HrmYYlFw6Jg | Project identifier. Value of the project.uid field. |
Set header X-USER-EMAIL
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email address returned in the response, set:
X-USER-EMAIL = data.email
Set header X-USER-TOKEN
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the authentication token returned in the response, set:
X-USER-TOKEN = data.token
Set header X-USER-PROJECT
Send a request to get projects using GET api/projects/ described in the Projects API. You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in the response, set:
X-USER-PROJECT = projects[i].uid
Groups Endpoints
| Functionality | Method | Endpoint |
|---|---|---|
| get groups | GET | api/groups |
| get single group | GET | api/groups/{uid} |
| add group | POST | api/groups |
| update group | PUT | api/groups/{uid} |
| delete group | DELETE | api/groups/{uid} |
Endpoints
Get groups
GET api/groups
Get all existing groups in the projects to which you have access. This does not include groups that have been deleted.
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier of the group. |
| name | The group name in each element of the groups array. |
| user_params | The user-defined parameters for the group. |
| user_params.color | The group color. |
| tag_config | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg | The object with PWS configuration. |
| tag_config.t2t_cfg.role | The PWS role:
|
| tag_config.t2t_cfg.alarm_back | The attribute for specifying that a tag must report back to the announcer. Can only be specified for role of monitor |
| tag_config.t2t_cfg.safe_distance | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | |
| tag_config.t2t_cfg.alert_distance | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| tag_config.t2t_cfg.angle | The attribute for specifying that tag must act in that view angle in degrees. Can only be specified for the role of "announcer". Values are from 10-180 degrees, and can be incremented by 10 degree increments up to 180 degrees. After 180 the next value is 360 degrees. |
| color | The group color in format (#ffffff). |
| custom_info | Information entered in the custom_info field of the request will display in this field. |
| project_uid | The unique identifier of the project to which the group belongs. |
| company_uid | The unique identifier of the company to which the group belongs. |
| created_at | The time when the group was created, in UTC. |
| updated_at | The time when the group was last updated, in UTC. |
| removed_at | The time stamp when the group was deleted, in UTC. |
| sensor_config | Configuration of sensors. |
| sensor_config.sensors | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
Example Response
{
"groups": [
{
"uid": "jkjlzlahTKiAr458lb27FQ",
"name": "Employee",
"user_params": {
"customParams": "",
"color": "#0080ff"
},
"project_uid": "9qMmFuDLPYJczE4Jq2QIWR",
"company_uid": "ld7l94MLD5UeIXWJoi9SQp",
"created_at": "2018-03-19T10:27:11.211Z",
"updated_at": "2018-04-12T17:54:08.162Z",
"removed_at": "9999-12-31T23:59:59.000Z",
"sensor_config": {
"sensors": [{"type": "UART_0", "enabled": true, "reliable": false}]
},
"custom_info": "some text",
"color": "#0080ff",
"tag_config": {
"t2t_cfg": {
"role": "monitor",
"alarm_back": true,
"pin": "OFF",
"delay": 1
}
}
},
{
"uid": "c5BLDWvxSUuBH5nEYNmG0g",
"name": "GR2",
"user_params": {
"customParams": "",
"color": "#0d039b"
},
"custom_info": "",
"color": "#0d039b",
"project_uid": "9qMmFuDLPYJczE4Jq2QIWR",
"company_uid": "ld7l94MLD5UeIXWJoi9SQp",
"created_at": "2018-03-23T02:14:53.581Z",
"updated_at": "2018-03-29T08:41:12.712Z",
"removed_at": "9999-12-31T23:59:59.000Z",
"sensor_config": {
"sensors": []
}
}
]
}
Get single group
GET api/groups/{uid}
Get a group with a specified group UID. To retrieve a group UID, see get groups.
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier of the group. |
| name | The group name in each element of the groups array. |
| user_params | The user-defined parameters for the group. |
| user_params.color | The group color. |
| tag_config | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg | The object with PWS configuration. |
| tag_config.t2t_cfg.role | The PWS role:
|
| tag_config.t2t_cfg.alarm_back | The attribute for specifying that a tag must report back to the announcer. Can only be specified for role of monitor |
| tag_config.t2t_cfg.safe_distance | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | |
| tag_config.t2t_cfg.alert_distance | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| tag_config.t2t_cfg.angle | The attribute for specifying that tag must act in that view angle in degrees. Can only be specified for the role of "announcer". Values are from 10-180 degrees, and can be incremented by 10 degree increments up to 180 degrees. After 180 the next value is 360 degrees. |
| custom_info | Information entered in the custom_info field of the request will display in this field. |
| color | The group color in format (#ffffff). |
| project_uid | The unique identifier of the project to which the group belongs. |
| company_uid | The unique identifier of the company to which the group belongs. |
| created_at | The time when the group was created, in UTC. |
| updated_at | The time when the group was last updated, in UTC. |
| removed_at | The time stamp when the group was deleted, in UTC. |
| sensor_config | Configuration of sensors. |
| sensor_config.sensors | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
Example Response
{
"groups": [
{
"uid": "cDj7bRMbT02gepFCL7s7KA",
"name": "StacyGr",
"user_params": {
"customParams": "",
"color": "#108c1f"
},
"project_uid": "9qMmFuDLPYJczE4Jq2QIWR",
"company_uid": "ld7l94MLD5UeIXWJoi9SQp",
"created_at": "2018-04-12T08:54:15.727Z",
"updated_at": "2018-04-12T08:54:15.727Z",
"removed_at": "9999-12-31T23:59:59.000Z",
"sensor_config": {
"sensors": []
},
"custom_info": "",
"tag_config": {
"t2t_cfg": {
"role": "monitor",
"alarm_back": true,
"pin": "OFF",
"delay": 1
}
}
}
]
}
Add group
POST api/groups
Add a new group.
Request Fields
| Field | Required | Type | Description |
|---|---|---|---|
| name | required | string | The group name in each element of the groups array. |
| user_params | optional | object | The user-defined parameters for the group. |
| tag_config | optional | object | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg.safe_distance | optional | number | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | optional | number | |
| tag_config.t2t_cfg.alert_distance | optional | number | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | optional | string | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | optional | number | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| sensor_config | optional | object | Configuration of sensors. |
| sensor_config.sensors | optional | array | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
| sensor_config.sensors[].type | required | string | The type of sensor configuration. Available configuration:
|
| sensor_config.sensors[].reliable | required | boolean | All sensor types may use a reliable delivery mechanism. This field is optional; when not present the default value is false. |
| sensor_config.sensors[].enabled | required | boolean | Used for enabling/disabling UART_0 sensor configuration:
|
| custom_info | optional | string(120 characters) | Optionally, enter up to 120 characters of custom information for the group. |
| color | optional | string | The group color in format (#ffffff). |
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier of the group. |
| name | The group name in each element of the groups array. |
| user_params | The user-defined parameters for the group. |
| tag_config | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg | The object with PWS configuration. |
| tag_config.t2t_cfg.role | The PWS role:
|
| tag_config.t2t_cfg.alarm_back | The attribute for specifying that a tag must report back to the announcer. Can only be specified for role of monitor |
| tag_config.t2t_cfg.safe_distance | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | |
| tag_config.t2t_cfg.alert_distance | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| tag_config.t2t_cfg.angle | The attribute for specifying that tag must act in that view angle in degrees. Can only be specified for the role of "announcer". Values are from 10-180 degrees, and can be incremented by 10 degree increments up to 180 degrees. After 180 the next value is 360 degrees. |
| custom_info | Information entered in the custom_info field of the request will display in this field. |
| color | The group color in format (#ffffff). |
| project_uid | The unique identifier of the project to which the group belongs. |
| company_uid | The unique identifier of the company to which the group belongs. |
| created_at | The time when the group was created, in UTC. |
| updated_at | The time when the group was last updated, in UTC. |
| removed_at | The time stamp when the group was deleted, in UTC. |
| sensor_config | Configuration of sensors. |
| sensor_config.sensors | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
Example Request
{
"name": "Group1",
"user_params": {
"color": "#00ff9f"
},
"tag_config": {
"t2t_cfg": {
"role": "monitor",
"alarm_back": true,
"pin": "OFF",
"delay": 1
}
},
"custom_info": "text",
"color": "#00ff9f",
"sensor_config": {
"sensors": [
{"type": "UART_0", "enabled": true, "reliable": false}
]
}
}
Example Response
{
"uid": "H-wd7xiASvCLO4Vey0Y9RQ",
"name": "Group1",
"user_params": {
"color": "#00ff9f"
},
"project_uid": "9qMmFuDLPYJczE4Jq2QIWR",
"company_uid": "ld7l94MLD5UeIXWJoi9SQp",
"created_at": "2018-06-27T16:59:17.474Z",
"updated_at": "2018-06-27T16:59:17.474Z",
"removed_at": "9999-12-31T23:59:59.000Z",
"custom_info": "text",
"color": "#00ff9f",
"sensor_config": {
"sensors": [
{"type": "UART_0", "enabled": true, "reliable": false}
]
}
}
Errors
| Error Status | Error Type | Error Body | Error Description |
|---|---|---|---|
| 422 | Unprocessable Entity | {"message":"Group with name ... exists in project ...", "name":"UnprocessableEntityError"} | A group with the specified name exists. |
Update group
PUT api/groups/{uid}
Update a group with a specified group UID. To retrieve a group UID, see get groups.
Request fields
| Field | Required | Type | Description |
|---|---|---|---|
| name | required | string | The group name in each element of the groups array. |
| user_params | optional | object | The user-defined parameters for the group. |
| tag_config | optional | object | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg.safe_distance | optional | number | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | optional | number | |
| tag_config.t2t_cfg.alert_distance | optional | number | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | optional | string | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | optional | number | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| sensor_config | optional | object | Configuration of sensors. |
| sensor_config.sensors | optional | array | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
| sensor_config.sensors[].type | required | string | The type of sensor configuration. Available configuration:
|
| sensor_config.sensors[].reliable | required | boolean | All sensor types may use a reliable delivery mechanism. This field is optional; when not present the default value is false. |
| sensor_config.sensors[].enabled | required | boolean | Used for enabling/disabling UART_0 sensor configuration:
|
| custom_info | optional | string(120 characters) | Optionally, enter up to 128 characters of custom information for the group. |
| color | optional | string | The group color in format (#ffffff). |
Response Fields
| Field | Description |
|---|---|
| uid | The unique identifier of the group. |
| name | The group name in each element of the groups array. |
| user_params | The user-defined parameters for the group. |
| tag_config | Object with the trackable-specific configuration. Deprecated and will be removed in 2021Q1. |
| tag_config.t2t_cfg | The object with PWS configuration. |
| tag_config.t2t_cfg.role | The PWS role:
|
| tag_config.t2t_cfg.alarm_back | The attribute for specifying that a tag must report back to the announcer. Can only be specified for role of monitor |
| tag_config.t2t_cfg.safe_distance | The 360 degree radius around a tag that is not in motion. Can be set from 0-25 meters in increments of .5 meters. |
| tag_config.t2t_cfg.distance | |
| tag_config.t2t_cfg.alert_distance | Specifies a particular tag must act from the specified alert distance. Can only be used with the role of "announcer". Values can be set from 0-25000mm with increments of 500mm. Warning distance = highest severity level. Alert distance = less severity than the Warning distance. |
| tag_config.t2t_cfg.pin | The attribute for specifying the LED indicator type. Can only be used with the role of "announcer" and "monitor". Values are "OFF", "SOLID", "PULSE". |
| tag_config.t2t_cfg.delay | Allows tags to be within the alert distance of each other without triggering an alarm. Once the time has been exceeded an alarm will be triggered. Can only be used with the role of "announcer" and "monitor". Values can be set from 0 - 15 seconds. |
| tag_config.t2t_cfg.angle | The attribute for specifying that tag must act in that view angle in degrees. Can only be specified for the role of "announcer". Values are from 10-180 degrees, and can be incremented by 10 degree increments up to 180 degrees. After 180 the next value is 360 degrees. |
| custom_info | Information entered in the custom_info field of the request will display in this field. |
| color | The group color in format (#ffffff). |
| project_uid | The unique identifier of the project to which the group belongs. |
| company_uid | The unique identifier of the company to which the group belongs. |
| created_at | The time when the group was created, in UTC. |
| updated_at | The time when the group was last updated, in UTC. |
| removed_at | The time stamp when the group was deleted, in UTC. |
| sensor_config | Configuration of sensors. |
| sensor_config.sensors | Used for sensor interface configuration on the server. NOTE:Currently only UART is supported. |
Example Request
Using PUT api/groups/H-wd7xiASvCLO4Vey0Y9RQ:
{
"name": "Group2",
"custom_info": "text",
"color": "#00ff9f",
"user_params": {
"color": "#00ff9f"
}
}
Example Response
{
"uid": "H-wd7xiASvCLO4Vey0Y9RQ",
"name": "Group2",
"user_params": {
"color": "#00ff9f"
},
"custom_info": "text",
"color": "#00ff9f",
"project_uid": "9qMmFuDLPYJczE4Jq2QIWR",
"company_uid": "ld7l94MLD5UeIXWJoi9SQp",
"created_at": "2018-06-27T16:59:17.474Z",
"updated_at": "2018-06-27T16:59:17.474Z",
"removed_at": "9999-12-31T23:59:59.000Z",
"sensor_config": null
}
Errors
| Error Status | Error Type | Error Body | Error Description |
|---|---|---|---|
| 404 | Not Found | {"message": "Group ... not found", "name": "NotFoundError"} | The group UID could not be found in the database. |
| 422 | Unprocessable Entity | {"message":"Group with name ... exists in project ...", "name":"UnprocessableEntityError"} | A group with the specified name already exists. |
| 422 | Unprocessable Entity | {"message":"This group is assigned to trackables with existing PWS configurations.", "name":"UnprocessableEntityError"} | A group is assigned to trackables with existing PWS configurations. |
Delete group
DELETE api/groups/{uid}
Delete a group with a specified group UID. To retrieve a group UID, see get groups.
Successful request returns a status of 204.
Errors
| Error Status | Error Type | Error Body | Error Description |
|---|---|---|---|
| 404 | Not found | {"message": "Group ... not found", "name": "NotFoundError"} | The group UID could not be found in the database. |