Delete Session Resource
Updated at:
Unmounts a resource from a session and clears its internal copy. This operation cannot be undone.
Prerequisites
Endpoint and authentication configured. For details, see API overview and authentication.
Endpoint
DELETE /sessions/{session_id}/resources/{resource_id}
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
session_id | Yes | string | Session ID, format sesn_<ULID> |
resource_id | Yes | string | Resource ID, format sesrsc_<ULID> |
Request example
curl -X DELETE "$AGENTSTUDIO_URL/sessions/sesn_xxx/resources/sesrsc_xxx" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
Response
{
"id": "sesrsc_xxx",
"type": "session_resource_deleted",
"request_id": "xxx"
}
Response fields
| Field | Type | Description |
|---|---|---|
id | string | ID of the unmounted resource |
type | string | Always session_resource_deleted, indicating successful unmount |
request_id | string | Unique identifier of this request |
Error codes
| Status code | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |
Is this page helpful?