Template Events

Template event management

Get template events

get

Retrieve all events defined in a 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

List of events

application/json
idinteger · int32Required

Event ID

Example: 4
namestringRequired

Event name

Example: High Temperature
eventCodestringOptional

Event code for triggering

Example: HIGH_TEMP
typestring · enumRequired

Event type

Possible values:
get
/api/v1/organization/template/events

Create template event

post

Add a new event to a template.

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. Event names and codes must be unique within the template.

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

Body
productIdinteger · int32Required

Template ID

Example: 101
typestring · enumRequired

Event type

Possible values:
namestring · min: 1 · max: 200Required

Event name. Can only contain letters, digits, spaces, underscores, backslashes and punctuations.

Example: High Temperature
codestring · min: 1 · max: 200Required

Event code for triggering. Can only contain letters, digits, underscores and hyphens.

Example: HIGH_TEMP
colorstring · min: 1 · max: 200Required

Event color in HEX format (e.g.

Example: #FF0000
descriptionstring · max: 1024Optional

Event description.

Example: Temperature is too high.
showInTimelinebooleanOptional

Whether the event should be displayed in the timeline widget

Responses
post
/api/v1/organization/template/event/create

Update template event

put

Update an event in a template.

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. Event names and codes must be unique within the template.

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

Body
productIdinteger · int32Required

Template ID

Example: 101
idinteger · int32Required

Event ID, that should be updated

Example: 1
typestring · enumRequired

Event type

Possible values:
namestring · min: 1 · max: 200Required

Event name. Can only contain letters, digits, spaces, underscores, backslashes and punctuations.

Example: High Temperature
codestring · min: 1 · max: 200Required

Event code for triggering. Can only contain letters, digits, underscores and hyphens.

Example: HIGH_TEMP
colorstring · min: 1 · max: 200Required

Event color in HEX format (e.g.

Example: #FF0000
descriptionstring · max: 1024Optional

Event description.

Example: Temperature is too high.
showInTimelinebooleanOptional

Whether the event should be displayed in the timeline widget

Responses
chevron-right
200

Event updated successfully

application/json
idinteger · int32Required

Event ID

Example: 4
namestringRequired

Event name

Example: High Temperature
eventCodestringOptional

Event code for triggering

Example: HIGH_TEMP
typestring · enumRequired

Event type

Possible values:
put
/api/v1/organization/template/event

Delete template event

delete

Remove an event from a template.

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

eventIdinteger · int32Required

Event ID

Responses
delete
/api/v1/organization/template/event

No content

Last updated

Was this helpful?