AIOps

 View Only
  • 1.  Metric data retrieval using API in CP4AIOPS

    Posted yesterday

    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 3 hours ago

    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
    ------------------------------