POST /api/v1/cloud/sessions/{session_id}/resources
Attaches one file resource to an existing Session. GitHub repository and Memory Store resources are attached when creating the Session; this add endpoint accepts only type: "file".
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID with the sess_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "file" |
file_id | string | Yes | File ID obtained from the Files API. The file must be ready |
mount_path | string | null | No | Mount path. Defaults to /mnt/session/uploads/<file_id> |
Example request
Example response
HTTP 200 OKErrors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Malformed request, unsupported type, missing file_id, or invalid mount path |
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Session or file does not exist |
| 409 | invalid_request_error | Session is archived or terminated, file is not ready, or the file is already attached to this session |
Related
Start a session
Run an agent against an environment as a stateful conversation.