DeviceOperations [alpha]

APIs to get information about device operations

Get all DeviceOperations for a specific Operation

SecurityapiKey
Request
path Parameters
operationsId
required
string <uuid>

ID of the Operation

Example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
query Parameters
limit
integer
offset
integer
state
integer

Following are the Device Operation States and their corresponding integer values

DEVICE_OPERATION_CREATED     = 10
DEVICE_OPERATION_INITIATED   = 20
DEVICE_OPERATION_DISPATCHED  = 30
DEVICE_OPERATION_PROCESSING  = 40
DEVICE_OPERATION_SUCCESS     = 50
DEVICE_OPERATION_FAILURE     = 60
DEVICE_OPERATION_CANCELLED   = 70
DEVICE_OPERATION_TIMEOUT     = 80
DEVICE_OPERATION_COMPLETED   = 90
ordering
string

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

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

Device Operation information for the Operation

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

Get a Operations for a device

SecurityapiKey
Request
path Parameters
deviceId
required
string <uuid>

ID of the Device

Example: 17d384d3-29bd-4dd4-af64-d02b9d6d54ee
Responses
200

Operations information for the Device

get/v0/devices/{deviceId}/operations/
Request samples
Response samples
application/json
{
  • "count": 0,
  • "previous": "string",
  • "next": "string",
  • "results": [
    ]
}

Get a specific DeviceOperations for a specific Operation (Device Operation Status)

SecurityapiKey
Request
path Parameters
operationsId
required
string <uuid>

ID of the Operation

Example: 5743470f-7dcc-4a92-8a4b-f41b1cea69ed
deviceId
required
string <uuid>

ID of the Device

Example: 17d384d3-29bd-4dd4-af64-d02b9d6d54ee
Responses
200

Device Operation information for the Operation

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

Update a specific DeviceOperation for a specific Operation

SecurityapiKey
Request
path Parameters
operationsId
required
string <uuid>

ID of the Operation

Example: 0aae03d2-32b4-4cab-b733-6919b84bb2ac
deviceId
required
string <uuid>

ID of the Device

Example: 550e8400-e29b-41d4-a716-446655440000
Request Body schema: application/json
required
operation_type
string
state
string
service_id
string
reason
string
Responses
200

Device Operation updated successfully

400

Bad Request

401

Unauthorized

404

Not found

500

Internal Server Error

put/v0/operations/{operationsId}/devices/{deviceId}/
Request samples
application/json
{
  • "operation_type": "CONVERGE",
  • "state": "SUCCESS",
  • "service_id": "drift-service",
  • "reason": "test"
}
Response samples
application/json
{
  • "content": {
    }
}