TrueSight API Documentation
OverviewAccountActionsAdministration
Alarms v1Alarms v2BatchingDashboards
DatasetsEventsExtended Metrics
GroupsHostgroupsMetersMetricsProduct
PluginsRelaysSourcesSource-TagsSynchronize Data
Tenants
Terms

POST/v1/measurementsBatch

Same as /v1/measurements/:metric except that an array of query objects are passed in the body.

Each query object can have the same properties that are passed to /v1/measurements/:metric with the addition of:

The response is an object that maps the key to resulting data set formatted identical to /v1/measurements/:metric.

Example request:

curl https://api.truesight.bmc.com/v1/measurementsBatch \
-X POST \
-u <email>:<api-token> \
-H "Content-Type: application/json" \
-d '
[
   {
      "key": "key1",
      "metric": "cpu",
      "source": [
         "wills-macbook-pro.local"
      ],
      "start": 1416863824973,
      "end": 1416863825973
   }
]'

Example response:

{
   "timestamp": 1416866689799,
   "aggregates": {
      "key1": [
         [
            [
               1416863824000,
               null
            ],
            [
               [
                  "wills-macbook-pro.local",
                  0.18144044280052185
               ],
               [
                  "wills-macbook-pro-2.local",
                  0.11838439851999283
               ]
            ]
         ],
         [
            [
               1416863825000,
               null
            ],
            [
               [
                  "wills-macbook-pro.local",
                  0.17499999701976776
               ],
               [
                  "wills-macbook-pro-2.local",
                  0.17337031662464142
               ]
            ]
         ]
      ]
   }
}