AIOps

AIOps

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.

 View Only
Expand all | Collapse all

Metric data retrieval using API in CP4AIOPS

  • 1.  Metric data retrieval using API in CP4AIOPS

    Posted Wed November 20, 2024 08:15 AM

    Hi Team,

    Is WildCard Character permissible in Metric data retrieval using API Call in CP4AIOPS?


    I have used below command for Metric Data retrieval for specific metric. Let me know the changes to be done to fetch all metric data.

    curl -v "https://${ROUTE}/aiops/api/app/metric-api/v1/metrics?resource=<resource_id>&group=<group_name>&metric=<metric_name>" --header "Authorization: ZenApiKey $ZENAPIKEY" --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' --insecure



    ------------------------------
    Guruprasad N K
    ------------------------------


  • 2.  RE: Metric data retrieval using API in CP4AIOPS

    Posted Thu November 21, 2024 07:08 AM

    Hi,
    Wildcards are not supported - there could be too much data returned if they were supported.
    I think it would be best if you were to speak to your IBM Rep about your use case.
    There are some metadata APIs that might be able to help.
    curl -v "https://${ROUTE}/aiops/api/app/metric-api/v1/types/groups" <+ headers>
    curl -v "https://${ROUTE}/aiops/api/app/metric-api/v1/types/metrics?group=<URI_ENCODED_GROUP>" <+ headers>
    curl -v "https://${ROUTE}/aiops/api/app/metric-api/v1/types/resources?group=<URI_ENCODED_GROUP>&metric=<URI_ENCODED_METRIC>" <+ headers>
    Best Regards,
    -Mark



    ------------------------------
    MARK O'RIORDAN
    ------------------------------