Ratel Docs
ReferenceHTTP API

Catalog

Pull the published skill catalog, sync a runtime's tools, and read description overrides.

The catalog endpoints keep a runtime and the Platform in step. A runtime pulls skills, pushes its tool list, and pulls the descriptions you edit in the console.

The three GET endpoints support conditional requests. Send the last ETag as If-None-Match, and an unchanged result answers 304 Not Modified with no body. Every response carries Cache-Control: no-cache.

GET /v1/catalog

Returns the project's published skills, for a runtime to load.

  • Method and path: GET /v1/catalog (alias /api/v1/catalog)
  • Auth: bearer API key with catalog:read

Request

ParameterInNotes
scopequeryOptional end-user ID. Adds that end user's published skills to the global ones. On a name clash, the end user's skill wins.
If-None-MatchheaderOptional. The ETag of your cached copy.

Without scope, only global skills are served: published skills with no end user.

curl -s -i https://cloud.ratel.sh/v1/catalog \
  -H "Authorization: Bearer $RATEL_API_KEY" \
  -H 'If-None-Match: "3f2a9c...e71b"'

Response

200 with an ETag header, or 304 with an empty body when your copy is current. Skills are sorted by id.

{
  "catalogVersion": "3f2a9c...e71b",
  "skills": [
    {
      "id": "triage-ticket",
      "name": "triage-ticket",
      "description": "Sort a new support ticket by product area and urgency.",
      "tags": ["support"],
      "tools": ["search_tickets", "update_ticket"],
      "metadata": { "team": ["support"] },
      "body": "# Triage a ticket\n\n1. Read the ticket..."
    }
  ]
}
  • id is the skill's name, not its stored ID.
  • catalogVersion is the SHA-256 of the served set. The ETag is the same value in quotes.

Errors

The catalog endpoints answer { "error": { "code", "message" } }.

StatusCodeCause
401unauthorizedMissing, invalid, revoked or expired key.
403forbiddenThe key does not have catalog:read.
503unavailableThe database is not configured.

GET /v2/catalog

Same as /v1/catalog, with each skill's searchable description.

  • Method and path: GET /v2/catalog (alias /api/v2/catalog)
  • Auth: bearer API key with catalog:read

The request, headers and errors are the same as v1. Each skill adds searchableDescription: the text the runtime matches queries against, or null to match on description.

curl -s https://cloud.ratel.sh/v2/catalog \
  -H "Authorization: Bearer $RATEL_API_KEY"
{
  "catalogVersion": "9b04d1...a2c7",
  "skills": [
    {
      "id": "triage-ticket",
      "name": "triage-ticket",
      "description": "Sort a new support ticket by product area and urgency.",
      "searchableDescription": "triage classify route new support ticket urgency",
      "tags": ["support"],
      "tools": ["search_tickets", "update_ticket"],
      "metadata": { "team": ["support"] },
      "body": "# Triage a ticket\n\n1. Read the ticket..."
    }
  ]
}

The v2 catalogVersion differs from the v1 one for the same skills. Keep a separate cache per version.

PUT /api/v1/catalog/snapshot

Replaces the full tool list of one runtime source on the Platform.

  • Method and path: PUT /api/v1/catalog/snapshot. There is no /v1/catalog/snapshot alias.
  • Auth: bearer API key with catalog:write

Request

Content-Type: application/json, up to 4 MB.

FieldTypeNotes
source_idstringRequired. The runtime this list belongs to. Up to 512 characters. sourceId also works.
toolsarrayRequired. Up to 5,000 tools. The list replaces this source's previous one.
tools[].namestringRequired. Up to 512 characters.
tools[].idstringDefaults to name. Must be unique in the list.
tools[].descriptionstringWhat the agent reads. Up to 16,384 characters.
tools[].searchable_descriptionstringOptional. What Ratel matches queries against. Up to 16,384 characters.
tools[].input_schemaobjectOptional. inputSchema or parameters also work.
tools[].output_schemaobjectOptional.
tools[].metadataobjectOptional.
curl -s -X PUT https://cloud.ratel.sh/api/v1/catalog/snapshot \
  -H "Authorization: Bearer $RATEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_id": "my-agent",
    "tools": [
      {
        "name": "add_task_comment",
        "description": "Comment on a task.",
        "input_schema": { "type": "object", "properties": { "task_id": { "type": "string" } } }
      }
    ]
  }'

Response

200 with an ETag header:

{
  "sourceId": "my-agent",
  "catalogVersion": "c81e72...04d9",
  "tools": 1,
  "unchanged": false
}

unchanged is true when the list matches the stored one exactly.

Errors

StatusCause
400Malformed snapshot: a missing field, a value over its limit, or a duplicate tool ID.
401Missing, invalid, revoked or expired key.
403The key does not have catalog:write.
413Body over 4 MB.
415Content-Type is not application/json.
429Over 20 requests a minute for this key (bursts up to 40). Carries Retry-After.
500The Platform failed to store the snapshot. Retry.
503The database is not configured.

GET /v1/runtime-catalog/overrides

Returns the searchable descriptions you replaced in the console, for the runtime to apply.

  • Method and path: GET /v1/runtime-catalog/overrides (alias /api/v1/runtime-catalog/overrides)
  • Auth: bearer API key with runtime_catalog:read

Request

No parameters. Send If-None-Match to get 304 when nothing changed.

curl -s https://cloud.ratel.sh/v1/runtime-catalog/overrides \
  -H "Authorization: Bearer $RATEL_API_KEY"

Response

200 with an ETag header, sorted by kind, then entryId:

{
  "overrides": [
    {
      "kind": "tool",
      "entryId": "add_task_comment",
      "searchableDescription": "comment note update progress on a task"
    }
  ]
}

kind is tool, skill or fact. Each pull, 304 included, is recorded as proof that the runtime reads its overrides.

Errors

StatusCause
401Missing, invalid, revoked or expired key.
403The key does not have runtime_catalog:read.
503The database is not configured.

On this page