The default format for the data set structure is JSON. If no format is specified, the servlet will use the HTTP accept header as a hint.

URL

/api/v1/metrics/{metricId}/dataset{.format}

Method

GET

Formats

JSON, XML

Note:

All of the Common Query parameters apply to this resource.

Get the average response time metric for add and delete operations from 7/7/2015 for all PingDirectory Server and PingDirectoryProxy Server in Austin and Houston:
curl \
  -X GET \
  https://<metricsServerHost>:8080/api/v1/metrics/response-time/dataset?
instanceType=directory-server
  &instanceType=proxy&instanceLocation=austin&instanceLocation=houston&startTime=-1d
  &endTime=2015-07-07&pivot=instance&dimension=op-type:add,delete
Get the new connections metric and scale the value per hour in the last 5 minutes:
curl \
  -X GET \
  https://<metricsServerHost>:8080/api/v1/metrics/new-connections/dataset?
statistic=count;per:hour
Get the percentage of all occurrences in the last hour where the response-time metric has a value above 50ms:
curl \
  -X GET \
  https://<metricsserverHost>:8080/api/v1/metrics/response-time/dataset?
statistic=histogram;min:50;percent&startTime=-1h

Response Code

200 0K

Response Body

When one time interval is requested, a category dataset is returned where the first pivoted dimension values are listed as categories and each data point corresponds to a category. Subsequent pivots and histogram buckets are included as a series and subseries. The following example is the result of two pivots, op-type and instance.

{
  "type" : "category",
  "firstSampleTime" : 1344090300000,
  "lastSampleTime" : 1344090600000,
  "metric" : {
  "type" : "discreteValued",
  "id" : "response-time",
  "name" : "Response Time",
  "shortName" : "Response Time",
  "description" : "Time for server to process an LDAP
  operation and send a response to the client",
  "group" : "LDAP",
  "instanceTypes" : [ "ds", "proxy" ],
  "statistics" : [ "average", "count", "histogram" ],
  "dimensions" : [ {
  "id" : "application-name"
  }, {
  "id" : "op-type",
  "values" : [ "Search", "ModifyDN", "Add", "Delete",
  "Compare", "Bind", "Modify" ]
  } ],
  "countUnit" : {
  "singularName" : "Operation Response Time",
  "pluralName" : "Operation Response Time",
  "abbreviatedName" : "Response Time"
  },
  "valueUnit" : {
  "singularName" : "Millisecond",
  "pluralName" : "Milliseconds",
  "abbreviatedName" : "Msec"
  }
  },
  "series" : [ {
  "label" : "unboundid35",
  "data" : [ "0", "0", "0", "0", "0", "0", "0" ]
  }, {
  "label" : "unboundid3",
  "data" : [ "0", "0", "0", "0", "0", "0", "0" ]
  } ],
  "label" : "op-type",
  "categories" : [ "Search", "Delete", "Bind", "Modify",
  "Add", "ModifyDN", "Compare" ]
}