Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Latest commit

 

History

History
263 lines (151 loc) · 7.85 KB

CollectionsApi.md

File metadata and controls

263 lines (151 loc) · 7.85 KB

\CollectionsApi

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

BroadcastMessage

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.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
collectionId string
body SendMessageRequest

Return type

MultiSendMessageResponse

Authorization

APIToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateCollection

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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body Collection

Return type

Collection

Authorization

APIToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteCollection

Collection DeleteCollection(ctx, collectionId)

Delete collection

You must have write access to the collection

Required Parameters

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

Return type

Collection

Authorization

APIToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListCollectionData

ListDataResponse ListCollectionData(ctx, collectionId, optional)

Get payloads

List the data received from all the devices in the collection.

Required Parameters

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

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. |

Return type

ListDataResponse

Authorization

APIToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListCollections

ListCollectionResponse ListCollections(ctx, )

List collections

Lists all the collections that one of your teams owns.

Required Parameters

This endpoint does not need any parameter.

Return type

ListCollectionResponse

Authorization

APIToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RetrieveCollection

Collection RetrieveCollection(ctx, collectionId)

Retrieve collection

Required Parameters

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

Return type

Collection

Authorization

APIToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateCollection

Collection UpdateCollection(ctx, collectionId, body)

Update collection

You must have write access to the collection, ie. you must administer it

Required Parameters

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

Return type

Collection

Authorization

APIToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]