Mounts a file dynamically during a running session. The server creates an internal copy of the file and prefixes the mount path with /mnt/session/uploads/. This operation does not produce session events.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /sessions/{session_id}/resources
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
session_id | Yes | string | Session ID, format sesn_<ULID> |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
type | Yes | string | Resource type, always file |
file_id | Yes | string | ID of the uploaded file |
mount_path | Yes | string | Mount path, starting with /uploads |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Resource ID, format sesrsc_<ULID> |
type | string | Resource type, always file |
file_id | string | File ID of the internal copy; differs from the file_id in the request |
mount_path | string | Full mount path within the session |
created_at | string | Creation time, ISO 8601 |
updated_at | string | Last update time, ISO 8601 |
request_id | string | Unique request identifier |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid |
| 401 | InvalidApiKey | Invalid API key provided |