Garnet API

Programmatic access to all platform features.

Base URL

https://api.garnet.ai

Quick Start

curl https://api.garnet.ai/v1/agents \
  -H "Authorization: Bearer $GARNET_API_TOKEN"

OpenAPI Spec

Complete OpenAPI 3.0 specification

Authentication

The Garnet API supports multiple authentication methods to suit different use cases:

User Authentication

OAuth 2.0 via Auth0 for secure user login and session management.

Project Token Authentication

For programmatic access to project resources. Include your project token in the Authorization header:
Authorization: Bearer your_project_token_here

Agent Token Authentication

Limited to agent operations only. Used by Garnet agents to communicate with the platform:
Authorization: Bearer your_agent_token_here

Authorization System

The API implements Role-Based Access Control (RBAC) with granular permissions:
  • create: Create new resources
  • read: View existing resources
  • update: Modify existing resources
  • delete: Remove resources
  • list: List multiple resources

Error Handling

The API returns specific error types based on the resource being accessed:
ResourceError TypeStatus Code
AgentsUnauthorizedAgent401
IssuesUnauthorizedIssue401
Network PoliciesUnauthorizedNetworkPolicy401
EventsUnauthorizedEvents401
TokensUnauthorizedTokenAccess401
Project SettingsUnauthorizedProjectSetting401

Rate Limiting

The API implements rate limiting to ensure fair usage:
  • Authenticated requests: 1000 requests per hour
  • Agent requests: 10,000 requests per hour
  • Burst limit: 100 requests per minute

CORS Support

Cross-Origin Resource Sharing (CORS) is enabled for browser-based applications with configurable origins, methods, and headers.