Billing -usage

Bandwidth usage history

GET/billing/v1/bandwidth-usage/history

Returns the organization's bandwidth usage history

Authorization<token>

In: header

Query Parameters

days?integer

Number of days of history

Response Body

200application/json

OK

type: object

total?integer
usages?array<object>
created_at?string
data_source?string
image_bandwidth_bytes?integer
image_requests?integer
org_id?string
snapshot_date?string
snapshot_type?string
total_bandwidth_bytes?integer
total_requests?integer
unique_visitors?integer
video_bandwidth_bytes?integer
video_requests?integer
curl -X GET "https://api.rixl.com/billing/v1/bandwidth-usage/history"
fetch("https://api.rixl.com/billing/v1/bandwidth-usage/history", {
  method: "GET"
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.rixl.com/billing/v1/bandwidth-usage/history"

  req, _ := http.NewRequest("GET", url, nil)

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.rixl.com/billing/v1/bandwidth-usage/history"

response = requests.request("GET", url)

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;

HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.rixl.com/billing/v1/bandwidth-usage/history"))
  .GET()
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var response = await client.GetAsync("https://api.rixl.com/billing/v1/bandwidth-usage/history");
var responseBody = await response.Content.ReadAsStringAsync();

OK

application/json

{
  "total": 0,
  "usages": [
    {
      "created_at": "string",
      "data_source": "string",
      "image_bandwidth_bytes": 0,
      "image_requests": 0,
      "org_id": "string",
      "snapshot_date": "string",
      "snapshot_type": "string",
      "total_bandwidth_bytes": 0,
      "total_requests": 0,
      "unique_visitors": 0,
      "video_bandwidth_bytes": 0,
      "video_requests": 0
    }
  ]
}