One page of a breakdown (workspaces, agents, users, triggers, platforms, providers, models), sliced from the same cached aggregate as ``/usage/summary``
Same access gate and filters as the summary, plus ?limit= / ?offset= and ?find=<row key>, whose index in the full breakdown comes back as position. Users and triggers exist for organization accounts only.
curl --request GET \
--url https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}', 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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}",
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: Basic <encoded-value>"
],
]);
$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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key: key id as the username, secret as the password. An account API key carries the same scopes as an OAuth token and is checked against the scopes listed under oauth2 on each operation. A trigger API key is limited to its trigger's workspace and reaches only the session operations that list this scheme alongside the oauth2 scopes.
Query Parameters
Maximum number of items to return.
1 <= x <= 500Number of items to skip before returning results.
0 <= x <= 9223372036854776000Window in days, ending now
1 <= x <= 365First day, YYYY-MM-DD; overrides days with end
Last day, YYYY-MM-DD
Only this workspace, by ID or full name
Only this agent, by ID or full name
200Response
Successful response
The response is of type object.
curl --request GET \
--url https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}', 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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}",
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: Basic <encoded-value>"
],
]);
$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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/accounts/{account_id_or_name}/usage/breakdown/{dimension}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}