Skip to main content

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

trafficUsageDataSegmentedSchema

Schema
    periodstringrequired

    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

  • Array [
  • days object[]required

    An array containing each day in the selected period that has data usage recorded

  • Array [
  • daydate-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

  • Array [
  • groupstringrequired

    The traffic group

    Example: successful-requests
    countnumberrequired

    The number of requests

    Example: 100
  • ]
  • ]
  • apiPathstringrequired

    The path of the API that the recorded data usage is for

    Example: /api/client/features
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/admin/metrics/traffic/:period' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!