Send Docs Feedback

Enable analytics for an environment

Resource Summary


Content Type






Enable analytics for an environment

Edge on-premises installation only. For an Edge cloud installation, contact Apigee Customer Support.

After you create an environment, by using Create Environment, you have to enable analytics for the environment.  If you enable analytics for one environment in an organization, you must enable analytics for all environments in the organization. 


Note: This call requires that you pass a file named sample.json that contains entries for Analytics onboarding. The sample.json file contains the following:

  "properties" : {
    "samplingAlgo" : "reservoir_sampler",
    "samplingTables" : "10=ten;1=one;",
    "aggregationinterval" : "300000",
    "samplingInterval" : "300000",
    "useSampling" : "100",
    "samplingThreshold" : "100000"
  "servers" : {
    "postgres-server" : [ "1acff3a5-8a6a-4097-8d26-d0886853239c", "f93367f7-edc8-4d55-92c1-2fba61ccc4ab" ],  
    "qpid-server" : [ "d3c5acf0-f88a-478e-948d-6f3094f12e3b", "74f67bf2-86b2-44b7-a3d9-41ff117475dd"] 

The postgres-servers property contains a comma-separated list of the Postgres UUIDs, and the qpid-server property contains the Qpid UUIDs. If you need to obtain these UUIDs, use the following commands.

For Qpid, run the command:

curl -u <sysAdminEmail>:<passwd> http://<ms-ip>/v1/servers?pod=central

The output of this command is a JSON object. For each Qpid server, you will see output in the form:

"type" : [ "qpid-server" ],
"uUID" : "d3c5acf0-f88a-478e-948d-6f3094f12e3b"

For Postgres, run the command:

curl -u <sysAdminEmail>:<passwd> http://<ms-ip>/v1/servers?pod=analytics

For each Postgres server, you will see output in the form:

"type" : [ "postgres-server" ],
"uUID" : "d3c5acf0-f88a-478e-948d-6f3094f12e3b"


If you are using Edge for Private Cloud 4.16.01 or later, rather than use the API call, use the following command to enable Analytics:

> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-provision enable-ax -f configFile

Where configFile contains:

ORG_NAME=orgName  # lowercase only, no spaces, underscores, or periods.


Resource URL /organizations/{org_name}/environments/{env_name}/analytics/admin


Name Value Description

Specify the JSON file that you received from Apigee support.

Request Body

org_name Mention the organization name true

env_name Mention the environment name true

HTTP Basic

OAuth 2.0



Make a request and see the response.

Make a request and see the response.

Make a request and see the response.


Help or comments?