API Connect

 View Only
  • 1.  How to fetch API event fields

    Posted 4 days ago

    Hi Team,

    How to retrieve "time_to_serve_request" and "resource_id" for a service in API Connect v10.

    Thanks,

    Subhash



    ------------------------------
    Subhash Chandra
    ------------------------------


  • 2.  RE: How to fetch API event fields

    Posted 4 days ago

    Here's how to call the analytics rest API: https://www.ibm.com/docs/en/api-connect/10.0.8?topic=data-analytics-rest-api

    Or here's how to use the CLI: https://www.ibm.com/docs/en/api-connect/10.0.8?topic=data-analytics-cli

    Here's a reference for the analytics event record fields: https://www.ibm.com/docs/en/api-connect/10.0.8?topic=usage-api-event-record-field-reference

    Or you can use the UI which should be pretty self-explanatory.


    Reference information for the analytics API: https://apic-api.apiconnect.ibmcloud.com/v10/10.0.8.LATEST.html#/IBMAPIConnectAnalyticsAPI_200/overview
    Reference information for the analytics CLI: https://ibm-apiconnect.github.io/clidocs/docs/category/analytics-1

    You can filter based on all sorts of criteria such as catalog, timeframe, api name, etc...

    Hope that helps,

    Chris



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



  • 3.  RE: How to fetch API event fields

    Posted 3 days ago

    Thanks @Chris Dudley,

    We logged some fields in Splunk (e.g. - api.name, app. name, endpoint. Host etc.) but we are not able to logged only resource_id and time_to_serve_request. (attached)

    In Splunk , How to log both fields.



    ------------------------------
    Chandra S
    ------------------------------



  • 4.  RE: How to fetch API event fields

    Posted 3 days ago

    You need to configure splunk to receive raw JSON (not use the event collector), Im afraid beyond that I can't really help as you're outside APIC now.
    Analytics offload will send JSON to the HTTP endpoint you define in the APIC offload configuration - that will include all fields, what happens to them once they hit splunk is outside our remit I'm afraid.

    I know there have been problems when people have tried to use the splunk event collector - that doesn't work, it needs to be configured to receive JSON (as that is what is going to be sent).



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



  • 5.  RE: How to fetch API event fields

    Posted 3 days ago

    Thanks @Chris Dudley



    ------------------------------
    Chandra S
    ------------------------------