format: md
Organizations API
Endpoints para consulta de dados organizacionais, uso e projetos. Implementação PROXY (pass-through para Anthropic API).
format: md
GET /api/organizations/{org_uuid}/usage
GET /api/organizations/{org_uuid}/usage
Recupera dados de uso da organização.
Headers
| Header | Valor | Obrigatório |
|---|---|---|
Authorization | Bearer <token> | Sim |
Parâmetros Path
| Parâmetro | Tipo | Descrição |
|---|---|---|
org_uuid | string | UUID da organização |
Timeout: 15s
Response
{
claude_code?: {
resets_at: string | null;
utilization: number | null;
} | null;
projects?: {
resets_at: string | null;
utilization: number | null;
} | null;
extra_usage?: {
is_enabled: boolean | null;
monthly_limit: number | null;
used_credits: number | null;
utilization: number | null;
} | null;
// mais features (NDA)
}
Exemplo curl
curl http://localhost:4000/api/organizations/$ORG_UUID/usage \
-H "Authorization: Bearer $TOKEN"
Códigos de Erro
| Código | Significado |
|---|---|
401 | Não autorizado |
403 | Sem acesso à organização |
404 | Organização não encontrada |
429 | Rate limit excedido |
format: md
GET /api/organizations//projects/
GET /api/organizations//projects/
Recupera detalhes de um projeto.
| Parâmetro | Tipo | Descrição |
|---|---|---|
org_uuid | string | UUID da organização |
project_id | string | ID do projeto |
format: md
GET /api/organizations/{org_uuid}/projects/{project_id}/docs
GET /api/organizations/{org_uuid}/projects/{project_id}/docs
Lista documentos de um projeto.
format: md
GET /api/organizations//projects//files
GET /api/organizations//projects//files
Lista arquivos de um projeto.
format: md
GET /api/organizations/{org_uuid}/memory
GET /api/organizations/{org_uuid}/memory?project_uuid=<uuid>
Recupera dados de memória da organização para um projeto.
Query Parameters
| Parâmetro | Tipo | Descrição |
|---|---|---|
project_uuid | string | UUID do projeto (obrigatório) |
format: md
POST /api/organizations//cowork/web_fetch
POST /api/organizations//cowork/web_fetch
Fetch de URL via cowork (web fetching gerenciado).
Request Body
{
url: string;
allowed_urls: string[];
}
Exemplo curl
curl -X POST http://localhost:4000/api/organizations/$ORG_UUID/cowork/web_fetch \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"url": "https://example.com/doc",
"allowed_urls": ["https://example.com"]
}'
format: md
Schema Compartilhado: Account Bootstrap
interface AccountBootstrap {
uuid: string;
memberships?: Array<{
organization: {
uuid: string;
capabilities?: string[];
};
}>;
}
Mapa de Implementação
| Endpoint | LiteLLM | Origem |
|---|---|---|
| GET usage | PROXY | net.fetch (first-party) |
| GET project | PROXY | net.fetch |
| GET project docs | PROXY | net.fetch |
| GET project files | PROXY | net.fetch |
| GET memory | PROXY | net.fetch |
| POST web_fetch | PROXY | net.fetch |