Effektive Ausgabenlimits auflisten
GET/v1/organizations/spend_limits/effective
Listet für jedes Mitglied das effektive Ausgabenlimit und die bisherigen Ausgaben im Zeitraum auf.
Gibt eine Zeile pro (Mitglied, Zeitraum) zurück, für die das Mitglied ein Ausgabenlimit auflöst, zusammen mit dem source-Bereich, von dem das Ausgabenlimit geerbt wurde. Die Paginierung erfolgt nach Mitglied, sodass die Zeiträume eines Mitglieds nie auf mehrere Seiten verteilt werden. Nur für Claude Enterprise-Organisationen unterstützt, nicht für Claude Console-Organisationen.
Parameters
Returns
Effektive Ausgabenlimits auflisten
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
page, err := client.Beta.Organization.SpendLimits.Effective.List(context.TODO(), anthropic.BetaOrganizationSpendLimitEffectiveListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}Response 200
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "daily",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit_id": "spend_limit_id"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"actor": {
"deleted": true,
"email_address": "email_address",
"name": "name",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"amount": "50000",
"currency": "USD",
"period": "daily",
"period_to_date_spend": "12050.5",
"scope": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"source": {
"type": "user",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"spend_limit_id": "spend_limit_id"
}
],
"next_page": "next_page"
}