API ReferenceSessions (prev Tool Router)
Delete a file from a session mountv3.1
Deletes a file from a workbench session storage mount. Deleting a non-existent file succeeds silently (idempotent).
Authorization
ApiKeyAuth x-api-key<token>
Project API key authentication
In: header
Path Parameters
session_idstringRequired
The unique identifier of the tool router session
Format:
toolRouterSessionIdmount_idstringRequired
ID of the storage mount
Request Body
application/json
mount_relative_pathstringRequired
Relative file path within the mount
Response Body
application/json
application/json
application/json
application/json
application/json
import requestsurl = "https://example.com/api/v3.1/tool_router/session/trs_1a2b3c4d5e6f/mounts/files/delete"body = """{ "mount_relative_path": "report.pdf"}"""response = requests.request("POST", url, data = body, headers = { "Content-Type": "application/json"})print(response.text){ "mount_relative_path": "string", "sandbox_mount_prefix": "string"}