Skip to content

Update a specific DeviceOperation for a specific Operation

Request

Security
apiKey
Path
operationsIdstring, (uuid)required

ID of the Operation

Example:0aae03d2-32b4-4cab-b733-6919b84bb2ac
deviceIdstring, (uuid)required

ID of the Device

Example:550e8400-e29b-41d4-a716-446655440000
Bodyapplication/jsonrequired
operation_typestring
Example:"CONVERGE"
statestring
Example:"SUCCESS"
service_idstring
Example:"drift-service"
reasonstring
Example:"test"
cURL
curl -i -X PUT \
  https://develop-api.esper.io/_mock/openapi/v0/operations/0aae03d2-32b4-4cab-b733-6919b84bb2ac/devices/550e8400-e29b-41d4-a716-446655440000/ \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "operation_type": "CONVERGE",
    "state": "SUCCESS",
    "service_id": "drift-service",
    "reason": "test"
  }'

Responses

Device Operation updated successfully

Bodyapplication/json
contentobject(DeviceOperationWithStats)
Response
{ "content": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "operation_id": "cb4ede3c-a5d1-45e3-a9d2-fe83accbce52", "device_id": "3bafab7b-4400-4bcf-8e6e-09f954699940", "state": "CREATED", "reason": "", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "device_operation_activity": [] } }