Aerovy Platform logo

Create a template

POSThttps://spectra.api.aerovy.com/v2/templates

Creates a new template. target and format are immutable after creation. Requires an API key with the write action.

Loading code example
Loading code example

Authorizations

apiKeystringheaderrequired

API key passed in the header.

Body

The template to create.

namestringrequired

Human-readable template name.

descriptionstring

Optional description.

targetstringrequired

Output domain — a `TemplateTarget` name. Immutable after creation (changing it = a new template). Current values: `ThingData`.

formatstringrequired

Input mechanism — a `TemplateFormat` name. Immutable after creation. Current values: `JsonPointer`.

specany

The mapping spec as a JSON object; its shape is governed by (target, format).

tagsarray<string>

Arbitrary user-defined tags.

Response

application/json

Created; returns the template.

templateIdstring
namestring
descriptionstring
targetstring
formatstring
specany
specUnparseableboolean

True when the stored spec was not valid JSON (corrupt/legacy row); JsonElement? TemplateResponse.Spec is then null. Reads stay forgiving so one poisoned row can't blank a whole list page.

tagsarray<string>
revisioninteger | string<int32>
Pattern: ^-?(?:0|[1-9]\d*)$
isDeletedboolean
createdAtstring<date-time>
updatedAtnull | string<date-time>
createdBystring
updatedBynull | string