Share feedback
Answers are generated based on the documentation.

Experimental

CreateEndpointCredential grants short-lived access to one sandbox endpoint.

POST/v1/sandboxes/{sandbox}/endpoint-credentials
CreateEndpointCredential grants short-lived access to one sandbox endpoint. Issuance checks current authority and never stores a token in the replay ledger.

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"
}

Request and responses

Request

application/json

Type: object

CreateEndpointCredentialRequest requests only endpoint permissions the caller holds.
permissions · required

Type: array

Allowed values: sandboxesExec, sandboxesFilesRead, sandboxesFilesWrite.
Array item

Schema: Permission

All schema constraints and annotations
{
  "$ref": "#/components/schemas/Permission",
  "enum": [
    "sandboxesExec",
    "sandboxesFilesRead",
    "sandboxesFilesWrite"
  ]
}
All schema constraints and annotations
{
  "description": "Allowed values: sandboxesExec, sandboxesFilesRead, sandboxesFilesWrite.",
  "items": {
    "$ref": "#/components/schemas/Permission",
    "enum": [
      "sandboxesExec",
      "sandboxesFilesRead",
      "sandboxesFilesWrite"
    ]
  },
  "minItems": 1,
  "type": "array",
  "uniqueItems": true
}
ttl

Schema: Duration

ttl defaults to five minutes; supplied durations are clamped to one second through five minutes.
All schema constraints and annotations
{
  "$ref": "#/components/schemas/Duration",
  "description": "ttl defaults to five minutes; supplied durations are clamped to one second through five minutes."
}
All schema constraints and annotations
{
  "additionalProperties": false,
  "description": "CreateEndpointCredentialRequest requests only endpoint permissions the caller holds.",
  "properties": {
    "permissions": {
      "description": "Allowed values: sandboxesExec, sandboxesFilesRead, sandboxesFilesWrite.",
      "items": {
        "$ref": "#/components/schemas/Permission",
        "enum": [
          "sandboxesExec",
          "sandboxesFilesRead",
          "sandboxesFilesWrite"
        ]
      },
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "ttl": {
      "$ref": "#/components/schemas/Duration",
      "description": "ttl defaults to five minutes; supplied durations are clamped to one second through five minutes."
    }
  },
  "required": [
    "permissions"
  ],
  "title": "CreateEndpointCredentialRequest",
  "type": "object"
}

Response 200

Success

application/json

Headers

Cache-Control

{
  "required": true,
  "schema": {
    "const": "no-store",
    "type": "string"
  }
}

Schema: EndpointCredential

Response default

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

application/json

Headers

Cache-Control

{
  "required": true,
  "schema": {
    "enum": [
      "no-store"
    ],
    "type": "string"
  }
}

Schema: Error

Schema example

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

Referenced schemas

#/components/schemas/Duration

#/components/schemas/EndpointCredential

#/components/schemas/Error

#/components/schemas/Permission

Complete operation contract
{
  "description": "CreateEndpointCredential grants short-lived access to one sandbox endpoint.\nIssuance checks current authority and never stores a token in the replay ledger.",
  "operationId": "createEndpointCredential",
  "parameters": [
    {
      "description": "The sandbox id.",
      "in": "path",
      "name": "sandbox",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "description": "CreateEndpointCredentialRequest requests only endpoint permissions the caller holds.",
          "properties": {
            "permissions": {
              "description": "Allowed values: sandboxesExec, sandboxesFilesRead, sandboxesFilesWrite.",
              "items": {
                "$ref": "#/components/schemas/Permission",
                "enum": [
                  "sandboxesExec",
                  "sandboxesFilesRead",
                  "sandboxesFilesWrite"
                ]
              },
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            },
            "ttl": {
              "$ref": "#/components/schemas/Duration",
              "description": "ttl defaults to five minutes; supplied durations are clamped to one second through five minutes."
            }
          },
          "required": [
            "permissions"
          ],
          "title": "CreateEndpointCredentialRequest",
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/EndpointCredential"
          }
        }
      },
      "description": "Success",
      "headers": {
        "Cache-Control": {
          "required": true,
          "schema": {
            "const": "no-store",
            "type": "string"
          }
        }
      }
    },
    "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.",
      "headers": {
        "Cache-Control": {
          "required": true,
          "schema": {
            "enum": [
              "no-store"
            ],
            "type": "string"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "summary": "CreateEndpointCredential grants short-lived access to one sandbox endpoint.",
  "tags": [
    "Sandboxes"
  ],
  "x-sbx-authenticated-only": false,
  "x-sbx-conditional-permissions": [],
  "x-sbx-plane": "control",
  "x-sbx-required-permissions": [
    "sandboxesCredential"
  ],
  "x-sbx-serving-surface": "management"
}