Apis

REST endpoints for apis. Bearer-auth required.

GET /api/apis

List APIs.

Query parameters

  • limit (optional): Page size (1–100, default 100).
  • after (optional): Keyset cursor — return the page after this row (next page).
  • before (optional): Keyset cursor — return the page before this row (prev page).
  • ids (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
  • filter (optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
  • orderBy (optional): Multi-key sort (<Entity>OrderBy[]): array of { field: direction } applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
  • workspace_id (optional):
  • include_deleted (optional): Soft-deleted api visibility. false (default) — active rows only. true — active plus soft-deleted. only — soft-deleted only (trash view).
  • name (optional): Case-insensitive substring match on name.
  • source (optional): Narrow by source. workspace = this workspace's APIs plus those visible via installed integrations; integration = only APIs made visible by installed integrations; omit = union.
  • enabled (optional): Shorthand: filter where enabled equals this value.
  • created_by (optional): Shorthand: filter where createdBy equals this value.

Response

JSON
{
  "data": [
    {
      "id": "<...>",
      "workspaceId": "<...>",
      "handle": "<...>",
      "name": "<...>",
      "description": "<...>",
      "auth": "<...>",
      "cors": "<...>",
      "rateLimit": "<...>",
      "enabled": "<...>",
      "createdBy": "<...>",
      "createdAt": "<...>",
      "updatedAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}

POST /api/apis

Create api

Request body

JSON
{
  "workspaceId": "string",
  "handle": "string",
  "name": "string",
  "description?": "string",
  "auth": "any",
  "cors?": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit?": {
    "perMinute": "integer"
  },
  "enabled?": "boolean"
}

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "handle": "string",
  "name": "string",
  "description": "string",
  "auth": "any",
  "cors": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit": {
    "perMinute": "integer"
  },
  "enabled": "boolean",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

GET /api/apis/{id}

Get a single API by ID.

Path parameters

  • id (required): Api to retrieve.

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "handle": "string",
  "name": "string",
  "description": "string",
  "auth": "any",
  "cors": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit": {
    "perMinute": "integer"
  },
  "enabled": "boolean",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

PATCH /api/apis/{id}

Update api

Path parameters

  • id (required): The api's prefixed ID.

Request body

JSON
{
  "handle?": "string",
  "name?": "string",
  "description?": "string",
  "auth?": "any",
  "cors?": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit?": {
    "perMinute": "integer"
  },
  "enabled?": "boolean"
}

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "handle": "string",
  "name": "string",
  "description": "string",
  "auth": "any",
  "cors": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit": {
    "perMinute": "integer"
  },
  "enabled": "boolean",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

DELETE /api/apis/{id}

Delete api

Soft-delete an api. Refuses to delete an api that has endpoints unless cascade=true is passed. Returns 409 otherwise. Restore via POST /api/apis/{id}/restore before retention expires.

Path parameters

  • id (required): The api's prefixed ID.

Query parameters

  • cascade (optional): Cascade-delete child endpoints.

Response

JSON
{
  "success": "boolean"
}

DELETE /api/apis/{id}/purge

Permanently delete a soft-deleted API.

Path parameters

  • id (required): Soft-deleted api to permanently delete.

Response

JSON
{
  "success": "boolean"
}

POST /api/apis/{id}/restore

Restore a soft-deleted API.

Path parameters

  • id (required): Soft-deleted api to restore.

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "handle": "string",
  "name": "string",
  "description": "string",
  "auth": "any",
  "cors": {
    "allowOrigins": ["<...>"],
    "allowCredentials?": "boolean"
  },
  "rateLimit": {
    "perMinute": "integer"
  },
  "enabled": "boolean",
  "createdBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}