v1/streams
Use the v1/streams API to manage data streams and data points. You can also use the streams web service to upload a batch of data points to streams using an XML or CVS file. See Direct device uploads.
URI
http://<hostname>/ws/v1/streams
Formats
Method | Format | Description | Parameters |
---|---|---|---|
GET | /ws/v1/streams | Get a summary of the streams APIs. | None |
GET | /ws/v1/streams/bulk/history | Get historical data in CSV format. | order start_time end_time timeline fields |
GET, POST | /ws/v1/streams/inventory | List, create, or modify data streams. | order cursor size category |
GET | /ws/v1/streams/bulk | List, create, or modify data streams. | order cursor size category fields |
GET | /ws/v1/streams/inventory/{stream_id} | Get a specific data stream. | order cursor size start_time end_time timezone interval method |
PUT, DELETE | /ws/v1/streams/inventory/{stream_id} | Create, modify, or delete a specific data stream. | |
GET | /ws/v1/streams/inventory?category=carrier | Get carrier usage data for devices. | |
POST | /ws/v1/streams/history | Add one or more data points to a data stream | |
GET | /ws/v1/streams/history/{stream_id} | Get the history for a data stream. | order cursor size start_time end_time timeline |
DELETE | /ws/v1/streams/history/{stream_id} | Delete the history for a data stream. | start_time end_time timeline |
GET | /ws/v1/streams/rollups/{stream_id} | Get roll-up information for a data stream. | |
GET | /ws/v1/streams/history/{device_id}/carrier/{sim_id}/usage/{usage_id} | Get carrier usage data for a device. | |
GET | /ws/v1/streams/inventory?category=data | Get data streams reported by devices. | |
GET | /ws/v1/streams/inventory?category=metrics | Get health metrics streams reported by devices. | |
GET | /ws/v1/streams/inventory?category=management | Get management streams recorded for devices. |
Stream fields
id
Steam identifier.
description
Stream description.
type
Data type of the stream:
- integer
- long
- float
- double
- string
- binary
value
Current value of the data stream.
timestamp
Date and time the current value was set.
server_timestamp
Date and time the current value was received.
stream_units
Units for the data.
forwards
List of additional streams to forward data to when received.
History fields
id
Identifier of the data point in the stream history.
stream_id
Stream identifier of the history data.
Roll-up fields
stream_id
Stream identifier for the roll-up data.
Parameters
Name | Type | Description |
---|---|---|
category | string | Return streams for the specified category: data, metrics, management, or carrier. If you do not use the category parameter, streams for all categories are returned. |
cursor | string | Cursor to get the next page of devices. Omit on initial call. |
end_time | timestamp | End time (exclusive) in ISO 8601 or epoch (long). |
fields | string | Comma-separated list of fields to return for bulk API |
interval | string | Rollup interval: half, hour, day, week, or month. The default is hour. |
method | string | Rollup method: sum, average, min, max, count, standarddev. The default is average. |
order | string | Return streams ordered by ID (asc | desc). The default is ascending (asc). |
size | integer | Number of items to return. The maximum and default is 1000. |
start_time | timestamp | Start time (inclusive) in ISO 8601 or epoch (long). |
timeline | string | Timestamps to use in the request: client or server. The default is client. |
timezone | string | Timezone in which to calculate rollups. Applies only to rollups with intervals of day or longer. |