API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#API Connect
#Applicationintegration
#APIConnect
 View Only
Expand all | Collapse all

analytics collection

  • 1.  analytics collection

    Posted Wed October 16, 2024 02:42 PM
    analytics collection
     
    Hi team.
    I want to know something. Is it possible to access and obtain the analytics for a specific month using the toolkit and the command console?
    I am currently reviewing the task of accessing the analytics using the toolkit command console. I have managed to access, enter the desired catalog, but I cannot find a way to bring the analytics. I found this command, but it has not worked for me apic analytics:get --provider <api-provider-name> --catalog <catalog-name> --metric <metric-name>
    Has anyone managed to perform this task? Could you provide me with the commands used?
     
    Thanks


    ------------------------------
    Jimmy Perilla
    ------------------------------


  • 2.  RE: analytics collection

    Posted Thu October 17, 2024 04:28 AM

    Hi Jimmy.

    I think the CLI command you are looking for is events:catalogGet (depending on the scope you require). This CLI is documented @ https://www.ibm.com/docs/en/api-connect/10.0.8?topic=data-analytics-cli. The API documentation provides some guidance about the parameters you can use: https://apic-api.apiconnect.ibmcloud.com/v10/10.0.8.LATEST.html#/IBMAPIConnectAnalyticsAPI_200/overview

    Take a look and see if those commands will give you what you need.

    Mark



    ------------------------------
    Mark Taylor
    ------------------------------



  • 3.  RE: analytics collection

    Posted Wed October 23, 2024 06:18 PM

    Hi Mark.
    I'm using the commands in the documentation, however I'm stuck trying to export the analytics with CLI with the following command:
    apic analytics events:orgList --server <platform api> --analytics service <¿?>
    I don't know how I can access the analytics service. I need to know what I should put in "analytics service" to complete the command and be able to download the analytics.
    Or do you know a better way to download the analytics via CLI?



    ------------------------------
    Jimmy Perilla
    ------------------------------



  • 4.  RE: analytics collection

    Posted Thu October 24, 2024 01:48 AM

    That's the only way (why would there be multiple?). You just need the name or ID of your analytics service. There are APIs/clis to get that if you don't know it. You can also see it in the Cloud Manager (note it's the name or ID not the title).



    ------------------------------
    Chris Dudley
    ------------------------------



  • 5.  RE: analytics collection

    Posted Thu October 24, 2024 04:29 AM

    Hi, you can either get the Analytics Service name from the Cloud Manager Topology UI or list it / them using the Cloud-Mgmt-API with this call:

    https://apic-api.apiconnect.ibmcloud.com/v10/#/IBMAPIConnectPlatformCloudManagementAPI_200/operation/%2Forgs%2F{org}%2Favailability-zones%2F{availability-zone}%2Fanalytics-services/get

    Be aware that you need a Cloud admin user to generate the Bearer Token needed to authorize this API call.



    ------------------------------
    Nick Cawood
    API Connect Consultant
    IBM Expert Labs
    IBM UK Ltd

    https://www.linkedin.com/in/nickcawood/
    ------------------------------



  • 6.  RE: analytics collection

    Posted Tue October 29, 2024 03:31 PM

    Yes, but what happens is that the organization wants to find a way to get the analytics using CLI commands, and that's what I'm trying to find.



    ------------------------------
    Jimmy Perilla
    ------------------------------



  • 7.  RE: analytics collection

    Posted Tue October 29, 2024 03:53 PM

    Sorry I'm not following - you asked about getting the Analytics Service names previously, are you asking for more than that?

    For Analytics Service names via the Toolkit CLI use this command: https://www.ibm.com/docs/en/api-connect/10.0.8?topic=tool-cloud-administration-commands

    apic analytics-services:list - List the Analytics Services


    Apologies I have no experience using the Toolkit CLI for extracting analytics. Instead I use the REST API provided with APIC: https://apic-api.apiconnect.ibmcloud.com/v10/#/IBMAPIConnectAnalyticsAPI_200/overview



    ------------------------------
    Nick Cawood
    API Connect Consultant
    IBM Expert Labs
    IBM UK Ltd

    https://www.linkedin.com/in/nickcawood/
    ------------------------------



  • 8.  RE: analytics collection

    Posted Tue October 29, 2024 03:41 PM

    @Chris Dudley

    Right now I'm interested in knowing if it's possible to obtain/download the analytics of an environment (for example, development, testing or production) using CLI console commands. If possible, I need to know the commands to be able to access and download the analytics. So far I have these commands.
    1. I access the folder where I have the toolkit through the console
    2. I run the "apic" command
    3. I run the following command to log in to the server I need: apic login --server <desired server> --sso
    4. context? provider
    5. I enter the api key
    This is as far as I've gotten. For example, I need to know how to download the analytics of a development or production environment.



    ------------------------------
    Jimmy Perilla
    ------------------------------



  • 9.  RE: analytics collection

    Posted Tue October 29, 2024 04:06 PM

    Follow the docs https://www.ibm.com/docs/en/api-connect/10.0.8?topic=data-analytics-cli


    Cli reference docs https://ibm-apiconnect.github.io/clidocs/docs/category/analytics-1



    ------------------------------
    Chris Dudley
    ------------------------------



  • 10.  RE: analytics collection

    Posted Thu November 07, 2024 07:56 PM

    Hi Chris.
    Looking through the documentation, I found the following command:
    apic -m analytics events:cloudList --analytics-service payment-initiation-x --<server api.apiconnect.cloud.ibm.com> --format=json
    However, I'm getting an error for the requested format, but I've already tried alternatives like XML and Yaml but it still doesn't work. Do you know how I can fix this?
    According to the documentation, it's in JSON format and for me it's perfect in that format, but it doesn't export it in any format.



    ------------------------------
    Jimmy Perilla
    ------------------------------



  • 11.  RE: analytics collection

    Posted Fri November 08, 2024 01:28 AM
    Edited by Chris Dudley Fri November 08, 2024 01:28 AM

    It's —format json without the =. See https://ibm-apiconnect.github.io/clidocs/docs/debug

    note the cloud level operations need a cloud manager auth token not api manager.



    ------------------------------
    Chris Dudley
    ------------------------------