job.execution.succeeded
A job’s device succeeded. The gateway sends it when the device’s action finished with every step done. Envelope: endpoint and device are the device’s, package is “houradvantage-connect”. Sent once per device and attempt.
Schema id: urn:houradvantage:events:3:job.execution.succeeded
Fields
| Field | Type | Required | Description |
|---|---|---|---|
job_id | integer | yes | The job’s id (GET /api/tenants/{tenant}/jobs/{id}). |
name | string | The job’s name. Absent when the job was created without one. | |
action | string | yes | The action the device runs: a standard action, or a package action or command. |
state | "queued" \ | "waiting_window" \ | "running" \ |
wave | integer | yes | The device’s wave, counted from 0. at least 0 |
attempt | integer | yes | Which attempt this is: 1, then one more each time retry-failed takes the device again. at least 1 |
action_id | integer | The device’s action for this attempt (its action.result has the same action_id). | |
detail | string | Absent in this event. |
Example
{ "job_id": 7, "name": "volume", "action": "set_settings", "state": "succeeded", "wave": 0, "attempt": 1, "action_id": 42}JSON Schema
job.execution.succeeded.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:job.execution.succeeded", "title": "job.execution.succeeded: data", "description": "A job's device succeeded. The gateway sends it when the device's action finished with every step done. Envelope: `endpoint` and `device` are the device's, `package` is \"houradvantage-connect\". Sent once per device and attempt.", "type": "object", "properties": { "job_id": { "type": "integer", "description": "The job's id (`GET /api/tenants/{tenant}/jobs/{id}`)." }, "name": { "type": "string", "description": "The job's name. Absent when the job was created without one." }, "action": { "type": "string", "description": "The action the device runs: a standard action, or a package action or command." }, "state": { "enum": [ "queued", "waiting_window", "running", "succeeded", "failed", "timed_out", "cancelled" ], "description": "Where the device stands in the job. In this event: always succeeded." }, "wave": { "type": "integer", "minimum": 0, "description": "The device's wave, counted from 0." }, "attempt": { "type": "integer", "minimum": 1, "description": "Which attempt this is: 1, then one more each time retry-failed takes the device again." }, "action_id": { "type": "integer", "description": "The device's action for this attempt (its action.result has the same action_id)." }, "detail": { "type": "string", "description": "Absent in this event." } }, "required": [ "job_id", "action", "state", "wave", "attempt" ], "examples": [ { "job_id": 7, "name": "volume", "action": "set_settings", "state": "succeeded", "wave": 0, "attempt": 1, "action_id": 42 } ]}