Searching:
0 results foundGroups/Post
Description
To create a new Group in Axonize.
See the following for request and response details ‒
See Also
Request ‒ Groups/Post
Property | Type | Description | Mandatory |
info | String | Free text describing this group. | |
active | Boolean | Specifies whether the Group is active, meaning that it can be used – True/False. | |
diagram | String | An internal link to a map resource file that can be used in the Axonize Portal instead of Google Maps. | |
parentId | String | Specifies the parent Group of this Group. This property enables you to define sub-Groups. | |
name | String | The Group’s name. | Y |
users or devices | Array of Objects (User Node or Device Nodes) | A list of the unique identifiers of the entities in the Group. For example, the identifiers of Users or Devices.
“userNode”: [ { “id”: “string”, “name”: “string” }
“deviceNode”: [ { “id”: “string”, “name”: “string” } |
|
defaultLocation | Object | The GPS coordinates that were defined when the entity was created or its definition was modified. This enables the entity to be represented on a map.
This location is automatically assigned to all entities in the group to which no specific location was defined. By default, Devices are each assigned this default location, meaning the location of the Group to which they belong. However, if the GPS userDefinedLocation property is defined for a specific Device, then that location overrides this one. |
|
defaultLocation/address | String | The address of the location. For example –
“address”: “string”, |
|
defaultLocation/lat | Double | The latitude coordinate. For example –
“lat”: 0, |
|
defaultLocation/lng | Double | The longitude coordinate. For example –
“lng”: 0, |
|
defaultLocation/updateDate | DateTimeOffset | The timestamp when the location was last updated. For example –
“updateDate”: “2018-02-21T16:06:34.725Z” |
|
ancestors | Array | Lists the IDs of the ancestor Groups (parents, parents of parents and so on) of this Group, in no particular order. |
Example JSON Groups/Post Request
curl -X POST \
https://api.stg.axonize.com/odata/groups/ \
-H ‘Authorization: [YourToken]’ \
-H ‘Content-Type: application/json’ \
-H ‘appId: [YourAppID]’ \
-d ‘{
“name”:”admin”
}
‘
Response ‒ Groups/Post
All the same properties in the request are returned in the response. In addition, the response that is returned also contains the following properties –
Property | Type | Description |
id | String | A unique identifier automatically generated for this Group entry by Axonize. |
appId | String | A unique Application identifier that is automatically generated by Axonize. This is the identifier of the Application to which this Group is assigned.
This identifier is automatically generated by Axonize when the Applications/Post endpoint is used. |
createDate, createUser, updateDate, updateUser |
See Common Response Properties. |
Example JSON Groups/Post Response
Status 201 – Created
{
“@odata.context”: “https://stg-axonizeapi-axonize.stg-ase-axonize.p.azurewebsites.net/odata/$metadata#Groups/$entity”,
“info”: “south-west-depot”,
“active”: true,
“diagram”: null,
“parentId”: null,
“name”: “south-west-depot”,
“id”: “585b9db666701d07a8381234”,
“appId”: “801A048A-9F23-429F-BF0D-B6D35B22771E”,
“createDate”: “0001-01-01T00:00:00Z”,
“createUser”: null,
“updateDate”: “0001-01-01T00:00:00Z”,
“updateUser”: null,
“users”: [],
“devices”: [],
“defaultLocation”: null,
“ancestors”: []
}