Operations [alpha]

APIs to get information about operations

Get all Operations in the Tenant

SecurityapiKey
Request
query Parameters
limit
integer
offset
integer
state
integer

Following are the Operation States and their corresponding integer values

OPERATION_CREATED      = 10
OPERATION_RESOLVING    = 20
OPERATION_RESOLVED     = 30
OPERATION_DISPATCHING  = 40
OPERATION_DISPATCHED   = 50
OPERATION_PROCESSING   = 60
OPERATION_COMPLETED    = 70
OPERATION_SUCCESS      = 80
OPERATION_FAILURE      = 90
OPERATION_SCHEDULED    = 100
OPERATION_CANCELLED    = 110
OPERATION_TIMEOUT      = 120
ordering
string

Field to order the results by. Prefix with '-' to reverse the order.

Enum: "created_at" "state" "updated_at"
Responses
200

Operations information for the Tenant

get/v0/operations/
Request samples
Response samples
application/json
{
  • "content": {
    }
}

Create a new Operation

SecurityapiKey
Request
Request Body schema: application/json
required
operation_type
string
Value: "CONVERGE"
schedule_type
string

Following Schedule types are supported

* IMMEDIATE: Schedule the command to execcute Immediately
* WINDOW: Schedule the command to execute within the given window
Enum: "IMMEDIATE" "WINDOW"
object (ScheduleArgs)
operation_device_query
object

A flexible JSON object to define device properties and filters.

object
Responses
201

Operation information for the Tenant

post/v0/operations/
Request samples
application/json

An example where the query specifies a list of devices with specific values.

{
  • "operation_type": "CONVERGE",
  • "schedule_type": "IMMEDIATE",
  • "schedule_args": {
    },
  • "operation_device_query": {
    },
  • "arguments": {
    }
}
Response samples
application/json
{
  • "content": {
    }
}

Get specific Operation details (Operation Status)

SecurityapiKey
Request
path Parameters
operationId
required
string <uuid>

ID of the Operation

Responses
200

Operation information for the Tenant

get/v0/operations/{operationId}/
Request samples
Response samples
application/json
{
  • "content": {
    }
}

Update the operation (Support status update as of now)

This API allows updating the status of a specific operation by providing the operation ID.

SecurityapiKey
Request
path Parameters
operationId
required
string

The ID of the operation to update (Put created operationId here)

Example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
Request Body schema: application/json
required
state
string

The new status of the operation

Enum: "FAILED" "CANCELLED" "TIMEOUT" "SCHEDULED"
Responses
200

Operation status updated successfully

put/v0/operations/{operationId}/
Request samples
application/json
{
  • "state": "CANCELLED",
  • "reason": "User requested"
}
Response samples
application/json
{
  • "operationId": "12345",
  • "status": "SUCCEEDED"
}