Stream Data Store (SDS) Smart Module endpoints for accessing stream data and metadata for a home.

Endpoints

The Stream object

  • homeIdinteger

    ID of home this stream belongs to.

  • moduleIdstring

    ID of the SDS Smart Module this stream belongs to.

  • namestring

    Unique identifier of a stream within a home.

The Stream Status object

  • lastPacketReceivedAtstring| format is date-time

    Time of the last packet received, in RFC3339 format.

  • packetIndexinteger

    The highest packet index known for this stream.

  • openPacketIndexinteger

    If a session is currently active for this stream, this is the index of the first packet of the session.

  • streamOwnerobject

    If present, this field shows the entity that currently owns the stream.

The Stream Session object

  • idstring

    Unique identifier of session

  • startinteger

    Index of the first data packet of the session.

  • stopinteger

    Index of the last data packet of the session.

  • authorobject

    Information about the entity that created this session.

The Stream Metadata Packet object

  • packetIndexinteger

    Index of data packet with which this metadata packet is associated.

  • contentobject

    Actual metadata content as an arbitrary JSON object.

  • receivedAtstring| format is date-time

    Time when metadata was received, in RFC3339 format.

  • updatedAtstring| format is date-time

    Time when metadata was last updated, in RFC3339 format.

  • sourceobject

    Information about the entity that inserted this metadata packet.

Get streams of a home

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams
Description

Retrieve all existing streams in the specified home and SDS module.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

Query Parameters
  • skip

    integer

    Number of streams to skip over.

  • limit

    integer

    If non-zero, maximum number of streams to return.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200An array of stream objects are returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Get a stream

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}
Description

Retrieve information of the specified stream.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Response
  • 200The required stream object is returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 404The requested stream does not exist or is not accessible.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Get stream status

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/status
Description

Get the current status of the specified stream.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200The stream status object is returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 404The requested status does not exist or is not accessible.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Get sessions of a stream

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/sessions
Description

Get sessions of a stream within a given range of data packets.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Query Parameters
  • start

    integer

    required

    Lower bound of data packet range.

  • stop

    integer

    required

    Upper bound of data packet range.

  • skip

    integer

    Number of sessions to skip over.

  • limit

    integer

    If non-zero, maximum number of sessions to return.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200An array of session objects are returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Add a session to a stream

Endpoint
post /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/sessions
Description

Add a new session. The request body must contain a valid range of data packets to associate with the session.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 201Session successfully created and returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of invalid data or denied permission.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Get a stream session

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/sessions/{sessionId}
Description

Fetch the specified session object.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

  • sessionId

    string

    required

    Unique ID of the session object.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200The requested session object is returned.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 404The requested session does not exist or is not accessible.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Delete a stream session

Endpoint
delete /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/sessions/{sessionId}
Description

Delete the specified session object.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

  • sessionId

    string

    required

    Unique ID of the session object.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 204Session is successfully deleted.
  • 401Authorization is required to access this resource.
  • 403Request failed because of invalid data or denied permission.
  • 404The required session does not exist or is not accessible.
  • 409The session cannot be deleted because it is being used by another part of the system.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Get metadata of a stream

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/metadata
Description

Fetch the metadata packets associated with data packets within a given range of indexes.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Query Parameters
  • start

    integer

    required

    Lower bound of data packet range.

  • stop

    integer

    required

    Upper bound of data packet range.

  • skip

    integer

    Number of metadata packets to skip over.

  • limit

    integer

    If non-zero, maximum number of metadata packets to return.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 200A list of metadatum objects are returned in the response body.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.

Fetch data packets of a stream

Endpoint
get /homes/{homeId}/smartModules/{moduleId}/streams/{streamName}/data
Description

Fetch the data packets within a given range of indexes. A successful request results in an HTTP redirection to the actual URL for data download.

Path Parameters
  • homeId

    integer

    required

    The unique id for a home.

  • moduleId

    string

    required

    The unique id for a smart module.

  • streamName

    string

    required

    Unique identifier of the data stream.

Query Parameters
  • start

    integer

    required

    Index of first data packet to return.

  • stop

    integer

    required

    Index of last data packet to return.

Request Headers What's this?
  • Authorization

    required

    Must contain a user or project API key.

Response
  • 302The data download URL is returned in the Location header of the HTTP response.
  • 401Authorization is required to access this resource.
  • 403Request failed because of denied permission.
  • 404The requested <<resourcePathName|!singularize>> does not exist or is not accessible.
  • 500An unexpected error has occurred.
  • 503The service is temporarily unavailable.