agent-swarm.devagent-swarm.dev

Objects

Objects API endpoints

GET/api/objects/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Object id (swarm.id in the file)

Formatuuid

Query Parameters

knownVersion?|

The version the caller holds. A match answers unchanged: true with no content

Range0 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/objects/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "object": {
    "id": "string",
    "kind": "string",
    "orgId": "string",
    "driveId": "string",
    "path": "string",
    "title": "string",
    "fileVersion": 0,
    "ownerAgentId": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "link": "string"
  },
  "version": 0,
  "unchanged": true,
  "content": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PUT/api/objects/{id}/content

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Object id (swarm.id in the file)

Formatuuid

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

application/json

application/json

curl -X PUT "http://localhost:3013/api/objects/497f6eca-6276-4993-bfeb-53cbbbba6f08/content" \  -H "Content-Type: application/json" \  -d '{    "content": {      "property1": null,      "property2": null    },    "ifMatch": 0  }'
{
  "object": {
    "id": "string",
    "kind": "string",
    "orgId": "string",
    "driveId": "string",
    "path": "string",
    "title": "string",
    "fileVersion": 0,
    "ownerAgentId": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "link": "string"
  },
  "version": 0
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "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/objects/{id}/sheet-ops

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Object id (swarm.id in the file)

Formatuuid

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

application/json

curl -X POST "http://localhost:3013/api/objects/497f6eca-6276-4993-bfeb-53cbbbba6f08/sheet-ops" \  -H "Content-Type: application/json" \  -d '{    "op": "setRange",    "range": "string",    "values": [      [        0      ]    ]  }'
{
  "op": "setRange",
  "range": "string",
  "version": 0,
  "changed": 0,
  "recalculated": 0,
  "cleared": 0
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}