Monthly totals by component, from rated lines
curl --request GET \
--url https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"id": "<string>",
"email": "<string>",
"workspaces": [
{
"name": "<string>",
"slug": "<string>",
"id": "<string>",
"stripe_customer_id": "<string>",
"created": "2023-11-07T05:31:56Z"
}
],
"databases": [
"<string>"
]
}
'import requests
url = "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals"
payload = {
"id": "<string>",
"email": "<string>",
"workspaces": [
{
"name": "<string>",
"slug": "<string>",
"id": "<string>",
"stripe_customer_id": "<string>",
"created": "2023-11-07T05:31:56Z"
}
],
"databases": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
id: '<string>',
email: '<string>',
workspaces: [
{
name: '<string>',
slug: '<string>',
id: '<string>',
stripe_customer_id: '<string>',
created: '2023-11-07T05:31:56Z'
}
],
databases: ['<string>']
})
};
fetch('https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'email' => '<string>',
'workspaces' => [
[
'name' => '<string>',
'slug' => '<string>',
'id' => '<string>',
'stripe_customer_id' => '<string>',
'created' => '2023-11-07T05:31:56Z'
]
],
'databases' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ym": "<string>",
"totals": {}
}workspaces
Monthly totals by component, from rated lines
GET
/
workspaces
/
{workspaceSlug}
/
billing
/
{ym}
/
totals
Monthly totals by component, from rated lines
curl --request GET \
--url https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"id": "<string>",
"email": "<string>",
"workspaces": [
{
"name": "<string>",
"slug": "<string>",
"id": "<string>",
"stripe_customer_id": "<string>",
"created": "2023-11-07T05:31:56Z"
}
],
"databases": [
"<string>"
]
}
'import requests
url = "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals"
payload = {
"id": "<string>",
"email": "<string>",
"workspaces": [
{
"name": "<string>",
"slug": "<string>",
"id": "<string>",
"stripe_customer_id": "<string>",
"created": "2023-11-07T05:31:56Z"
}
],
"databases": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
id: '<string>',
email: '<string>',
workspaces: [
{
name: '<string>',
slug: '<string>',
id: '<string>',
stripe_customer_id: '<string>',
created: '2023-11-07T05:31:56Z'
}
],
databases: ['<string>']
})
};
fetch('https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'email' => '<string>',
'workspaces' => [
[
'name' => '<string>',
'slug' => '<string>',
'id' => '<string>',
'stripe_customer_id' => '<string>',
'created' => '2023-11-07T05:31:56Z'
]
],
'databases' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://global.thenile.dev/workspaces/{workspaceSlug}/billing/{ym}/totals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"id\": \"<string>\",\n \"email\": \"<string>\",\n \"workspaces\": [\n {\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"id\": \"<string>\",\n \"stripe_customer_id\": \"<string>\",\n \"created\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"databases\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ym": "<string>",
"totals": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
*/*
Was this page helpful?
⌘I