All URIs are relative to https://api.lab5e.com/span
Method | HTTP request | Description |
---|---|---|
BroadcastMessage | Post /collections/{collectionId}/to | Broadcast message |
CreateCollection | Post /collections | Create collection |
DeleteCollection | Delete /collections/{collectionId} | Delete collection |
ListCollectionData | Get /collections/{collectionId}/data | Get payloads |
ListCollections | Get /collections | List collections |
RetrieveCollection | Get /collections/{collectionId} | Retrieve collection |
UpdateCollection | Patch /collections/{collectionId} | Update collection |
MultiSendMessageResponse BroadcastMessage(ctx, collectionId, body)
Broadcast message
Broadcast a message to all devices in the collection. This request will always succeed if the collection exists, even if there are one or more send errors. Individual errors are returned as an array of error messages in the response. Use equivalent to resource for devices to send a message to single device.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | ||
body | SendMessageRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Collection CreateCollection(ctx, body)
Create collection
The returned collection is the collection stored in the backend. Defaults have been set. There are no required fields in a collection
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | Collection |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Collection DeleteCollection(ctx, collectionId)
Delete 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 | The ID of the collection you want to delete |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListDataResponse ListCollectionData(ctx, collectionId, optional)
Get payloads
List the data received from all the devices in the collection.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | The collection ID requested. This is included in the request path. | |
optional | *ListCollectionDataOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListCollectionDataOpts 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. Value is in milliseconds since epoch. | end | optional.String| End of time range. The default is the current time stamp. Value is in milliseconds since epoch. | offset | optional.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. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCollectionResponse ListCollections(ctx, )
List collections
Lists all the collections that one of your teams owns.
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Collection RetrieveCollection(ctx, collectionId)
Retrieve collection
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | The collection ID of the collection you are requesting |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Collection UpdateCollection(ctx, collectionId, body)
Update collection
You must have write access to the collection, ie. you must administer it
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string | The ID of the collection. This is assigned by the backend. | |
body | Collection |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]