Unit groups

Depending on set flags format of response can differ.

This chapter describes flags that can be applied to unit groups and parts of resulting JSON which they are responsible for. If you specify several flags, then parts will be gathered into one JSON.

Unit group flags:

Value Description
0x00000001 base flag
0x00000002 custom properties
0x00000004 billing properties
0x00000008 info about units of a group
0x00000010 custom fields
0x00000020 GUID
0x00001000 unit group image

General properties

Flag - 0x00000001

{
	"nm":<text>,	/* name */
	"cls":<uint>,	/* superclass ID: "avl_unit_group" */
	"id":<uint>	/* group ID */
}

Custom properties

Flag - 0x00000002

You can store any data you need in custom properties.

{
	"prp":{		/* custom properties */
		<text>:<text>,	/* name: value */
		...
	},
	"pup":{		/* private and public properties */
		<text>:<text>,	/* name: value */
		...
	}
}

Billing

Flag - 0x00000004

{
	"crt":<uint>,	/* creator ID */
	"bact":<uint>	/* account ID */
}

Units of a group

Flag - 0x00000008

{
	"u":[<long>],		/* array of IDs of units, included into group */
	"acl_ppg":<uint>	/* access rights on group are applied to its units: 0 - no, 1 - yes */
}

Custom fields

Flag - 0x00000010

{
	"flds":{				
		<text>:{			/* sequence number */
			"id":<uint>,		/* ID  */
			"nm":<text>,		/* name */
			"vl":<text>		/* value */
		},
		...
	},
	"flds_max":<long>		/* maximal count of custom fields (-1 - unlimited) */
}

GUID

Flag - 0x00000020

{
	"gd":<text>	/* GUID  of unit group */
}

Unit group image

Flag - 0x00001000

{
	"ugi":<uint>	/* image changes counter */
}
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam