Gets traffic usage data for selected period
GET/api/admin/metrics/traffic/:period
Gets traffic usage data numbers per API for a period given by the parameter
Request
Path Parameters
period stringrequired
Responses
- 200
trafficUsageDataSegmentedSchema
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
Array [
]
]
]
period stringrequired
The year-month period for which the data usage is counted
Example:
2023-04
apiData
object[]
required
Contains the recorded daily data usage for each API path
days
object[]
required
An array containing each day in the selected period that has data usage recorded
day date-timerequired
The day of the period for which the usage is recorded
Example:
2023-04-19T00:00:00.000Z
trafficTypes
object[]
required
Contains the recorded data usage for each type of traffic group
group stringrequired
The traffic group
Example:
successful-requests
count numberrequired
The number of requests
Example:
100
apiPath stringrequired
The path of the API that the recorded data usage is for
Example:
/api/client/features
{
"period": "2023-04",
"apiData": [
{
"days": [
{
"day": "2023-04-19T00:00:00.000Z",
"trafficTypes": [
{
"group": "successful-requests",
"count": 100
}
]
}
],
"apiPath": "/api/client/features"
}
]
}
Loading...