Share feedback
Answers are generated based on the documentation.

Experimental

Remove deletes a path.

DELETE/v1/files
Remove deletes a path. Removing an absent path succeeds. A nonrecursive removal of a nonempty directory returns FAILED_PRECONDITION unchanged. A recursive removal that stops partway still answers OK: check RemoveResponse.failed_path, not the operation status. Removed paths stay removed.

Connection and access

API connection and authentication guidance

{endpoint}

endpoint: The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control.

Use one of these alternatives. Requirements within an alternative apply together.

  • sandboxBearer

Parameters

path query Required

path is the sandbox path to remove.

Type: string

All schema constraints and annotations
{
  "minLength": 1,
  "title": "path",
  "type": "string"
}

recursive query

recursive removes directory contents when true.

Type: boolean

All schema constraints and annotations
{
  "title": "recursive",
  "type": "boolean"
}

Request and responses

Response 200

Success

application/json

Schema: FilesRemoveResponse

Response default

The structured Error body identifies the failure with a stable code and optional typed details.

application/json

Schema: Error

Schema example

{
  "code": "notFound",
  "details": [],
  "message": "sandbox not found"
}

Referenced schemas

#/components/schemas/Error

#/components/schemas/FilesRemoveResponse

Complete operation contract
{
  "description": "Remove deletes a path. Removing an absent path succeeds. A nonrecursive\nremoval of a nonempty directory returns FAILED_PRECONDITION unchanged.\nA recursive removal that stops partway still answers OK: check\nRemoveResponse.failed_path, not the operation status. Removed paths stay removed.",
  "operationId": "remove",
  "parameters": [
    {
      "description": "path is the sandbox path to remove.",
      "in": "query",
      "name": "path",
      "required": true,
      "schema": {
        "minLength": 1,
        "title": "path",
        "type": "string"
      }
    },
    {
      "description": "recursive removes directory contents when true.",
      "in": "query",
      "name": "recursive",
      "required": false,
      "schema": {
        "title": "recursive",
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FilesRemoveResponse"
          }
        }
      },
      "description": "Success"
    },
    "default": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "The structured Error body identifies the failure with a stable code and optional typed details."
    }
  },
  "security": [
    {
      "sandboxBearer": []
    }
  ],
  "servers": [
    {
      "url": "{endpoint}",
      "variables": {
        "endpoint": {
          "default": "https://sandbox.invalid",
          "description": "The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control."
        }
      }
    }
  ],
  "summary": "Remove deletes a path.",
  "tags": [
    "Files"
  ],
  "x-sbx-authenticated-only": false,
  "x-sbx-conditional-permissions": [],
  "x-sbx-plane": "data",
  "x-sbx-required-permissions": [
    "sandboxesFilesWrite"
  ],
  "x-sbx-serving-surface": "sandboxEndpoint"
}