API Gateway 10.15 Tracing

Hi Experts,

I would like to know if there is any option in the API Gateway version 10.15 to view all the APIs in a single place/view for which the tracer is enabled.

Thanks,
Saritha

@Saritha_Paladugu3

You can use the following REST call to query the list of APIs for which tracing is enabled.

POST http://localhost:5555/rest/apigateway/search

{
“types”: [
“API”
],
“scope”: [
{
“attributeName”: “tracingEnabled”,
“keyword”: “true”
}
],
“responseFields”: [
“id”,
“name”,
“tracingEnabled”,
“isActive”
]
}

Hi Arun,

Thank you for posting the solution.
I’ve tried invoking the API with the required changes and received the expected response. It worked :slight_smile:
But a bit concerned about “tracingEnabled”: false value in the response. It is supposed to return true, but returning ‘false’ for the tracing-enabled APIs.Please clarify.

Response:
{
“API”: [
{
“apiName”: “snjfn”,
“isActive”: true,
“type”: “REST”,
“policies”: ,
“tracingEnabled”: false,
“publishedPortals”: ,
“systemVersion”: 1,
“gatewayEndpoints”: {},
“id”: “janfg”
},
{
“apiName”: “ajnfgja”,
“isActive”: true,
“type”: “SOAP”,
“policies”: ,
“tracingEnabled”: false,
“publishedPortals”: ,
“systemVersion”: 1,
“gatewayEndpoints”: {},
“id”: “kfngjaf”
}
]
}

Try this curl + jq command (in a Linux / macOS environment where curl and jq are installed):

curl --location --request GET "${APIGW_URL}/rest/apigateway/apis" \
--header 'Accept: application/json' \
-u ${APIGW_USERNAME}:${APIGW_PASSWORD} | jq '.apiResponse[] | select(.api.tracingEnabled == true)'

Hi Stephane,

Thank you for taking the time to respond to my query.
I’ll try your solution and update my response on this thread.

Thanks,
Saritha

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.