Skip to main content
GET
Get a templating operation
Use the last segment of operation.name from Apply a templating plan or Clear a templating plan as the operationId. This response is the operation itself. It is not wrapped in operation. metadata.state is one of:
  • QUEUED and RUNNING: The run has not finished.
  • SUCCEEDED: The run finished. response holds matchedPoints and devicesAffected.
  • FAILED: The run stopped with an error. error holds the engine’s code and message.
  • STALLED: The run is RUNNING but has not reported progress for a while. It is not finished, so done stays false. KODE API works this state out when you read the operation.
metadata.progress is a percentage that updates after each batch. Do not use it to detect completion. Use done. When the run is SUCCEEDED, graphics, device references, and device linking update in the background afterwards. They can lag behind the point data for a short time.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Path Parameters

buildingId
string
required

Building identifier from List buildings.

operationId
string
required

The operation id.

Pattern: [^\p{C}\p{Z}]{1,128}

Query Parameters

fields
string

Comma-separated top-level fields to return. One or more of name, done, metadata, response, and error. The default is every field. An unknown name returns 400.

Response

The operation.

name
string

Operation resource name.

Example:

"buildings/66f1a2b3c4d5e6f7a8b9c0d1/templating/operations/66f1a2b3c4d5e6f7a8b9c0d3"

done
boolean

Whether the operation has finished (successfully or not).

Example:

false

metadata
object

Progress and identifying metadata, always present.

response
object

Present only once done and successful.

error
object

Present only once done and failed.