Runs a saved Query on the traffic log
Changed onRuns the saved Query (Analytics > Queries) called queryName on the traffic log of the given environment and returns the matching records, newest first by default. The Query is looked up by name inside the project in the path; the search covers the project's API and AI gateway traffic. A Query shared by the whole installation (global) is allowed and still sees only this project's traffic. A personal Query is not available through this API and answers 404 like an unknown name. The records carry the traffic list's columns only; request and response bodies, headers and credentials are never returned. Paged: size defaults to 20, at most 200, and page * size + size must stay within resultWindow (10,000); totalElements is the exact count of matching records, so narrow from/to when it is larger than resultWindow. An unreadable traffic log answers 503, never an empty list.
Request
- Base URLhttp://167.86.118.166:32080
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Project name
Name of the saved Query to run.
Query parameters
Zero-based page index.
Rows per page. Default 20, at most 200.
timestamp[,asc|desc]. Default timestamp,desc.
Request body
Example request
{
"environmentName": "prod",
"from": "now-24h",
"to": "now",
"fields": [
"timestamp",
"statusCode",
"apiProxyName",
"totalMs"
]
}Response
successful operation!
Example response
{
"items": [
{
"apiType": "REST",
"statusCode": 200,
"apiProxyName": "PetstoreProxy",
"endpoint": "/pet/{petId}",
"httpMethod": "GET"
}
],
"queryScope": "PROJECT",
"totalRelation": "eq",
"resultWindow": 10000
}Changes
- info
endpoint added
- info