REST Service Response Payloads
All REST services should return data in a JSON format. The following sections describe the JSON structure of various objects included in a response payload and the specific response payload required for each report type.
JSON Response Objects
This section defines various response objects that will be referenced in the following section when describing required response payloads for each report.
Metric Item
Property | Type | Required | Description |
---|---|---|---|
name |
String |
Y |
Name of the metric. |
value |
Number |
Y |
Value of the metric. |
valueFormat |
String |
N |
Format for the value. The following formats are supported:
|
valueLabel |
String |
N |
An additional label to display below the value |
indicator |
String |
N |
An indicator to display next to the value. The supported options are "up", "down", "normal", "info", "important", and "critical". |
Metric Chart
Property | Type | Required | Description |
---|---|---|---|
type |
String |
Y |
Type of chart to display: "line", "bar", "area", or "total" |
title |
String |
N |
Title to display above chart |
items |
Array |
Y |
Data for the chart. Each object contains "value" and "label" fields. |
renderTooltips |
Boolean |
N |
Hide or show tooltips on the chart. Default true. |
seriesName |
String |
N |
The ID of the series the item belongs to. It is also displayed as tooltip label for the series. Applies to line, bar, and area charts. |
valueFormat |
String |
N |
Formats the output of values in the chart. Takes the same values as for metrics items. |
valueLabel |
String |
N |
Prefix for values. Applies to total charts only. |
valueUnits |
String |
N |
Suffix for values. Applies to total charts only. |
xAxisTitle |
String |
N |
Label for the X-axis. Applies to line, bar, and area charts. |
renderXAxisLabels |
Boolean |
N |
Show or hide tick labels on the X-axis. Applies to line, bar, and area charts. |
yAxisTitle |
String |
N |
Label for the Y-axis. Applies to line, bar, and area charts. |
renderYAxisLabels |
Boolean |
N |
Show or hide tick labels on the Y-axis. Applies to line, bar, and area charts. |
initialScrollPosition |
String |
N |
Which end of the chart to start at if there are too many items to show at once. Options are "first" and "last", defaults to "first". Applies to line, bar, and area charts. |
Table Metric Config
Property | Type | Required | Description |
---|---|---|---|
name |
String |
Y |
Name of the metric. |
threshold |
Object |
N |
Object with numeric properties "min" and "max" values (both optional). Metric values less than the "min" value will be displayed in Red. Metric values greater than the "max" value will be displayed in Green. |
valueFormat |
String |
N |
Format for the value. The following formats are supported:
|
Table Headers Config
Property | Type | Required | Description |
---|---|---|---|
image |
String |
N |
Column header label for image column. (Required for table reports that display an image) |
descriptors |
Array |
N |
Array containing one or two String values defining the column header labels for the descriptor column(s). |
metrics |
Array |
N |
Array containing one to three Table Metric Config objects used to configure column header labels, value formatting and value thresholds for each Metric column. |
Table Item
Property | Type | Required | Description |
---|---|---|---|
image |
String |
N |
URL of the image to display. Ignored if the table report does not display an image. |
descriptors |
Array |
Y |
Array containing one or two String values defining descriptor values to display for this item. (Should match the number of descriptors defined in the Table Headers Config) |
metrics |
Array |
Y |
Array containing one to three Numeric values for this item. (Should match the number of metrics defined in the Table Headers Config) |