Skip to main content

List Metrics

Zuora

List Metrics

You can use the Export API to list Insights account or user metrics.

The Export API does not return archived account or user metrics.

The account metrics returned by the Export API are exactly the account metrics listed in the Insights user interface under Settings > Manage Account Attributes & Metrics.

The user metrics returned by the Export API are exactly the user metrics listed in the Insights user interface under Settings > Manage User Attributes & Metrics.

Prerequisites

Before you can list Insights metrics, you must have obtained the export token for your Insights stream.

Submit a request at Zuora Global Support if you do not know the export token for your Insights stream, or if you would like Zuora to generate a new export token for your Insights stream. Zuora Global Support will send the export token to a confirmed Insights administrator. See Global Support Scope for Insights for more information.

If you request a new export token, the previous export token will no longer be honored.

The export token for your Insights stream is different from the stream token that enables you to embed Insights account profiles in your application.

Request

GET https://nw1.api.insights.zuora.com/api/export/metrics/{type}

Request URL Fields

Specify the following fields in the request URL.

type required

The type of metrics to list. One of the following values:

  • ACCOUNT

  • USER

Request Header Fields

Specify the following fields in the request header.

Authorization required

HTTP Basic Authorization header. The Basic Authorization username is the export token for your Insights stream. The Basic Authorization password is the empty string.

Request Body Fields

None.

Response

The response body contains a JSON array of account or user metrics.

Examples

Example Request (cURL)

curl -X GET --user your_export_token: \
'https://nw1.api.insights.zuora.com/api/export/metrics/ACCOUNT'

Example Success Response (JSON)

[
  "usage_intensity_account",
  "active_users_last_30_days",
  "total_actions_per_week_account",
  "total_sessions_per_week_account",
  "avg_actions_per_active_user_per_week",
  "avg_sessions_per_active_user_per_week"
  ...
]