Analytics API

Use Apigee Edge Analytics.

Resource Types

URIs are relative to https://api.enterprise.apigee.com/v1, unless otherwise noted.

Export

For more information, see Export.
MethodEndpointDescription
get/organizations/{org_name}/environments/{env_name}/analytics/exports

Gets a list of all analytics data export jobs created for an organization and environment. The response provides links to get status of individual jobs. See Export data from Analytics for more information and examples.

post/organizations/{org_name}/environments/{env_name}/analytics/exports

Creates an analytics data export job.

The API returns the data export job ID that you use to track the status of the job. You must be in the role of organization administrator to call this API.

Note Free and trial accounts cannot export analytics data. For more information on Edge pricing plans, see Apigee pricing plans.

To export data from an organization that supports monetization, specify "dataset":"mint". The organization must support monetization to set this option, otherwise omit this property.

See Export data from Analytics for more information and examples.

Export API quotas

To prevent overuse of expensive data export API calls, Edge enforces a quota on calls to this API:

  • For organizations and environments that do not have monetization enabled, the quota is 70 calls per month per organization/environment. For example, if you have two environments in your organization, prod and test, you can make 70 API calls per month for each environment.

  • For organizations and environments with monetization enabled, the quota is:

    • 70 calls per month for each organization and environment for standard data
    • 70 calls per month for each organization and environment for monetization data

    For example, if you enable monetization on your prod organization, you can make 70 API calls for standard data and 70 additional API calls for monetization data.

If you exceed the call quota, this API returns an HTTP 429 response.

get/organizations/{org_name}/environments/{env_name}/analytics/exports/{export_id}

Gets the status of an analytics data export job. Create an export job using the Create an analytics data export job API.

The state property specifies the status of the job and can have one of the following values: enqueued, running, completed, failed

See Export data from Analytics for more information and examples.

ExportRequest

For more information, see ExportRequest.
MethodEndpointDescription
post/organizations/{org_name}/environments/{env_name}/analytics/exports

Creates an analytics data export job.

The API returns the data export job ID that you use to track the status of the job. You must be in the role of organization administrator to call this API.

Note Free and trial accounts cannot export analytics data. For more information on Edge pricing plans, see Apigee pricing plans.

To export data from an organization that supports monetization, specify "dataset":"mint". The organization must support monetization to set this option, otherwise omit this property.

See Export data from Analytics for more information and examples.

Export API quotas

To prevent overuse of expensive data export API calls, Edge enforces a quota on calls to this API:

  • For organizations and environments that do not have monetization enabled, the quota is 70 calls per month per organization/environment. For example, if you have two environments in your organization, prod and test, you can make 70 API calls per month for each environment.

  • For organizations and environments with monetization enabled, the quota is:

    • 70 calls per month for each organization and environment for standard data
    • 70 calls per month for each organization and environment for monetization data

    For example, if you enable monetization on your prod organization, you can make 70 API calls for standard data and 70 additional API calls for monetization data.

If you exceed the call quota, this API returns an HTTP 429 response.

Query

For more information, see Query.
MethodEndpointDescription
get/organizations/{org_name}/environments/{env_name}/queries

Lists the asynchronous analytics queries for an environment.

post/organizations/{org_name}/environments/{env_name}/queries

Creates an asynchronous analytics query.

You must be an organization administrator to call this API. You can make up to seven calls per hour to this API. If you exceed the call quota, this API returns an HTTP 429 response.

Note: Free and trial accounts cannot create asynchronous reports. For more information on Edge pricing plans, see Apigee pricing plans.

See Use the asynchronous custom reports API for more information and examples.

get/organizations/{org_name}/environments/{env_name}/queries/{queryId}

Gets the status of an asynchronous analytics query. Obtain the queryId when you created the query by using the Create an asynchronous analytics query API.

In the response, the value of the state property contains the query status as either running or completed.

See Use the asynchronous custom reports API for more information and examples.

QueryRequest

For more information, see QueryRequest.
MethodEndpointDescription
post/organizations/{org_name}/environments/{env_name}/queries

Creates an asynchronous analytics query.

You must be an organization administrator to call this API. You can make up to seven calls per hour to this API. If you exceed the call quota, this API returns an HTTP 429 response.

Note: Free and trial accounts cannot create asynchronous reports. For more information on Edge pricing plans, see Apigee pricing plans.

See Use the asynchronous custom reports API for more information and examples.