täglichen Benutzerverbrauch abrufen
curl --request GET \
--url https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}', 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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}",
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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}"
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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}")
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{
"consumption_by_date": [
{
"acus": 123,
"acus_by_product": {
"cascade": 123,
"devin": 123,
"terminal": 123,
"automation": 123,
"review": 123
},
"date": 123
}
],
"total_acus": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Verbrauch (Enterprise)
täglichen Benutzerverbrauch abrufen
Täglichen ACU-Verbrauch für einen bestimmten Nutzer abrufen.
Gibt sowohl die gesamten ACUs als auch den nach Datum aufgeschlüsselten Verbrauch für diesen Nutzer zurück.
Zeitzonenverhalten: Abrechnungszeiträume verwenden Mitternacht PST (Pacific Standard Time) als Tagesgrenze, was 08:00:00 UTC entspricht. Um die in der Devin-Konsole angezeigten Verbrauchsdaten zu reproduzieren, übergeben Sie Unix-Timestamps, die diesem Zeitzonen-Offset entsprechen (z. B. 1733385600 für den 5. Dezember 2025 um Mitternacht PST).
GET
/
v3
/
enterprise
/
consumption
/
daily
/
users
/
{user_id}
täglichen Benutzerverbrauch abrufen
curl --request GET \
--url https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}', 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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}",
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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}"
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.devin.ai/v3/enterprise/consumption/daily/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/consumption/daily/users/{user_id}")
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{
"consumption_by_date": [
{
"acus": 123,
"acus_by_product": {
"cascade": 123,
"devin": 123,
"terminal": 123,
"automation": 123,
"review": 123
},
"date": 123
}
],
"total_acus": 123
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Die Consumption-API steht nur Accounts im Enterprise-Plan zur Verfügung. Teams und Self-Serve-Organisationen erhalten eine
403-Antwort; einen accountspezifischen Toggle, den der Support aktivieren könnte, gibt es nicht.Aufschlüsselung nach Produkten
Jeder Datumseintrag in der Antwort enthält einacus_by_product-Objekt, das den gesamten ACU-Verbrauch nach Produktkomponenten aufschlüsselt: devin, automation, cascade, terminal und review (Devin Review). So sehen Sie für jeden Tag, wie sich der Verbrauch auf die einzelnen Produkte verteilt. Sind für devin, cascade oder terminal keine Daten auf Produktebene verfügbar, ist der Wert standardmäßig 0.0. automation und review sind null, wenn keine produktspezifischen Verbrauchsdaten vorliegen.
devin: Sitzungen, die von einer Person oder einem Service-Benutzer gestartet wurden, einschließlich Code-Scan- und Bereitschaftssitzungen.automation: Sitzungen und Code-Schritte, die von Automatisierungen ausgeführt werden. Bevor es dieses Feld gab, wurde dieser Verbrauch unterdevinerfasst.
Berechtigungen
Erfordert einen Servicebenutzer oder ein persönliches Zugriffstoken mit der BerechtigungViewAccountConsumption auf Enterprise-Ebene.Autorisierungen
Servicebenutzer-Anmeldedaten (Präfix: cog_)
Pfadparameter
Nutzer-ID

