Aerovy Platform logo

Update a thing-type version

PUThttps://spectra.api.aerovy.com/v2/definitions/thing-types/versions/{thingTypeDefId}

Updates the metadata of a specific thing-type definition version. Requires an API key with the write action.

Loading code example
Loading code example

Authorizations

apiKeystringheaderrequired

API key passed in the header.

Path Parameters

thingTypeDefIdstringrequired

The definition version id.

Body

The fields to update; omitted fields are left unchanged.

displayNamenull | string

New display name, if changing.

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

New description, if changing.

Length: >= 0, <= 500
tagsnull | array

New tags, if changing.

modelMetadataany
propertyDefinitionsnull | array

Property definitions for this version. Omit (or null) to leave unchanged; provide a list to fully replace the existing set (an empty list removes all).

Response

application/json

The updated definition version.

thingTypeDefIdstring

Identifier of this definition version.

thingTypeIdstring

Identifier of the owning thing type (index id).

versioninteger | string<int32>

The version number of this definition.

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

Human-readable name for the thing type.

descriptionstring

Description of this definition version.

tagsarray<string>

Free-form tags applied to this definition.

metricIdsarray<string>

The metric ids included in this definition version.

deletedMetricIdsarray<string>

Metric ids that were present in earlier versions but removed in this one.

allowedSubDefinitionsarray<string>

Sub-definition ids allowed under this thing type, if any.

propertyDefinitionsarray<object>

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

propertyDefinitions.namestringrequired
propertyDefinitions.descriptionstring
propertyDefinitions.unitstring
propertyDefinitions.valueTypestringrequired
propertyDefinitions.constraintsarray<object>
modelMetadataany
metricDefinitionsnull | array

The resolved metric definitions for this version. Populated only when the request asks for them (e.g. `?includeMetricDefinitions=true`); otherwise omitted.

createdAtstring<date-time>

Timestamp (UTC) when this version was created.

updatedAtnull | string<date-time>

Timestamp (UTC) when this version was last updated.

createdBystring

Identifier of the actor that created this version.

updatedBynull | string

Identifier of the actor that last updated this version.