Share feedback
Answers are generated based on the documentation.

Experimental

DeleteImage deletes an image; deleting an already absent image succeeds.

DELETE/v1/images/{image}
DeleteImage deletes an image; deleting an already absent image succeeds.

Connection and access

API connection and authentication guidance

https://connect.docker.com/sandboxes — The API base URL. Append the /v1 paths while preserving this URL's path prefix.

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

  • bearer

Parameters

image path Required

The image id.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

If-Match header Required

The complete quoted strong entity-tag observed on the resource, including its quotes. Every mutation of an existing resource requires it: an absent value answers 428 and a stale one 412, each carrying failedPrecondition in the body.

Type: string

etag is the required precondition, the value the target's last read returned. An absent one refuses etag_required and a stale one etag_mismatch.
All schema constraints and annotations
{
  "description": "etag is the required precondition, the value the target's last read returned.\nAn absent one refuses etag_required and a stale one etag_mismatch.",
  "title": "If-Match",
  "type": "string"
}

Request and responses

Response 204

Success. The response carries no body.

No response content is declared.

Response 409

The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state.

An admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held.

application/json

Schema: Error

deletion_content_lease_held

{
  "code": "failedPrecondition",
  "message": "deletion_content_lease_held: An admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held."
}

deletion_preparation_incomplete

{
  "code": "failedPrecondition",
  "message": "deletion_preparation_incomplete: The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state."
}

Response 412

The precondition is not the resource's current etag. The body carries failedPrecondition naming etag_mismatch and an EtagMismatch detail with the current value.

application/json

Schema: Error

etag_mismatch

{
  "code": "failedPrecondition",
  "details": [
    {
      "@type": "type.googleapis.com/docker.sandboxes.v1.EtagMismatch",
      "currentEtag": "v2"
    }
  ],
  "message": "etag_mismatch: The precondition is not the resource's current etag. The body carries failedPrecondition naming etag_mismatch and an EtagMismatch detail with the current value."
}

Response 428

No precondition was sent. The body carries failedPrecondition naming etag_required.

application/json

Schema: Error

etag_required

{
  "code": "failedPrecondition",
  "message": "etag_required: No precondition was sent. The body carries failedPrecondition naming etag_required."
}

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

Complete operation contract
{
  "description": "DeleteImage deletes an image; deleting an already absent image succeeds.",
  "operationId": "deleteImage",
  "parameters": [
    {
      "description": "The image id.",
      "in": "path",
      "name": "image",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "The complete quoted strong entity-tag observed on the resource, including its quotes. Every mutation of an existing resource requires it: an absent value answers 428 and a stale one 412, each carrying failedPrecondition in the body.",
      "in": "header",
      "name": "If-Match",
      "required": true,
      "schema": {
        "description": "etag is the required precondition, the value the target's last read returned.\nAn absent one refuses etag_required and a stale one etag_mismatch.",
        "title": "If-Match",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Success. The response carries no body."
    },
    "409": {
      "content": {
        "application/json": {
          "examples": {
            "deletion_content_lease_held": {
              "summary": "An admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held.",
              "value": {
                "code": "failedPrecondition",
                "message": "deletion_content_lease_held: An admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held."
              }
            },
            "deletion_preparation_incomplete": {
              "summary": "The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state.",
              "value": {
                "code": "failedPrecondition",
                "message": "deletion_preparation_incomplete: The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state."
              }
            }
          },
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state.\n\nAn admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held."
    },
    "412": {
      "content": {
        "application/json": {
          "examples": {
            "etag_mismatch": {
              "summary": "The precondition is not the resource's current etag. The body carries failedPrecondition naming etag_mismatch and an EtagMismatch detail with the current value.",
              "value": {
                "code": "failedPrecondition",
                "details": [
                  {
                    "@type": "type.googleapis.com/docker.sandboxes.v1.EtagMismatch",
                    "currentEtag": "v2"
                  }
                ],
                "message": "etag_mismatch: The precondition is not the resource's current etag. The body carries failedPrecondition naming etag_mismatch and an EtagMismatch detail with the current value."
              }
            }
          },
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "The precondition is not the resource's current etag. The body carries failedPrecondition naming etag_mismatch and an EtagMismatch detail with the current value."
    },
    "428": {
      "content": {
        "application/json": {
          "examples": {
            "etag_required": {
              "summary": "No precondition was sent. The body carries failedPrecondition naming etag_required.",
              "value": {
                "code": "failedPrecondition",
                "message": "etag_required: No precondition was sent. The body carries failedPrecondition naming etag_required."
              }
            }
          },
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "No precondition was sent. The body carries failedPrecondition naming etag_required."
    },
    "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": [
    {
      "bearer": []
    }
  ],
  "summary": "DeleteImage deletes an image; deleting an already absent image succeeds.",
  "tags": [
    "Images"
  ],
  "x-sbx-authenticated-only": false,
  "x-sbx-conditional-permissions": [],
  "x-sbx-error-responses": [
    {
      "code": "FAILED_PRECONDITION",
      "description": "The target's preparation, capture, or import has not finished; deletion is refused until it settles to a terminal state.",
      "reason": "deletion_preparation_incomplete"
    },
    {
      "code": "FAILED_PRECONDITION",
      "description": "An admitted consumer or live resource holds a content lease on the target; deletion is refused while any lease remains held.",
      "reason": "deletion_content_lease_held"
    }
  ],
  "x-sbx-plane": "control",
  "x-sbx-required-permissions": [
    "imagesWrite"
  ],
  "x-sbx-serving-surface": "management"
}