Templates

Device template configuration

Get templates in organization

get

Retrieve all device templates in the organization.

Required permissions, when user-scoped authentication is used: PRODUCT_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
orgIdinteger · int32Optional

Organization ID (optional)

pageinteger · int32Optional

Page number (0-indexed)

Default: 0
sizeinteger · int32 · min: 1 · max: 1000Optional

Page size (max 1000)

Default: 50
Responses
chevron-right
200

List of templates

application/json
totalElementsinteger · int64RequiredExample: 1
get
/api/v1/organization/templates

Get template by ID

get

Retrieve detailed information about a specific template.

Required permissions, when user-scoped authentication is used: PRODUCT_VIEW.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
templateIdinteger · int32Required

Template ID

Responses
chevron-right
200

Template details

application/json
get
/api/v1/organization/template

Update template

put

Update template properties.

Only the original (root) template can be edited (the one with parentId = null). Sub-organizations cannot modify templates that were created by a parent organization.

Required permissions, when user-scoped authentication is used: PRODUCT_EDIT. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
templateIdinteger · int32Required

Template ID

Body
namestring · min: 1 · max: 50Required

New template name. Can only contain letters, digits and spaces.

Example: Temperature Sensor
boardTypestring · enumOptional

Device board type

Possible values:
connectionTypestring · enumOptional

Connection type, that is used on the device

Possible values:
descriptionstring · max: 128Optional

New template description. Can only contain letters, digits, spaces and punctuation marks.

Example: Template for temperature sensors
Responses
chevron-right
200

Template updated successfully

application/json
put
/api/v1/organization/template

Delete template

delete

Delete a device template.

You can't delete template, that is used in the sub-organizations. If any device is using the template in the root organization, it will be deleted.

Required permissions, when user-scoped authentication is used: PRODUCT_DELETE. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Query parameters
templateIdinteger · int32Required

Template ID

Responses
delete
/api/v1/organization/template

No content

Create new template

post

Create a new device template.

Required permissions, when user-scoped authentication is used: PRODUCT_CREATE. Also, when the user-scoped authentication is used, user should have developer mode enabled.

Authorizations
AuthorizationstringRequired

OAuth2 Bearer token obtained from authentication endpoint

Body
orgIdinteger · int32Optional

Organization ID to create template in. If not specified, the template will be created in the organization, that is associated with the authentication token.

Example: 101
namestring · min: 1 · max: 50Required

New template name. Can only contain letters, digits and spaces.

Example: Temperature Sensor
boardTypestring · enumOptional

Device board type

Possible values:
connectionTypestring · enumOptional

Connection type, that is used on the device

Possible values:
descriptionstring · max: 128Optional

New template description. Can only contain letters, digits, spaces and punctuation marks.

Example: Template for temperature sensors
Responses
post
/api/v1/organization/template/create

Last updated

Was this helpful?