Table of Contents

Create unit

To create a new unit, use the command core/create_unit:

svc=core/create_unit&params={"creatorId":<long>,
			     "name":<text>,
			     "hwTypeId":<long>,
			     "dataFlags":<uint>}

:!: You can find an example of this request in the sample Creating, editing and deleting items.

Parameters

Name Description
creatorId ID of a user who will be assigned a creator for a new unit
name new unit name (at least 4 characters)
hwTypeId device (hardware) ID
dataFlags data flags for the response (see Data format: Units)

Response

{
	"item":{	/* unit created */
		...	
	},
	"flags":<uint>	/* applied data flags */
}

You can find the format of “item” in the chapter Data format: Units.

Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam