Series Query: Versioned Metric - Filter Date

Description

Filter versions with the version_time field which returns value change time in milliseconds.

Supported parameters:

  • value
  • version_status
  • version_source
  • version_time

Versioned Data (No Filter)

[
    {"d":"2015-08-13T06:00:00.000Z","v":55.0,"version":{"d":"2015-08-13T14:32:42.251Z","source":"form/manual","status":"OK"}},
    {"d":"2015-08-13T06:05:00.000Z","v":31.0,"version":{"d":"2015-08-13T14:32:42.257Z","source":"device","status":"Error"}},
    {"d":"2015-08-13T07:00:00.000Z","v":45.0,"version":{"d":"2015-08-13T14:31:27.320Z"}},
    {"d":"2015-08-13T07:05:00.000Z","v":21.0,"version":{"d":"2015-08-13T14:31:27.320Z"}},
    {"d":"2015-08-13T08:00:00.000Z","v":45.0,"version":{"d":"2015-08-13T14:28:25.319Z"}},
    {"d":"2015-08-13T08:00:00.000Z","v":45.0,"version":{"d":"2015-08-13T14:28:51.244Z"}},
    {"d":"2015-08-13T08:05:00.000Z","v":21.0,"version":{"d":"2015-08-13T14:28:25.319Z"}},
    {"d":"2015-08-13T08:05:00.000Z","v":21.0,"version":{"d":"2015-08-13T14:28:51.244Z"}},
    {"d":"2015-08-13T09:00:00.000Z","v":25.0,"version":{"d":"2015-08-13T14:15:30.731Z","source":"etl:export"}},
    {"d":"2015-08-13T09:05:00.000Z","v":11.0,"version":{"d":"2015-08-13T14:15:30.731Z","source":"etl:export"}},
    {"d":"2015-08-13T09:30:00.000Z","v":12.4,"version":{"d":"2015-08-13T13:41:43.920Z","source":"api:192.0.2.14"}},
    {"d":"2015-08-13T09:40:00.000Z","v":6.2,"version":{"d":"2015-08-13T13:42:16.489Z","source":"api:192.0.2.14"}},
    {"d":"2015-08-13T09:50:00.000Z","v":-999.0,"version":{"d":"2015-08-13T13:42:36.597Z","source":"api:192.0.2.14","status":"Invalid"}},
    {"d":"2015-08-13T09:50:00.000Z","v":"NaN","version":{"d":"2015-08-13T13:43:27.530Z","source":"user:axibase","status":"Delete boot sample"}},
    {"d":"2015-08-13T10:00:00.000Z","v":0.0,"version":{"d":"2015-08-13T13:40:57.578Z","source":"api:192.0.2.14","status":"Invalid"}},
    {"d":"2015-08-13T10:00:00.000Z","v":14.0,"version":{"d":"2015-08-13T13:44:00.398Z","source":"user:axibase","status":"Manual revision"}}
]

Request

URI

POST /api/v1/series/query

Payload

[
  {
    "startDate": "2015-08-13T00:00:00Z",
    "endDate": "2015-08-14T00:00:00Z",
    "entity": "e-vers",
    "metric": "m-vers",
    "versioned": true,
    "versionFilter": "version_time >= date('2015-08-13T13:00:00Z') && version_time < date('2015-08-13T14:00:00Z')"
  }
]

Response

Payload

[{"entity":"e-vers","metric":"m-vers","tags":{},"type":"HISTORY",
"aggregate":{"type":"DETAIL"},
"data":[
    {"d":"2015-08-13T09:30:00.000Z","v":12.4,"version":{"d":"2015-08-13T13:41:43.920Z","source":"api:192.0.2.14"}},
    {"d":"2015-08-13T09:40:00.000Z","v":6.2,"version":{"d":"2015-08-13T13:42:16.489Z","source":"api:192.0.2.14"}},
    {"d":"2015-08-13T09:50:00.000Z","v":-999.0,"version":{"d":"2015-08-13T13:42:36.597Z","source":"api:192.0.2.14","status":"Invalid"}},
    {"d":"2015-08-13T09:50:00.000Z","v":"NaN","version":{"d":"2015-08-13T13:43:27.530Z","source":"user:axibase","status":"Delete boot sample"}},
    {"d":"2015-08-13T10:00:00.000Z","v":0.0,"version":{"d":"2015-08-13T13:40:57.578Z","source":"api:192.0.2.14","status":"Invalid"}},
    {"d":"2015-08-13T10:00:00.000Z","v":14.0,"version":{"d":"2015-08-13T13:44:00.398Z","source":"user:axibase","status":"Manual revision"}}
]}]