agent-swarm.devagent-swarm.dev

Assets

Assets API endpoints

GET
/api/assets

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

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
types?string

Comma-separated task,workflow,schedule,page,app,script,file list

limit?integer
Range1 <= value <= 1000

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/assets"
{
  "assets": [
    {
      "entityType": "task",
      "id": "string",
      "key": "string",
      "label": "string",
      "updatedAt": "string",
      "providerRef": {
        "providerId": "string",
        "orgId": "string",
        "driveId": "string",
        "providerKey": "string"
      }
    }
  ],
  "count": 0
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH
/api/assets/{entityType}/{id}/key

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

entityType*string
Value in"task" | "workflow" | "schedule" | "page" | "app" | "script" | "file"
id*string
Length1 <= length

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 PATCH "http://localhost:3013/api/assets/task/string/key" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
{
  "entityType": "task",
  "id": "string",
  "key": "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
}
PATCH
/api/assets/app/{id}/key

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string
Length1 <= length

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 PATCH "http://localhost:3013/api/assets/app/string/key" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
{
  "entityType": "task",
  "id": "string",
  "key": "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
}
GET
/api/assets/key-audit

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/assets/key-audit"
{
  "ok": true,
  "structuralValid": true,
  "checked": 0,
  "fatalCount": 0,
  "warningCount": 0,
  "issues": [
    {
      "severity": "fatal",
      "code": "missing-key",
      "entityType": "task",
      "entityId": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/assets/mappings

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/assets/mappings" \  -H "Content-Type: application/json" \  -d '{    "providerId": "string",    "providerKey": "string"  }'
{
  "id": "string",
  "providerId": "string",
  "providerOrgId": "string",
  "providerDriveId": "string",
  "providerKey": "string",
  "key": "string",
  "sourceEntityType": "task-attachment",
  "sourceEntityId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "updatedBy": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH
/api/assets/script/{id}/key

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string
Length1 <= length

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 PATCH "http://localhost:3013/api/assets/script/string/key" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
{
  "entityType": "task",
  "id": "string",
  "key": "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
}