Skip to main content
The path-timeseries endpoint returns a breakdown of how many events each API path received per day over the requested date range. Each path in the response carries its own array of { date, count } entries, making it straightforward to render a multi-line traffic chart in the dashboard — one line per path. Only days that have at least one event are included; there is no zero-fill for quiet days.

Request

X-OTAS-USER-TOKEN
string
required
JWT identifying the authenticated user. Validated by the agent_user_auth_required decorator.
X-OTAS-AGENT-ID
string
required
UUID of the agent whose path timeseries data you want.
X-OTAS-PROJECT-ID
string
required
UUID of the project the agent belongs to.

Query parameters

start_date
string
required
Start of the date range, inclusive. Must be in YYYY-MM-DD format.
end_date
string
required
End of the date range, inclusive. Must be in YYYY-MM-DD format and must not be before start_date.

Response

status
number
required
1 on success.
agent_id
string
required
The agent UUID from the request headers.
project_id
string
required
The project UUID from the request headers.
paths
object[]
required
Paths are ordered alphabetically. Dates within each path are ordered ascending. Days with zero events for a path are omitted entirely — do not assume a missing date means zero traffic.

Errors

HTTPstatus_descriptionMeaning
400missing_datesstart_date or end_date query parameter was not provided.
400invalid_date_formatOne or both dates are not in YYYY-MM-DD format.
400invalid_date_rangestart_date is after end_date.
401missing_user_tokenX-OTAS-USER-TOKEN header was not provided.
400missing_agent_idX-OTAS-AGENT-ID header was not provided.
400missing_project_idX-OTAS-PROJECT-ID header was not provided.
403forbiddenThe authenticated user does not have access to the specified project.
404agent_not_foundNo active agent matches the provided agent ID.
503auth_service_timeoutThe UASAM auth service did not respond within the timeout window.
503auth_service_errorThe UASAM auth service is unreachable.
500server_errorAn unexpected internal error occurred.
curl --request GET \
  --url "http://localhost:8002/api/v1/agent/path-timeseries/?start_date=2026-03-01&end_date=2026-03-07" \
  --header "X-OTAS-USER-TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  --header "X-OTAS-AGENT-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  --header "X-OTAS-PROJECT-ID: 3f6e2b10-8c1a-4d55-b9d4-0a2e3c7f1234"
{
  "status": 1,
  "agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "project_id": "3f6e2b10-8c1a-4d55-b9d4-0a2e3c7f1234",
  "paths": [
    {
      "path": "/api/v1/orders/",
      "data": [
        { "date": "2026-03-01", "count": 14 },
        { "date": "2026-03-02", "count": 9 },
        { "date": "2026-03-04", "count": 22 }
      ]
    },
    {
      "path": "/api/v1/users/",
      "data": [
        { "date": "2026-03-01", "count": 10 },
        { "date": "2026-03-02", "count": 7 }
      ]
    }
  ]
}

Build docs developers (and LLMs) love