API Analytics
Get API logs
Get API logs
Get API logs.
get/environments/{envId}/apis/{apiId}/logs
Query parameters
pageinteger
The page number for pagination.
perPageinteger
The number of items per page for pagination.
frominteger
The timestamp from which the logs will be returned.
tointeger
The timestamp to which the logs will be returned.
applicationIdsstring[]
List of application ids to filter on.
planIdsstring[]
List of plan ids to filter on.
methodsHttpMethod[]
List of HTTP request methods to filter on.
[ "GET" ]
apiProductIdsstring[]
Filter by API Product IDs. Only supported for v4 APIs.
[ "f5e6a5a0-1234-4b3a-9c1e-aabbccddeeff" ]
errorKeysstring[]
Return only connection logs whose error key matches any of the supplied values. For Native Kafka APIs with connection logging enabled and debug disabled, this filter is AND-composed with the default failed-connections-only filter.
Response
Page of API Logs
Example response
{
"data": [
{
"timestamp": "2023-05-18 12:40:46.184000+00:00",
"id": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"requestId": "1719d8d1-8d01-48f6-99d8-d18d0178f6d4",
"method": "GET",
"clientIdentifier": "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0",
"plan": {
"id": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"name": "My Api plan",
"description": "I can use a hundred characters to describe this plan.",
"apiId": "6c530064-0b2c-4004-9300-640b2ce0047b",
"apiProductId": "6c530064-0b2c-4004-9300-640b2ce0047b",
"security": {
"type": "KEY_LESS"
},
"mode": "STANDARD"
},
"application": {
"id": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"name": "My App",
"description": "I can use a hundred characters to describe this App.",
"domain": "https://my-app.com",
"type": "iOS",
"primaryOwner": {
"id": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"displayName": "John Doe"
},
"apiKeyMode": "UNSPECIFIED"
},
"transactionId": "00f8c9e7-78fc-4907-b8c9-e778fc790750",
"status": 200,
"requestEnded": true,
"gatewayResponseTime": 12,
"uri": "/my-api",
"endpoint": "https://my-api-example.com",
"message": "The timeout period of 1000ms has been exceeded",
"errorKey": "TIMEOUT_ERROR",
"errorComponentName": "security",
"errorComponentType": "ENDPOINT",
"warnings": [
{
"componentType": "POLICY",
"componentName": "transform-header",
"key": "TRANSFORM_HEADERS_FAILURE"
}
],
"apiProductId": "f5e6a5a0-1234-4b3a-9c1e-aabbccddeeff",
"apiProductName": "My Partner API Product"
}
]
}