Gets traffic usage data for selected period
GET<your-unleash-url>/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 (auto)
Schema
periodstringrequired
The year-month period for which the data usage is counted
Example:
2023-04
apiData object[]required
{
"period": "2023-04",
"apiData": [
{
"days": [
{
"day": "2023-04-19T00:00:00.000Z",
"trafficTypes": [
{
"group": "successful-requests",
"count": 100
}
]
}
],
"apiPath": "/api/client/features"
}
]
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/api/admin/metrics/traffic/:period' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
ResponseClear