Performance Analytics API examples
-
- UpdatedJan 30, 2025
- 12 minutes to read
- Yokohama
- Performance Analytics
These examples demonstrate how to perform a REST query using cURL commands, and show the data returned for each command. Each example builds upon the last, with later examples using the data returned by earlier examples.
Return all indicators that are displayed in the Analytics Hub
Command:
The following response is truncated to show only the Number of open incidents indicator, which is used in the other examples on this page:
Return indicator details
Command:
Response:
Return all breakdowns and aggregates for an indicator
You can query a list of available breakdowns and aggregates for an indicator by setting the sysparm_include_available_breakdowns and sysparm_include_available_aggregates parameters to true.
Command:
Response:
Return a time series aggregation of indicator scores
You can apply the 7d running SUM aggregate to the Analytics Hub using the sysparm_uuid value with the sys_id of the aggregate.
Command:
Response:
Return the elements for a breakdown
To get the scores associated with each element of a breakdown, and to get the sys_ids of
those elements, use the sysparm_breakdown parameter with the sys_id of
the breakdown. In this example, you get the elements of the Assignment Group breakdown for
the Number of open incidents indicator. From previous example, you have the sys_id of
fb007202d7130100b96d45a3ce6103b4
for the Number of open incidents
indicator and the sys_id of baec0752bf130100b96dac808c0739ed
for the
Assignment Group breakdown.
Command:
The response consists of a set of indicator
objects, each containing one
element
object. The element
objects each contain the
name and sys_id of an object. Because the information about the indicator is the same for
each indicator
object, in this example only the first
indicator
object is given in detail.
Response:
Return the indicator filtered by a breakdown and element
You can apply a breakdown by appending the breakdown and breakdown element sys_id values to
the sysparm_uuid parameter. In this example, the data is broken down to
show priority 1 incidents. The sys_id for the Priority breakdown is
0df47e02d7130100b96d45a3ce610399
and is in the example Return all
breakdowns and aggregates for an indicator. You can get the sys_id for the 1 - Critical
element by running the same command as in Return all elements for a breakdown, but with the
Priority breakdown instead of Assignment Group. The sys_id for 1 - Critical is
5f012106db5123003ee8f93baf9619bd
.
Command:
Response:
Return the indicator broken down by location
The Performance Analytics API returns geolocation data when available.
Return first- and second-level breakdown scores
You can apply two levels of breakdown by appending two breakdown sys_ids to the sysparm_uuid parameter. In this example, the data is broken down by priority to show priority 1 incidents, and by category to show database incidents.
Command:
Response:
Return scores across a range of dates for two levels of breakdown
You can request a list of individual scores for all available dates by setting the
sysparm_include_scores parameter to true. To specify the date range
of scores, also use the sysparm_from and
sysparm_to parameters. In this example, the level 1 breakdown and
element are Assignment Group: Software (sys_id
baec0752bf130100b96dac808c0739ed
and
8a4dde73c6112278017a6a4baf547aa7
). The level 2 breakdown and element are
Priority: 1 - Critical (sys_id 0df47e02d7130100b96d45a3ce610399
and
e5900140200331007665978299a805f3
). Only scores on and after 30 November
2018 are returned.
Command:
Response:
Return breakdown relations for a breakdown and element
To obtain the sys_id values for all breakdown relations associated with an indicator, use
the sysparm_include_available_breakdowns parameter. In the
sysparm_uuid parameter, include the sys_ids of the first-level
breakdown and element whose relations you want to find. In this example, the
sysparm_uuid parameter includes the sys_id for the Assignment Group
breakdown and the sys_id for the Software element. The sys_id of the Assignment Group was
obtained in the example where all breakdowns and aggregates were returned. The sys_id of the
Software element was obtained in the previous example, where all the elements of Assignment
Group were returned. The sys_id of the Assignment Group breakdown is
baec0752bf130100b96dac808c0739ed
and of the Software element is
8a4dde73c6112278017a6a4baf547aa7
. The breakdown relation is obtained for
the Number of open incidents indicator, whose sys_id is
fb007202d7130100b96d45a3ce6103b4
.
unmatched
in place of the element sys_id. In this case, the parameter
would be
sysparm_uuid=fb007202d7130100b96d45a3ce6103b4:baec0752bf130100b96dac808c0739ed:unmatched
.Command:
Response:
Return indicator using a breakdown relation
To use a breakdown relation, include the sys_id values of the indicator, breakdown, and element in the sysparm_uuid parameter, and the sys_id of the breakdown relation in the sysparm_breakdown_relation parameter. This example returns the Sibling Group values for Assignment Group: Software from the previous example.
Command:
Response:
Return a filtered set of elements for a breakdown
You can apply a filter to the Analytics Hub data using the sysparm_elements_filter parameter with the sys_id of a Performance Analytics element filter record.
Get the sys_id of the elements filter from the elements filter record, as described in .
In this example, the element filter applies to the Groups breakdown source, with the
condition [[Parent][is][Database]]. The sys_id of this element filter is
7b9eb563eb11020065deac6aa206fe11
. The example gets the elements of the
Assignment Group breakdown that have the element Database as a parent.
Command:
Response:
On this page
- Return all indicators that are displayed in the
Analytics Hub
- Return indicator details
- Return all breakdowns and aggregates for an indicator
- Return a time series aggregation of indicator scores
- Return the elements for a breakdown
- Return the indicator filtered by a breakdown and element
- Return the indicator broken down by location
- Return first- and second-level breakdown scores
- Return scores across a range of dates for two levels of breakdown
- Return breakdown relations for a breakdown and element
- Return indicator using a breakdown relation
- Return a filtered set of elements for a breakdown