Skip to content

GET /stats/bandwidth/tags/ ​

Description ​

Retrieve bandwidth statistics for a specific AutoGraph Tag or get the top 10 users with the highest bandwidth usage. Note: in contrast to the other statistics endpoints, the returned records each correspond to a one-hour time slice (instead of one-day periods). Use action=aggregate to get the summed-up total instead of the individual per-hour slices.

Authentication ​

  • Required: Yes
  • Method: Bearer token

Request Headers ​

  • Authorization: Bearer [AUTH_TOKEN]

Parameters ​

Query Parameters ​

  • format: string (Optional)
    Values: json, xml
    Overrides the Request Accept header.
  • human: boolean (Optional)
    Values: true, false
    Causes the response to be in a structured, more human-readable form.
  • application_id: string (Optional)
    Restricts the results in the response to just the application indicated by the given application id.
  • from_date: int (Optional)
    Timestamp in milliseconds. Note: the timestamp format is JavaScript, so it must be provided in milliseconds (and not seconds).
  • to_date: int (Optional)
    Timestamp in milliseconds. Note: the timestamp format is JavaScript, so it must be provided in milliseconds (and not seconds).
  • action: string (Optional)
    Values: aggregate
    Returns a summed-up aggregate over all (matching) statistics records instead of individual records. Currently, only aggregate is a valid action.

Example Request ​

Specific Tag ​

bash
curl -X GET "https://api.xvid.com/v1/stats/bandwidth/tags/User1?from_date=1599742800000&format=json&human=true" \
  -H "Authorization: Bearer AUTH_TOKEN"

Top 10 Users ​

bash
curl -X GET "https://api.xvid.com/v1/stats/bandwidth/tags/?from_date=1599742800000&format=json&human=true" \
  -H "Authorization: Bearer AUTH_TOKEN"

Example Response ​

Specific Tag ​

json
{
  "stats": [
    {
      "tag": "User1",
      "application": {
        "id": "51702847f4b12082e3670811",
        "href": "https://api.xvid.com/v1/applications/51702847f4b12082e3670811"
      },
      "from_date": 1599742800000,
      "to_date": 1599746400000,
      "bandwidth_data": 4100040407
    }
  ]
}

Top 10 Users ​

json
{
  "stats": [
    {
      "top_tags": [
        {
          "tag": "User1",
          "bandwidth_data": 4100040407
        },
        {
          "tag": "User2",
          "bandwidth_data": 2994481921
        },
        {
          "tag": "User3",
          "bandwidth_data": 1189246675
        },
        {
          "tag": "User4",
          "bandwidth_data": 1122763867
        },
        {
          "tag": "User5",
          "bandwidth_data": 638298762
        },
        {
          "tag": "User6",
          "bandwidth_data": 561405451
        },
        {
          "tag": "User7",
          "bandwidth_data": 355603954
        },
        {
          "tag": "User8",
          "bandwidth_data": 305581725
        },
        {
          "tag": "User9",
          "bandwidth_data": 259249171
        },
        {
          "tag": "User10",
          "bandwidth_data": 250876974
        }
      ],
      "application": {
        "id": "51702847f4b12082e3670811",
        "href": "https://api.xvid.com/v1/applications/51702847f4b12082e3670811"
      },
      "from_date": 1599742800000,
      "to_date": 1599746400000
    }
  ]
}