Codex API (0.12.3)

Download OpenAPI specification:Download

License: Apache 2.0

The purpose of this application is to provide an API that returns event information for a device.

Authentication

basic

Security scheme type: HTTP
HTTP Authorization Scheme basic

bearer

Security scheme type: API Key
header parameter name: bearer

Get Device Events

Get latest events related to a specific device id.

path Parameters
deviceID
required
string

the id of the device known to the xmidt cluster

query Parameters
after
string

create a long poll request to get the events after the state hash provided from a previous request.

Responses

200

Event List

204

No events received after state hash within timeout period

404

No events found for device

499

Client closed request before timeout period

500

Internal Sever Error

get /device/{deviceID}/events
https://localhost/api/v1/device/{deviceID}/events
http://localhost/api/v1/device/{deviceID}/events

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Get the best effort status of the device.

path Parameters
deviceID
required
string

deviceID

Responses

200

Device Status

404

No events found for device

500

Internal Sever Error

get /device/{deviceID}/status
https://localhost/api/v1/device/{deviceID}/status
http://localhost/api/v1/device/{deviceID}/status

Response samples

application/json
Copy
Expand all Collapse all
{
  • "deviceid": "1234",
  • "state": "online",
  • "since": "2020-01-29T19:45:39.49854578Z",
  • "now": "2020-01-29T19:52:02.424551903Z",
  • "last_offline_reason": "*no error*:readerror",
  • "partner_ids": null
}