Latest snapshot
curl --request GET \
--url https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest', 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://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"baseId": "<string>",
"day": {
"date": "<string>",
"tables": [
{
"tableId": "<string>",
"tableName": "<string>",
"recordCount": 123,
"storageBytes": 123,
"fileCount": 123
}
],
"totals": {
"recordCount": 123,
"storageBytes": 123,
"fileCount": 123,
"tableCount": 123
}
},
"topFiles": [
{
"filename": "<string>",
"sizeBytes": 123,
"tableId": "<string>",
"tableName": "<string>",
"recordId": "<string>",
"fieldId": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Usage
Latest snapshot
The most recent daily snapshot (per-table breakdown and totals), plus the largest attachments from that day. day is null if nothing has been counted yet.
GET
/
usage
/
bases
/
{id}
/
snapshots
/
latest
Latest snapshot
curl --request GET \
--url https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest', 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://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simplified-webhooks.com/usage/bases/{id}/snapshots/latest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"baseId": "<string>",
"day": {
"date": "<string>",
"tables": [
{
"tableId": "<string>",
"tableName": "<string>",
"recordCount": 123,
"storageBytes": 123,
"fileCount": 123
}
],
"totals": {
"recordCount": 123,
"storageBytes": 123,
"fileCount": 123,
"tableCount": 123
}
},
"topFiles": [
{
"filename": "<string>",
"sizeBytes": 123,
"tableId": "<string>",
"tableName": "<string>",
"recordId": "<string>",
"fieldId": "<string>"
}
]
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Your Simplified Webhooks API key, sent as a bearer token: Authorization: Bearer sk_.... Create API keys in your profile settings.
Path Parameters
The usage base id (row id from /usage/bases, not the Airtable base id).
Example:
"8f1d6b2c-3a4e-4c5d-9e6f-0a1b2c3d4e5f"
⌘I