Analytics CLI

How to access your analytics data with the toolkit CLI.

About this task

The toolkit CLI provides commands for viewing your analytics data. To view organization scoped event data, login to the toolkit CLI with provider organization user credentials.

Procedure

  1. Install the toolkit: Setting up the API Connect toolkit
  2. Log in with the CLI.
    For example:
    apic login --server <platform-api-host-name> --sso
    Where <platform-api-host-name> is the hostname portion URL of the server that hosts the API Manager (the "management server"). To determine the hostname, open API Manager in a browser, and copy the hostname from the URL in the address bar (beginning after "https://" and ending before "/manager") as shown in the following example:
    https://platform-api.us-east-1.d-r01.apic.cloud.ibm.com/manager
    
    When the toolkit prompts for the context, type provider and press Enter:
    Context? provider
    For more information about the toolkit CLI, see Setting up the API Connect toolkit.
  3. View the available toolkit analytics commands by using -m analytics -h.
  4. View your analytics events by using the events commands:
    apic -m analytics events -h
    Type "apic [command] --help" for help on the following related commands:
          events:catalogCount  Count events at catalog scope.
          events:catalogGet    Get specific event at catalog scope.
          events:catalogList   List events at catalog scope.
          events:orgCount      Count events at organization scope.
          events:orgGet        Get specific event at organization scope.
          events:orgList       List events at organization scope.
          events:spaceCount    Count events at space scope.
          events:spaceGet      Get specific event at space scope.
          events:spaceList     List events at space scope.
    
    Note: Commands that refer to "cloud" are not applicable to API Connect Enterprise as a Service.