TeaLab API (0.1.0)

Download OpenAPI specification:

Multi-tenant job orchestration API with JWT auth and SSE telemetry.

catalog

Get feature catalog

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "features": [
    ],
  • "packages": [
    ]
}

sessions

List all sessions (superuser)

Authorizations:
BearerAuth
query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "next_cursor": "string",
  • "sessions": [
    ],
  • "total": 0
}

List sessions for a tenant (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "next_cursor": "string",
  • "sessions": [
    ],
  • "total": 0
}

List sessions for current user

Authorizations:
BearerAuth
query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "next_cursor": "string",
  • "sessions": [
    ],
  • "total": 0
}

Revoke a session

Authorizations:
BearerAuth
path Parameters
sessionID
required
string

Session ID

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

notices

List system notices

Authorizations:
BearerAuth
query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "next_cursor": "string",
  • "notices": [
    ],
  • "total": 0
}

Create or update a system notice

Authorizations:
BearerAuth
Request Body schema: application/json
required

Notice payload

body
string
cta_label
string
cta_url
string
dismissible
boolean
ends_at
string
id
string
severity
string
starts_at
string
tenant_id
string
title
string

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "cta_label": "string",
  • "cta_url": "string",
  • "dismissible": true,
  • "ends_at": "string",
  • "id": "string",
  • "severity": "string",
  • "starts_at": "string",
  • "tenant_id": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Delete a system notice

Authorizations:
BearerAuth
path Parameters
noticeID
required
string

Notice ID

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

List notices for a tenant

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{
  • "has_more": true,
  • "next_cursor": "string",
  • "notices": [
    ],
  • "total": 0
}

Create or update a tenant notice

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

Request Body schema: application/json
required

Notice payload

body
string
cta_label
string
cta_url
string
dismissible
boolean
ends_at
string
id
string
severity
string
starts_at
string
tenant_id
string
title
string

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "cta_label": "string",
  • "cta_url": "string",
  • "dismissible": true,
  • "ends_at": "string",
  • "id": "string",
  • "severity": "string",
  • "starts_at": "string",
  • "tenant_id": "string",
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Delete a tenant notice

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

noticeID
required
string

Notice ID

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

tenants

List tenants (superuser)

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{ }

Get tenant summary (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

Responses

Response samples

Content type
application/json
{ }

List tenant overrides (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 200)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{ }

List role overrides for a tenant (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 200)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{ }

List roles for a tenant (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

Responses

Response samples

Content type
application/json
{ }

List users for a tenant (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 1000)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{ }

audit

List audit events for a tenant (admin)

Authorizations:
BearerAuth
path Parameters
tenantID
required
string

Tenant ID

query Parameters
limit
integer

Page size (max 200)

cursor
string

Pagination cursor

Responses

Response samples

Content type
application/json
{ }

List audit events for a user

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "property1": [
    ],
  • "property2": [
    ]
}

analytics

Ingest analytics events

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

Ingest public (unauthenticated) analytics events

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

List analytics rollups

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "property1": [
    ],
  • "property2": [
    ]
}

Analytics rollup status

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "property1": [
    ],
  • "property2": [
    ]
}

List analytics event trails

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "property1": [
    ],
  • "property2": [
    ]
}

auth

Log in and receive a JWT

Request Body schema: application/json
required

Login request

email
string
password
string
tenant_name
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "tenant_name": "string"
}

Response samples

Content type
application/json
{
  • "is_superuser": true,
  • "roles": [
    ],
  • "tenant": {
    },
  • "token": "string",
  • "user": {
    }
}

Current session details

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "is_superuser": true,
  • "roles": [
    ],
  • "tenant": {
    },
  • "token": "string",
  • "user": {
    }
}

Reset password

Authorizations:
BearerAuth
Request Body schema: application/json
required

Reset password request

current_password
string
new_password
string

Responses

Request samples

Content type
application/json
{
  • "current_password": "string",
  • "new_password": "string"
}

Response samples

Content type
application/json
"string"

Create a tenant and admin account

Request Body schema: application/json
required

Signup request

email
string
password
string
tenant_name
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "tenant_name": "string"
}

Response samples

Content type
application/json
{
  • "is_superuser": true,
  • "roles": [
    ],
  • "tenant": {
    },
  • "token": "string",
  • "user": {
    }
}

health

Aggregated health rollup

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "checked_at": "string",
  • "ok": true,
  • "rollup": "string",
  • "services": [
    ],
  • "severity": "string"
}

