Skip to main content
POST
Create a virtual device
Only name is required. The server generates the id, sets the device as virtual, and starts it with no points. A body _id, building, originType or pointIds is ignored. Sending the same name again creates a second device. The response has these members: id, name, type (id and name), locatedIn (id and name), area (id and name), location, pointsCount, createdAt and updatedAt. type, locatedIn, area and location are empty when you did not send them. area is the level of the space in locatedInSpaceId.
  • name is trimmed and can be up to 255 characters.
  • typeId is the device type. Take it from type._id of an existing device. Up to 128 characters.
  • locatedInSpaceId is the id of a space in this building. Up to 128 characters.
Add points to the device with Copy points to devices or Attach points to a virtual device.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Path Parameters

buildingId
string
required

Building identifier from List buildings.

Body

application/json
name
string
required
Required string length: 1 - 255
Pattern: (?s)(?=.*[^\p{C}\p{Z}])[\P{Cc}\n\r\t]*
typeId
string
Maximum string length: 128
Pattern: [^\p{C}\p{Z}]{1,128}
locatedInSpaceId
string
Maximum string length: 128
Pattern: [^\p{C}\p{Z}]{1,128}
location
string
Maximum string length: 255
Pattern: (?s)(?=.*[^\p{C}\p{Z}])[\P{Cc}\n\r\t]*

Response

The created virtual device.