Counting total API calls for your analytics service

Count the API calls for the analytics subsystem and see the total categorized by response status.

Note: If your API Connect bases costs on usage, you can use the following methods to track this information so that you can accurately report it. If your organization did not deploy the analytics subsystem, then this feature is not available. If you deployed analytics but offload your data and disabled local storage, then you must capture usage information from the third-party system where you offload data.

You can see the total API calls over time for each analytics service in the consumption dashboard. To see the consumption dashboard, navigate to the Cloud Manager UI analytics view: Accessing analytics in the Cloud Manager UI.

Alternatively, the Analytics CLI can be used to get your API count:
  1. Login as the cloud admin user:
    apic login --server <platform api endpoint> --username admin --realm admin/default-idp-1
  2. Use the following CLI command to retrieve a count of all analytics events recorded by the analytics service:
    apic -m analytics events:cloudCount --server <platform api endpoint> --analytics-service <analytics service name> --format json
    where <analytics service name> is the name of analytics service as configured in the Cloud Manager UI.
  3. If required, additional filters can be applied to the results. For example, --timeframe last12hours. See the help output from: apic -m analytics events:cloudCount -h for more details.