All URIs are relative to https://api.lab5e.com
Method | HTTP request | Description |
---|---|---|
add_downstream_message | POST /span/collections/{collectionId}/devices/{deviceId}/outbox | Add message to oubox |
create_device | POST /span/collections/{collectionId}/devices | Create device |
delete_device | DELETE /span/collections/{collectionId}/devices/{deviceId} | Remove device. |
delete_downstream_message | DELETE /span/collections/{collectionId}/devices/{deviceId}/outbox/{messageId} | Delete outgoing message |
device_certificate | GET /span/collections/{collectionId}/devices/{deviceId}/certs | Get issued certificate(s) for device |
list_device_data | GET /span/collections/{collectionId}/devices/{deviceId}/data | Retrieve data from device |
list_devices | GET /span/collections/{collectionId}/devices | List devices in collection. |
list_downstream_messages | GET /span/collections/{collectionId}/devices/{deviceId}/outbox | List the messages in the outbox |
list_upstream_messages | GET /span/collections/{collectionId}/devices/{deviceId}/inbox | List incoming messages |
retrieve_device | GET /span/collections/{collectionId}/devices/{deviceId} | Retrieve device |
retrieve_device_stats | GET /span/collections/{collectionId}/devices/{deviceId}/stats | Retrieve device statistics |
update_device | PATCH /span/collections/{existingCollectionId}/devices/{deviceId} | Update device |
crate::models::MessageDownstream add_downstream_message(collection_id, device_id, body) Add message to oubox
Add a new message in the outgoing queue to the device. If there is other messages in the outbox these messages will be sent first.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] | ||
device_id | String | [required] | ||
body | AddDownstreamMessageBody | [required] |
crate::models::MessageDownstream
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Device create_device(collection_id, body) Create device
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | This is the containing collection | [required] | |
body | CreateDeviceBody | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Device delete_device(collection_id, device_id) Remove device.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | This is the containing collection | [required] | |
device_id | String | The device ID is assigned by the backend. | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::DeleteDownstreamMessageResponse delete_downstream_message(collection_id, device_id, message_id) Delete outgoing message
Delete an outgoing (ie downstream) message from the outbox.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] | ||
device_id | String | [required] | ||
message_id | String | [required] |
crate::models::DeleteDownstreamMessageResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::DeviceCertificateResponse device_certificate(collection_id, device_id) Get issued certificate(s) for device
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] | ||
device_id | String | [required] |
crate::models::DeviceCertificateResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::ListDataResponse list_device_data(collection_id, device_id, limit, start, end, offset) Retrieve data from device
List the data received from the device. Use the query parameters to control what data you retrieve. The maximum number of data points is 100.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | The collection ID. This is included in the request path. | [required] | |
device_id | String | The device ID. This is included in the request path. | [required] | |
limit | Option<i32> | Limit the number of payloads to return. The default is 512. | ||
start | Option<String> | Start of time range. The default is 24 hours ago. Value is in milliseconds since epoch. | ||
end | Option<String> | End of time range. The default is the current time stamp. Value is in milliseconds since epoch. | ||
offset | Option<String> | The message offset based on the message ID. This parameter can't be combined with the start and end parameters. If no parameter is set the first N messages will be returned. If this parameter is set the next N messages (from newest to oldest) with message ID less than the offset will be returned. |
crate::models::ListDataResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::ListDevicesResponse list_devices(collection_id) List devices in collection.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] |
crate::models::ListDevicesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::ListDownstreamMessagesResponse list_downstream_messages(collection_id, device_id, limit, start, end, offset) List the messages in the outbox
List messages that should be sent to the device when it connects to the service. The messages are sent to the device when it connects to the service and either sends a message (via UDP or CoAP) or requests a message via CoAP GET request.option
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] | ||
device_id | String | [required] | ||
limit | Option<i32> | |||
start | Option<String> | Start of time range. The default is 24 hours ago. Value is in milliseconds since epoch. | ||
end | Option<String> | End of time range. The default is the current time stamp. Value is in milliseconds since epoch. | ||
offset | Option<String> | The message offset based on the message ID. This parameter can't be combined with the start and end parameters. If no parameter is set the first N messages will be returned. If this parameter is set the next N messages (from newest to oldest) with message ID less than the offset will be returned. |
crate::models::ListDownstreamMessagesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::ListUpstreamMessagesResponse list_upstream_messages(collection_id, device_id, limit, start, end, offset) List incoming messages
Retrieve a list of incoming (ie upstream) messages, ie messages sent from the device to the service. These messages are buffered in the service until they expire. Use the query parameters to limit the number of messages to return. If no limit is specified the default limit of 250 is used.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | [required] | ||
device_id | String | [required] | ||
limit | Option<i32> | |||
start | Option<String> | Start of time range. The default is 24 hours ago. Value is in milliseconds since epoch. | ||
end | Option<String> | End of time range. The default is the current time stamp. Value is in milliseconds since epoch. | ||
offset | Option<String> | The message offset based on the message ID. This parameter can't be combined with the start and end parameters. If no parameter is set the first N messages will be returned. If this parameter is set the next N messages (from newest to oldest) with message ID less than the offset will be returned. |
crate::models::ListUpstreamMessagesResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Device retrieve_device(collection_id, device_id) Retrieve device
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | This is the containing collection | [required] | |
device_id | String | The device identifier | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::DeviceStats retrieve_device_stats(collection_id, device_id) Retrieve device statistics
Name | Type | Description | Required | Notes |
---|---|---|---|---|
collection_id | String | This is the containing collection | [required] | |
device_id | String | The device identifier | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Device update_device(existing_collection_id, device_id, body) Update device
The device can be moved from one collection to another by setting the collection ID field to the new collection. You must have administrative access to both collections. A note on gateway configurations: Empty gateway configuration blocks are deleted. If the configuration block contains a gateway ID it will be updated with the new values. All values must be submitted in the request. If a device is moved out of the collection and it references a gateway in the configuration the operation will fail. Devices that are moved from one collection to another and references gateway configurations must be updated before they are moved.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
existing_collection_id | String | [required] | ||
device_id | String | [required] | ||
body | UpdateDeviceBody | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]