Get Samples from Multiple Timeseries Ids

This endpoint is used to get samples from multiple timeseries IDs with same metric and time period information. If the startTime and endTime parameters are not provided, it returns all the samples. To avoid an overflow number of returned samples, you can pass the limit parameter.
The only required parameter for this endpoint is the timeseries_ids.

URL

https://{{HOST}}/timeseries/samples

Method

GET

Required IMS Scopes

  • Read
  • Write

Required ACL Permissions

  • owner
  • admin
  • readwrite
  • readonly

Versions Supported

  • 2.0 (Default)
  • 2.1

URL Query Parameters

Name Description Example Type
v
optional
Version of the API to use v=2.0 string
timeseries_ids
required
List of Timeseries IDs from which to get samples GUID(s) array(multi)
startTime
optional
Starting time of the target period 2018-01-01T00:00:00+00:00 ISO 8601 string(date-time + offset)
endTime
optional
Ending time of the target period 2018-12-31T23:59:59+00:00 ISO 8601 string(date-time + offset)
limit
optional
Limit the number of samples returned to this number 1 integer(int32)
metric
optional
Metric from which to query the samples Raw string
orderby
optional
Order the returned samples based on the element provided. Provide one of the fields in the sample JSON space-seperated by asc/desc to choose an ascending or descending order timestamp desc string

Request Header Parameters

Type Value Description
Authentication Bearer {access_token}
required
Retrieve access token

Example

Request

curl -X GET 
  'https://{{HOST}}/timeseries/samples?timeseries_ids=5d33771d-d87a-4635-9af9-3998744ae33f&timeseries_ids=886ebe9e-1040-4d67-ac2c-7a9ffb6e91b6' 
  -H 'Authorization: Bearer {access_token}' 
  -H 'Cache-Control: no-cache' 

Response

[ 
  { 
    "timeseriesId": "5d33771d-d87a-4635-9af9-3998744ae33f",
    "unixTimestamp": 1487968800000,
    "ingestUnixTimestamp": 1488090243352,
    "timestamp": "2017-02-24T20:40:00+00:00",
    "val": 12,
    "metric": "Raw",
    "customData" : 
    {
      "reliability": 2
    } 
  },
  { 
    "timeseriesId": "5d33771d-d87a-4635-9af9-3998744ae33f",
    "unixTimestamp": 1487968500000,
    "ingestUnixTimestamp": 1488090243352,
    "timestamp": "2017-02-24T20:35:00+00:00",
    "val": 11,
    "metric": "Raw",
    "customData" : 
    {
      "reliability": 1
    } 
  },
  { 
    "timeseriesId": "886ebe9e-1040-4d67-ac2c-7a9ffb6e91b6",
    "unixTimestamp": 1487162700000,
    "ingestUnixTimestamp": 1487188365866,
    "timestamp": "2017-02-15T12:45:00+00:00",
    "val": 27,
    "metric": "Raw" 
  },
  ...
]

Errors

Error Description
403 Forbidden

Response Body Parameters

Name Description Schema
timeseriesId Timeseries the TSElement belogs to string
metric Metric of the sample string
timestamp Timestamp of the sample string(date-time)
val Value of the sample object
unixTimestamp Unix timestamp of the sample integer(int64)
ingestUnixTimestamp Unix timestamp the sample was saved to the database integer(int64)
customData Application specific data can be stored here Dictionary<string,object>