AgentAttachment
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/attachments/{attachment_id}/complete |
create |
The upload is ready to send |
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/attachments |
create |
The upload, with the number and size of its parts |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
created, err := client.AgentAttachment(nil).Create(map[string]any{"agent_id": "example", "organization_id": "example", "byte_size": 1, "content_type": "example", "file_name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:AgentAttachment():create({ agent_id = "example", organization_id = "example", byte_size = 1, content_type = "example", file_name = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->AgentAttachment()->create(["agent_id" => "example", "organization_id" => "example", "byte_size" => 1, "content_type" => "example", "file_name" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.AgentAttachment().create({ "agent_id": "example", "organization_id": "example", "byte_size": 1, "content_type": "example", "file_name": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.AgentAttachment.create({ "agent_id" => "example", "organization_id" => "example", "byte_size" => 1, "content_type" => "example", "file_name" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.AgentAttachment().create({ agent_id: "example", organization_id: "example", byte_size: 1, content_type: "example", file_name: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
byte_size |
integer |
Yes | Byte Size |
content_type |
string |
Yes | Content Type |
file_name |
string |
Yes | File Name |
id |
string |
No | Id |
create
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/attachments/{attachment_id}/complete
Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_attachments_attachment_id_complete.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
attachment_id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
No | Fence a retained operation to its original authenticated user; never grants authority. |
Request body
application/json
The request body is object.
Responses
200: The upload is ready to send
application/json
| Property | Type | Required | Description |
|---|---|---|---|
byte_size |
integer |
Yes | |
content_type |
string |
Yes | |
file_name |
string |
Yes | |
id |
string |
Yes | |
part_count |
integer |
Yes | |
part_size |
integer |
Yes | |
status |
enum: pending, ready, purging |
Yes |
403: Agent messaging access unavailable
404: The upload does not belong to this sender
422: A part is missing
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/attachments
Operation ID: spark_attachments_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
No | Fence a retained operation to its original authenticated user; never grants authority. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
byte_size |
integer |
Yes | |
content_type |
string |
Yes | |
file_name |
string |
Yes |
Responses
201: The upload, with the number and size of its parts
application/json
| Property | Type | Required | Description |
|---|---|---|---|
byte_size |
integer |
Yes | |
content_type |
string |
Yes | |
file_name |
string |
Yes | |
id |
string |
Yes | |
part_count |
integer |
Yes | |
part_size |
integer |
Yes | |
status |
enum: pending, ready, purging |
Yes |