Group
A Group is essentially a collection of units.
URL Structure is:
https://api.trackunit.com/public/Group
GetGroup
Will list parameters on a specified group.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id | String | N/A | If supplied, only the specific group is returned. |
unitId | String | N/A | If supplied, only groups which this unit belongs to are returned. |
Errors
Error Code | Description |
---|---|
groupNotFound | Group with supplied “Id” was not found |
Columns
Refer to the following table for description of columns:
Name | Data type | Unit of measurement | Nullability | Note |
---|---|---|---|---|
id | String | N/A | FALSE | Unique identifier. |
name | String | N/A | FALSE | Name of the group. |
Request (example)
{
"id": "8818"
}
Response
{
"list":[
{
"id": "8818",
"name": "Kramer maskiner"
}
]
}
CreateGroup
Will create a new group.
Parameters
Name | Data type | Unit of measurement | Note |
---|---|---|---|
name | String | N/A | Name of group. |
units | String[] | N/A | List of units to add to group. |
Request (example)
{
"name": "Vehicles, GE",
"units": "87282,87283"
}
Response
{}
UpdateGroup
Will update parameters on any of the existing groups.
Parameters
Naame | Data type | Unit of measurement | Description |
---|---|---|---|
id * | String | Unique identifier. | |
name | String | Name of the group. | |
addUnits | String[] | Units to add to group. | |
removeUnits | String[] | Units to remove from group. Only allowed when Clear is “false” (or omitted). | |
clear | Bool | If specified (and equal to “true”), all units from the group will be removed. Units from “AddUnits” are then added. |
Request (example)
{
"id": "8819",
"name": "Vehicles, SE",
"removeUnits": "72916"
}
Response
{}
DeleteGroup
Will delete an existing group.
Parameters
Parameter | Data type | Note |
---|---|---|
id * | String | Id of the group |
Request (example)
{
"id": "8819"
}
Response
{}
Updated less than a minute ago