Get list of Dimensions and Metrics

Not applicable

I am using the below url to fetch dimensions and metrics

....v1/organizations/<org>/environments/<env>/analytics/admin/schemav2?type=fact

The question is: Really the metrics and dimensions vary based on the environments?

Solved Solved
0 4 224
1 ACCEPTED SOLUTION

Hi @balaji thilagar - I just tested this out so that we could make updates to the documentation if needed. Here's the deal:

  • Custom dimensions are indeed environment scoped. I just confirmed this with engineering. So if the Statistics Collector policy doesn't get invoked by a proxy deployed in the /test/ environment, that custom dimension won't show up in the management API response if you use /environments/test/.
  • HOWEVER, the custom dimension does show up in the Dimensions drop-down in custom reports regardless of environment. I suspect that's because the custom report definition UI is environment agnostic (you only get the environment choice when you run the report, not when you define it). So the UI must be getting custom dimensions from all environments.

So if you want a definitive list of all custom dimensions across all environments, look at the UI.

Hope that helps.

Thank you to @Chien-Wei Huang for the info!

View solution in original post

4 REPLIES 4

Hi @balaji thilagar, Each env in apigee can have a different set of policies/targets/methods/resources etc., so yes the metrics vary based on env the proxy is deployed to.

An environment provides a runtime execution context for APIs. It is like dev,uat,sit,prod environments.

Let me re-iterate my question.

The list of Metrics (response_size, message_count etc) & Dimensions (api_product, developer_app, access_token etc) can these be different based on environment.

Note:

1) I do understand that metrics data will differ based on the environment.

2) Refer to https://docs.apigee.com/api-platform/analytics/analytics-reference for the complete list of metrics and dimension that can be queried for an API.

Hi @balaji thilagar - I just tested this out so that we could make updates to the documentation if needed. Here's the deal:

  • Custom dimensions are indeed environment scoped. I just confirmed this with engineering. So if the Statistics Collector policy doesn't get invoked by a proxy deployed in the /test/ environment, that custom dimension won't show up in the management API response if you use /environments/test/.
  • HOWEVER, the custom dimension does show up in the Dimensions drop-down in custom reports regardless of environment. I suspect that's because the custom report definition UI is environment agnostic (you only get the environment choice when you run the report, not when you define it). So the UI must be getting custom dimensions from all environments.

So if you want a definitive list of all custom dimensions across all environments, look at the UI.

Hope that helps.

Thank you to @Chien-Wei Huang for the info!

And FYI, I've added the environment-scoped info to the documentation here. When we publish the management API topic, which doesn't currently exist, we'll make sure that info is covered there as well.