Read Data Through HTTP
To read Data from a Thing in the platform you must use a GET request.
- You can get Data from a specific Thing using a GET request with the Thing
ULID.
GET https://api.swx.altairone.com/spaces/space-name/data/?source[]=ulid
GET https://api.swx.altairone.com/spaces/space-name/thing/ulid/data/
Response:{ "collection": [ { "at": "2020-06-02T07:35:33Z", "id": 239086, "content": { "status":{ "connected": "True", "warnings": "False" } }, "content-type": "application/json", "source_id": 762 }, { "at": "2020-06-02T07:35:25Z", "id": 239085, "content": { "status":{ "connected": "True", "warnings": "False" } }, "content-type": "application/json", "source_id": 762 }, { "at": "2020-06-02T07:34:55Z", "id": 239084, "content": { "status":{ "connected": "True", "warnings": "False" } }, "content-type": "application/json", "source_id": 762 } ] }
- You can get specific
Data using a GET request with the Data ULID.
GET http:api.swx.altairone.com/data/123
{ “at”: “2020-06-02T07:34:55Z”, “id”: 239084, “content”: { “status”:{ “connected”: “True”, “warnings”: “False” } }, “content-type”: “application/json”, “source_id”: 762 }
- You can get a list of Data with pagination
specifying the number of items you want, and which is the first one. The
maximum number of items returned is 1000 (default).
GET http:api.swx.altairone.com/data
- You can get Data from a certain date range by indicating a reference date and the amount of Data to be returned or indicating a date range.
- You can get Data of a certain format such as text/plain or application/JSON.