agent-swarm.devagent-swarm.dev

Pages

Create, version, launch, and render DB-backed pages — build interactive dashboards and static artifacts served by the swarm

DELETE/@swarm/api/{path}

Response Body

application/json

curl -X DELETE "http://localhost:3013/@swarm/api/{path}"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/@swarm/api/{path}

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/@swarm/api/{path}"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH/@swarm/api/{path}

Response Body

application/json

curl -X PATCH "http://localhost:3013/@swarm/api/{path}"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST/@swarm/api/{path}

Response Body

application/json

curl -X POST "http://localhost:3013/@swarm/api/{path}"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
PUT/@swarm/api/{path}

Response Body

application/json

curl -X PUT "http://localhost:3013/@swarm/api/{path}"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/@swarm/realtime.js

Response Body

curl -X GET "http://localhost:3013/@swarm/realtime.js"
Empty
GET/api/design-system

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

curl -X GET "http://localhost:3013/api/design-system"
{
  "status": "none",
  "designSystem": {
    "v": 1,
    "status": "active",
    "basePreset": "string",
    "tokens": {
      "light": {
        "property1": "string",
        "property2": "string"
      },
      "dark": {
        "property1": "string",
        "property2": "string"
      }
    },
    "fontsHref": "string",
    "logo": {
      "url": "string",
      "alt": "string"
    },
    "mode": "viewer",
    "chartPalette": [
      "string"
    ],
    "source": {
      "kind": "manual",
      "ref": "string",
      "extractedAt": "string"
    },
    "updatedBy": "string",
    "updatedByAgentId": "string",
    "updatedAt": "string"
  },
  "invalidReason": "string",
  "previous": {
    "v": 1,
    "status": "active",
    "basePreset": "string",
    "tokens": {
      "light": {
        "property1": "string",
        "property2": "string"
      },
      "dark": {
        "property1": "string",
        "property2": "string"
      }
    },
    "fontsHref": "string",
    "logo": {
      "url": "string",
      "alt": "string"
    },
    "mode": "viewer",
    "chartPalette": [
      "string"
    ],
    "source": {
      "kind": "manual",
      "ref": "string",
      "extractedAt": "string"
    },
    "updatedBy": "string",
    "updatedByAgentId": "string",
    "updatedAt": "string"
  }
}
PUT/api/design-system

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "http://localhost:3013/api/design-system" \  -H "Content-Type: application/json" \  -d '{}'
{
  "designSystem": {
    "v": 1,
    "status": "active",
    "basePreset": "string",
    "tokens": {
      "light": {
        "property1": "string",
        "property2": "string"
      },
      "dark": {
        "property1": "string",
        "property2": "string"
      }
    },
    "fontsHref": "string",
    "logo": {
      "url": "string",
      "alt": "string"
    },
    "mode": "viewer",
    "chartPalette": [
      "string"
    ],
    "source": {
      "kind": "manual",
      "ref": "string",
      "extractedAt": "string"
    },
    "updatedBy": "string",
    "updatedByAgentId": "string",
    "updatedAt": "string"
  },
  "ignoredTokens": [
    "string"
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/pages

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

agentId?string
Length1 <= length
key?string

Non-unique asset directory namespace (for example shared/ or personal//drafts/). Runtime write boundaries normalize and validate the canonical form.

Length1 <= length <= 255
keyPrefix?string

Non-unique asset directory namespace (for example shared/ or personal//drafts/). Runtime write boundaries normalize and validate the canonical form.

Length1 <= length <= 255
q?string
Length1 <= length <= 200
limit?integer
Range1 <= value <= 500
offset?|
Range0 <= value
fields?string
Value in"full" | "slim"

Response Body

application/json

curl -X GET "http://localhost:3013/api/pages"
{
  "pages": [
    {
      "id": "string",
      "key": "string",
      "agentId": "string",
      "slug": "string",
      "title": "string",
      "description": "string",
      "contentType": "text/html",
      "authMode": "public",
      "passwordHash": "string",
      "body": "string",
      "needsCredentials": [
        "string"
      ],
      "theme": "string",
      "themeTokens": {
        "light": {
          "property1": "string",
          "property2": "string"
        },
        "dark": {
          "property1": "string",
          "property2": "string"
        }
      },
      "designVersion": 1,
      "viewCount": 0,
      "createdAt": "string",
      "updatedAt": "string",
      "favorite": true,
      "api_url": "string",
      "app_url": "string"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}
POST/api/pages

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/pages" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "contentType": "text/html",    "body": "string"  }'
{
  "id": "string",
  "key": "string",
  "version": 1,
  "api_url": "string",
  "app_url": "string",
  "ignoredTokens": [
    "string"
  ],
  "designVersion": 1
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
DELETE/api/pages/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "http://localhost:3013/api/pages/string"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/pages/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/pages/string"
{
  "id": "string",
  "key": "string",
  "agentId": "string",
  "slug": "string",
  "title": "string",
  "description": "string",
  "contentType": "text/html",
  "authMode": "public",
  "passwordHash": "string",
  "body": "string",
  "needsCredentials": [
    "string"
  ],
  "theme": "string",
  "themeTokens": {
    "light": {
      "property1": "string",
      "property2": "string"
    },
    "dark": {
      "property1": "string",
      "property2": "string"
    }
  },
  "designVersion": 1,
  "viewCount": 0,
  "createdAt": "string",
  "updatedAt": "string",
  "favorite": true,
  "api_url": "string",
  "app_url": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PUT/api/pages/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:3013/api/pages/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "key": "string",
  "version": 1,
  "ignoredTokens": [
    "string"
  ],
  "designVersion": 1
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST/api/pages/{id}/feedback

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/pages/string/feedback" \  -H "Content-Type: application/json" \  -d '{    "comments": [      {        "selector": "string",        "comment": "string"      }    ]  }'
{
  "taskId": "string",
  "status": "string",
  "agentId": "string",
  "task_url": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST/api/pages/{id}/launch

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/pages/string/launch"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/pages/{id}/versions

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/pages/string/versions"
{
  "versions": [
    {
      "id": "string",
      "pageId": "string",
      "version": 1,
      "snapshot": {
        "title": "string",
        "description": "string",
        "contentType": "text/html",
        "authMode": "public",
        "passwordHash": "string",
        "body": "string",
        "needsCredentials": [
          "string"
        ],
        "theme": "string",
        "themeTokens": {
          "light": {
            "property1": "string",
            "property2": "string"
          },
          "dark": {
            "property1": "string",
            "property2": "string"
          }
        },
        "designVersion": 1
      },
      "changedByAgentId": "string",
      "createdAt": "string"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/pages/{id}/versions/{version}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string
version*integer
Range1 <= value

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/pages/string/versions/1"
{
  "id": "string",
  "pageId": "string",
  "version": 1,
  "snapshot": {
    "title": "string",
    "description": "string",
    "contentType": "text/html",
    "authMode": "public",
    "passwordHash": "string",
    "body": "string",
    "needsCredentials": [
      "string"
    ],
    "theme": "string",
    "themeTokens": {
      "light": {
        "property1": "string",
        "property2": "string"
      },
      "dark": {
        "property1": "string",
        "property2": "string"
      }
    },
    "designVersion": 1
  },
  "changedByAgentId": "string",
  "createdAt": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/api/pages/actions

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

curl -X GET "http://localhost:3013/api/pages/actions"
{
  "actions": [
    {
      "name": "string",
      "description": "string",
      "params": {
        "property1": null,
        "property2": null
      },
      "sdkMethods": [
        "string"
      ]
    }
  ]
}
GET/api/pages/resolve

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

slug*string
Length1 <= length
agentId?string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/pages/resolve?slug=string"
{
  "id": "string",
  "key": "string",
  "agentId": "string",
  "slug": "string",
  "title": "string",
  "description": "string",
  "contentType": "text/html",
  "authMode": "public",
  "passwordHash": "string",
  "body": "string",
  "needsCredentials": [
    "string"
  ],
  "theme": "string",
  "themeTokens": {
    "light": {
      "property1": "string",
      "property2": "string"
    },
    "dark": {
      "property1": "string",
      "property2": "string"
    }
  },
  "designVersion": 1,
  "viewCount": 0,
  "createdAt": "string",
  "updatedAt": "string",
  "favorite": true,
  "api_url": "string",
  "app_url": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/p/{id}

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:3013/p/string"
Empty
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET/p/{id}.json

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3013/p/string.json"
{
  "id": "string",
  "title": "string",
  "description": "string",
  "contentType": "text/html",
  "authMode": "public",
  "body": "string",
  "version": 1
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}