Organization
Org usage breakdown
Grouped metering usage breakdown for the authenticated organization. Groups results by a single dimension or column key. By default includes all projects; use filters.project_id to restrict.
POST
/
api
/
v3.1
/
org
/
usage
/
{entity_type}
Org usage breakdown
import requests
url = "https://backend.composio.dev/api/v3.1/org/usage/{entity_type}"
payload = {
"from": 123,
"to": 123,
"group_by": "<string>",
"limit": 500,
"filters": {
"user_id": ["<string>"],
"session_id": ["<string>"],
"project_id": ["<string>"]
}
}
headers = {
"x-org-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-org-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: 123,
to: 123,
group_by: '<string>',
limit: 500,
filters: {user_id: ['<string>'], session_id: ['<string>'], project_id: ['<string>']}
})
};
fetch('https://backend.composio.dev/api/v3.1/org/usage/{entity_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3.1/org/usage/{entity_type} \
--header 'Content-Type: application/json' \
--header 'x-org-api-key: <api-key>' \
--data '
{
"from": 123,
"to": 123,
"group_by": "<string>",
"limit": 500,
"filters": {
"user_id": [
"<string>"
],
"session_id": [
"<string>"
],
"project_id": [
"<string>"
]
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3.1/org/usage/{entity_type}"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-org-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backend.composio.dev/api/v3.1/org/usage/{entity_type}")
.header("x-org-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3.1/org/usage/{entity_type}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-org-api-key", "<api-key>");
request.AddJsonBody("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"entity_type": "<string>",
"unit": "<string>",
"total_quantity": "<string>",
"event_count": 1,
"groups": [
{
"key": "<string>",
"total_quantity": "<string>",
"event_count": 1
}
]
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}Authorizations
Path Parameters
Body
application/json
Org usage breakdown
import requests
url = "https://backend.composio.dev/api/v3.1/org/usage/{entity_type}"
payload = {
"from": 123,
"to": 123,
"group_by": "<string>",
"limit": 500,
"filters": {
"user_id": ["<string>"],
"session_id": ["<string>"],
"project_id": ["<string>"]
}
}
headers = {
"x-org-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-org-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: 123,
to: 123,
group_by: '<string>',
limit: 500,
filters: {user_id: ['<string>'], session_id: ['<string>'], project_id: ['<string>']}
})
};
fetch('https://backend.composio.dev/api/v3.1/org/usage/{entity_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://backend.composio.dev/api/v3.1/org/usage/{entity_type} \
--header 'Content-Type: application/json' \
--header 'x-org-api-key: <api-key>' \
--data '
{
"from": 123,
"to": 123,
"group_by": "<string>",
"limit": 500,
"filters": {
"user_id": [
"<string>"
],
"session_id": [
"<string>"
],
"project_id": [
"<string>"
]
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.composio.dev/api/v3.1/org/usage/{entity_type}"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-org-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backend.composio.dev/api/v3.1/org/usage/{entity_type}")
.header("x-org-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://backend.composio.dev/api/v3.1/org/usage/{entity_type}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-org-api-key", "<api-key>");
request.AddJsonBody("{\n \"from\": 123,\n \"to\": 123,\n \"group_by\": \"<string>\",\n \"limit\": 500,\n \"filters\": {\n \"user_id\": [\n \"<string>\"\n ],\n \"session_id\": [\n \"<string>\"\n ],\n \"project_id\": [\n \"<string>\"\n ]\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
false{
"entity_type": "<string>",
"unit": "<string>",
"total_quantity": "<string>",
"event_count": 1,
"groups": [
{
"key": "<string>",
"total_quantity": "<string>",
"event_count": 1
}
]
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}{
"error": {
"message": "<string>",
"code": 123,
"slug": "<string>",
"status": 123,
"request_id": "<string>",
"suggested_fix": "<string>",
"errors": [
"<string>"
]
}
}