performanceAnalytics
Requires permission analytics:sales:read.
Performance analytics for a period. Limited to the customers you may see.. Needs the sales analytics read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query PerformanceAnalytics($period: AnalyticsPeriod!) {
performanceAnalytics(period: $period) {
apiMetrics {
averageResponseTime
errorCount
totalRequests
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query PerformanceAnalytics($period: AnalyticsPeriod!) {\n performanceAnalytics(period: $period) {\n apiMetrics {\n averageResponseTime\n errorCount\n totalRequests\n }\n }\n}",
"variables": {
"period": "LAST_6_MONTHS"
}
}
EOF
Variables:
{
"period": "LAST_6_MONTHS"
}
Response:
{
"data": {
"performanceAnalytics": {
"apiMetrics": {
"averageResponseTime": 0,
"errorCount": 0,
"totalRequests": 0
}
}
}
}
performanceAnalytics(
period: AnalyticsPeriod!
): PerformanceAnalytics!
Arguments
performanceAnalytics.period ● AnalyticsPeriod! non-null enum
The reporting period to analyse.
Type
PerformanceAnalytics object
How the system and its users are performing.