All URIs are relative to https://api.lab5e.com/span
Method | HTTP request | Description |
---|---|---|
CreateDevice | Post /collections/{collectionId}/devices | Create device |
DeleteDevice | Delete /collections/{collectionId}/devices/{deviceId} | Remove device |
ListDeviceData | Get /collections/{collectionId}/devices/{deviceId}/data | Get payloads |
ListDevices | Get /collections/{collectionId}/devices | List devices |
RetrieveDevice | Get /collections/{collectionId}/devices/{deviceId} | Retrieve device |
SendMessage | Post /collections/{collectionId}/devices/{deviceId}/to | Send message |
UpdateDevice | Patch /collections/{existingCollectionId}/devices/{deviceId} | Update device |
Device CreateDevice(ctx, collectionId, body)
Create device
Create a new device. This will add a device to the collection. You must have write access to the collection.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | This is the containing collection | |
body | Device |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device DeleteDevice(ctx, collectionId, deviceId)
Remove device
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
deviceId | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListDataResponse ListDeviceData(ctx, collectionId, deviceId, optional)
Get payloads
List the data received from the device. Use the query parameters to control what data you retrieve.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | The collection ID. This is included in the request path. | |
deviceId | string | The device ID. This is included in the request path. | |
optional | *ListDeviceDataOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListDeviceDataOpts struct
Name | Type | Description | Notes |
---|
limit | optional.Int32| Limit the number of payloads to return. The default is 512. | start | optional.String| Start of time range. The default is 24 hours ago. | end | optional.String| End of time range. The default is the current time stamp. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListDevicesResponse ListDevices(ctx, collectionId)
List devices
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device RetrieveDevice(ctx, collectionId, deviceId)
Retrieve device
Retrieve a single device
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
deviceId | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} SendMessage(ctx, collectionId, deviceId, body)
Send message
Send a message to the device
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
deviceId | string | ||
body | SendMessageRequest |
map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device UpdateDevice(ctx, existingCollectionId, deviceId, body)
Update device
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
existingCollectionId | string | ||
deviceId | string | ||
body | UpdateDeviceRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]