---
title: Data set structure
description: The data set structure is a proprietary data structure that is space-optimized and designed to work with charting libraries like Highcharts or FusionCharts.
component: pingdirectory
version: 9.3
page_id: pingdirectory:pingdatametrics_server_administration_guide:pd_met_data_set_structure
canonical_url: https://docs.pingidentity.com/pingdirectory/9.3/pingdatametrics_server_administration_guide/pd_met_data_set_structure.html
revdate: September 13, 2023
section_ids:
  example: Example
---

# Data set structure

The data set structure is a proprietary data structure that is space-optimized and designed to work with charting libraries like Highcharts or FusionCharts.

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                                      |

|   |                                                            |
| - | ---------------------------------------------------------- |
|   | All of the Common Query parameters apply to this resource. |

## Example

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:

```shell
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:

```shell
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:

```shell
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.```json
{
  "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" ]
}
``` |
