Skip to main content

GET /api

Returns service metadata plus the current caller (if authenticated).
  • Auth – optional session cookie or API key.
  • Response
{
  "service": "browsary::root",
  "version": "2024-05-01",
  "subject": "public" | { "id": "usr_123", "email": "[email protected]" }
}
Use this endpoint as a health check before attempting privileged operations.

GET /:project/api

Project-scoped equivalent of the root endpoint.
  • Path paramproject accepts a slug or UUID; it is resolved via database.projects.resolve.
  • Auth – optional, but the response only includes the project payload when you have the projects.read permission for that slug.
  • Response
{
  "service": "browsary::project::proj_123",
  "version": "2024-05-01",
  "project": {
    "id": "proj_123",
    "name": "Marketing Research",
    "slug": "marketing-research",
    "...": "full database row"
  },
  "subject": "public" | { "id": "usr_123", "email": "[email protected]" }
}

Error shape

Validation errors and rejected permission checks use the same JSON envelope:
{
  "status": "error",
  "message": "Human readable explanation"
}
Unexpected failures fall back to HTTP 500 with the same structure. Always check the status property before trusting other fields.