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 IoT Platform 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”
}