v1

latestOpenAPI 3.1.02026-07-2410057.1 KB

Create a Stream

Before connecting to the Stream endpoint, a customer will need to create a stream. Validic allows a customer to create up to 5 streams (note that this number is the number of streams, not the number of client connections to the stream). Attempting to create more than the allowed number will result in an error. Please note that optional filters need to be assigned when creating a stream. This allows Validic to apply the filters for each client that connects to the created stream’s connect endpoint, ensuring all clients receive a consistent view of the stream.

post/streams?token={token}

Path parameters

tokenstring required

Developer Key as supplied by Validic.

Request body

namestring required

A unique name for the stream.

start_datestring
resource_filterstring

Optional resource filter that is applied which will only send events if the event resource type is in the provided list. Supported Values: measurement, nutrition, sleep, summary, workout

event_type_filterstring

Optional SSE filter that is applied which will only send events if the event type is in the provided list

Response

200

idstring
namestring
resource_filterstring[]
start_datestring
groupstring
membersinteger
created_atstring
updated_atstring

Example response

{
  "id": "59778dSAMPLE70001565a2d",
  "name": "customer_meaningful_name",
  "resource_filter": [
    "summary"
  ],
  "start_date": "2017-07-25",
  "group": "stream_59778d430b11e70001565a2d",
  "created_at": "2017-07-25T18:26:11Z",
  "updated_at": "2017-07-25T18:26:11Z"
}