Aerovy Platform logo

Create a thing-type definition

POSThttps://spectra.api.aerovy.com/v2/definitions/thing-types

Creates a new thing-type definition (its first version). Requires an API key with the write action.

Loading code example
Loading code example

Authorizations

apiKeystringheaderrequired

API key passed in the header.

Body

The thing type to create.

displayNamestringrequired

Human-readable name for the thing type.

Length: >= 1, <= 100
descriptionnull | string

Optional description of the thing type.

Length: >= 0, <= 500
defaultImageUrlnull | string<uri>

Optional URL of a default image for devices of this type.

Length: >= 0, <= 2048
defaultIconUrlnull | string<uri>

Optional URL of a default icon for devices of this type.

Length: >= 0, <= 2048
metricIdsarray<string>required

The metric ids that make up this thing type's first version.

modelMetadataany
tagsnull | array

Optional free-form tags.

propertyDefinitionsnull | array

Optional property schema (typed, predefined keys) for devices of this type.

Response

application/json

Created; the Location header points to the new thing type.

thingTypeIdstring

Stable identifier for the thing type (the index id).

displayNamestring

Human-readable name for the thing type.

descriptionstring

Description of the thing type.

defaultImageUrlnull | string

Optional URL of a default image for devices of this type.

defaultIconUrlnull | string

Optional URL of a default icon for devices of this type.

latestThingTypeDefIdnull | string

Identifier of the latest definition version this index points to.

latestVersionNumberinteger | string<int32>

Version number of the latest definition.

Pattern: ^-?(?:0|[1-9]\d*)$
versionsarray<object>

The full version history for this thing type.

versions.versioninteger | string<int32>

The version number.

Pattern: ^-?(?:0|[1-9]\d*)$
versions.thingTypeDefIdstring

Identifier of the definition for this version.

isDeletedboolean

Whether this thing type has been soft-deleted.

createdAtstring<date-time>

Timestamp (UTC) when the thing type was created.

updatedAtnull | string<date-time>

Timestamp (UTC) when the thing type was last updated.

createdBystring

Identifier of the actor that created the thing type.

updatedBynull | string

Identifier of the actor that last updated the thing type.