API metrics summary

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "avg_duration_ms": 0,
  • "completed_last_hour": 0,
  • "duration_p50_ms": 0,
  • "duration_p95_ms": 0,
  • "failed_last_hour": 0,
  • "maintenance_tasks": {
    },
  • "queue_lag_seconds": 0,
  • "queued_jobs": 0,
  • "rbac_denials_24h": 0,
  • "running_jobs": 0,
  • "succeeded_last_hour": 0,
  • "success_rate_percent": 0
}

Public, sanitized health snapshot

Responses

Response samples

Content type
application/json
{
  • "checked_at": "string",
  • "ok": true,
  • "rollup": "string",
  • "services": [
    ]
}

Public, sanitized health history

Responses

Response samples

Content type
application/json
[
  • {
    }
]

jobs

List jobs for the tenant

Authorizations:
BearerAuth
query Parameters
limit
integer

Limit results (1-200)

state
string

Filter by state

type
string

Job type

q
string

Free text search

before
string

Return jobs created before ISO timestamp

Responses

Response samples

Content type
application/json
{
  • "jobs": [
    ]
}

Create a job

Authorizations:
BearerAuth
Request Body schema: application/json
required

Job request

idempotency_key
string
job_type
string
max_attempts
integer
params
Array of integers
object
trace_id
string

Responses

Request samples

Content type
application/json
{
  • "idempotency_key": "string",
  • "job_type": "string",
  • "max_attempts": 0,
  • "params": [
    ],
  • "secrets": {
    },
  • "trace_id": "string"
}

Response samples

Content type
application/json
{
  • "attempt": 0,
  • "created_at": "string",
  • "created_by": "string",
  • "finished_at": "string",
  • "heartbeat_at": "string",
  • "id": "string",
  • "idempotency_key": "string",
  • "max_attempts": 0,
  • "params": null,
  • "result": null,
  • "started_at": "string",
  • "state": "string",
  • "tenant_id": "string",
  • "trace_id": "string",
  • "type": "string"
}

Stream tenant job events (SSE)

Authorizations:
BearerAuth

Responses

List configured job types

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "types": [
    ]
}

Fetch a job

Authorizations:
BearerAuth
path Parameters
jobID
required
string

Job ID

Responses

Response samples

Content type
application/json
{
  • "attempt": 0,
  • "created_at": "string",
  • "created_by": "string",
  • "finished_at": "string",
  • "heartbeat_at": "string",
  • "id": "string",
  • "idempotency_key": "string",
  • "max_attempts": 0,
  • "params": null,
  • "result": null,
  • "started_at": "string",
  • "state": "string",
  • "tenant_id": "string",
  • "trace_id": "string",
  • "type": "string"
}

Cancel a job

Authorizations:
BearerAuth
path Parameters
jobID
required
string

Job ID

Responses

Response samples

Content type
application/json
{
  • "attempt": 0,
  • "created_at": "string",
  • "created_by": "string",
  • "finished_at": "string",
  • "heartbeat_at": "string",
  • "id": "string",
  • "idempotency_key": "string",
  • "max_attempts": 0,
  • "params": null,
  • "result": null,
  • "started_at": "string",
  • "state": "string",
  • "tenant_id": "string",
  • "trace_id": "string",
  • "type": "string"
}

Stream job events (SSE)

Authorizations:
BearerAuth
path Parameters
jobID
required
string

Job ID

Responses

retention

List retention policies for a tenant

Authorizations:
BearerAuth
query Parameters
tenant_id
string

Tenant ID (superuser only; defaults to caller's tenant)

Responses

Response samples

Content type
application/json
{
  • "policies": [
    ]
}

Get a retention policy for a domain

Authorizations:
BearerAuth
path Parameters
domain
required
string

Retention domain

query Parameters
tenant_id
string

Tenant ID (superuser only; defaults to caller's tenant)

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Set retention window for a domain/tenant

Authorizations:
BearerAuth
path Parameters
domain
required
string

Retention domain

query Parameters
tenant_id
string

Tenant ID (superuser only; defaults to caller's tenant)

Request Body schema: application/json
required

Desired window (allowed set from schema; 0=indefinite)

window_days
integer

Responses

Request samples

Content type
application/json
{
  • "window_days": 0
}

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Clear retention override for a domain/tenant

Authorizations:
BearerAuth
path Parameters
domain
required
string

Retention domain

query Parameters
tenant_id
string

Tenant ID (superuser only; defaults to caller's tenant)

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Retention status by domain

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "domains": [
    ]
}

users

Get user detail

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{ }