Get Daily Sample Count for a TimeseriesId and Metric

Returns the number of samples for a timeseriesID and a metric grouped by date.

URL

https://{{HOST}}/timeseries/timeseries/{timeseries_id}/metric/{metricName}/samplescount

Method

GET

Required IMS Scopes

  • Read
  • Write

ACL Permissions Required

  • owner
  • admin
  • readwrite

Versions Supported

  • 2.0 (Default)
  • 2.1

URL Path Parameters

Name Description Example Type
timeseries_id
required
Timeseries ID from which to get samples GUID string
metricName
required
Metric from which to query the samples Raw string

URL Query Parameters

Name Description Example Type
v
optional
Version of the API to use v=2.0 string
endDate
optional
Starting date of the target period 2018-01-01 ISO 8601 string(date)
startDate
optional
Ending date of the target period 2018-12-31 ISO 8601 string(date)

Request Header Parameters

Type Value Description
Authentication Bearer {access_token}
required
Retrieve access token
Content-Type application/json
required
Description

Example

Request

curl -X GET 
  'https://{{HOST}}/timeseries/timeseries/920de700-8a84-4306-aef7-2676df222c6f/metric/Raw/samplescount?startDate=2017-01-05&endDate=2017-01-06' 
  -H 'Cache-Control: no-cache' 
  -H 'Postman-Token: 3738398a-e7e5-43eb-bca7-108f6e8f64c0'

Response

[
  {
   "count": 5,
   "date": "2017-01-05",
   "timeseriesId": "672aaf93-5905-48ef-a96f-70527adb7955",
   "metric": "Raw"
  },
  {
   "count": 1,
   "date": "2017-01-06",
   "timeseriesId": "672aaf93-5905-48ef-a96f-70527adb7955",
   "metric": "Raw"
  }
]

Errors

Error Description
403 Forbidden

Response Body Parameters

Name Description Schema
count Description object definition
date Description object definition
timeseriesId Description object definition
metric Description object definition