Experimental
DeletePort withdraws one published port.
DELETE
/v1/sandboxes/{sandbox}/ports/{port} DeletePort withdraws one published port. A name that is not published
succeeds, so a retried delete reports the same result as the first.
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
sandbox
path
Required
The sandbox id.
Type:
string
All schema constraints and annotations
{
"type": "string"
}port
path
Required
The port 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 identifies the publication version the caller intends to delete.
All schema constraints and annotations
{
"description": "etag identifies the publication version the caller intends to delete.",
"title": "If-Match",
"type": "string"
}Request and responses
Response
204
Success. The response carries no body.
No response content is declared.
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
Complete operation contract
{
"description": "DeletePort withdraws one published port. A name that is not published\nsucceeds, so a retried delete reports the same result as the first.",
"operationId": "deletePort",
"parameters": [
{
"description": "The sandbox id.",
"in": "path",
"name": "sandbox",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The port id.",
"in": "path",
"name": "port",
"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 identifies the publication version the caller intends to delete.",
"title": "If-Match",
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Success. The response carries no body."
},
"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": "DeletePort withdraws one published port.",
"tags": [
"Sandboxes"
],
"x-sbx-authenticated-only": false,
"x-sbx-conditional-permissions": [],
"x-sbx-plane": "control",
"x-sbx-required-permissions": [
"sandboxesPorts"
],
"x-sbx-serving-surface": "management"
}