The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { "message": "page not found" } ``` # Versioning The AP
naftiko: 1.0.0-alpha2
info:
label: Docker Engine API
description: 'The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate
with the Engine, so everything the Docker client can do can be done with the API. Most of the client''s commands map directly
to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists
of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call.
The body of the response will be JSON in the following format: ``` { "message": "page not found" } ``` # Versioning The
AP'
tags:
- Docker
- API
created: '2026-05-06'
modified: '2026-05-06'
capability:
consumes:
- type: http
namespace: docker
baseUri: https://api.example.com
description: Docker Engine API HTTP API.
resources:
- name: containers-json
path: /containers/json
operations:
- name: containerlist
method: GET
description: List containers
inputParameters:
- name: all
in: query
type: string
description: Return all containers. By default, only running containers are shown.
- name: limit
in: query
type: string
description: Return this number of most recently created containers, including non-running ones.
- name: size
in: query
type: string
description: Return the size of container as fields `SizeRw` and `SizeRootFs`.
- name: filters
in: query
type: string
description: 'Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example,
`{"status": ["paused"]}` will only return paused containers. A'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-create
path: /containers/create
operations:
- name: containercreate
method: POST
description: Create a container
inputParameters:
- name: name
in: query
type: string
description: Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
- name: platform
in: query
type: string
description: Platform in the format `os[/arch[/variant]]` used for image lookup. When specified, the daemon checks
if the requested image is present in the local image cache
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-json
path: /containers/{id}/json
operations:
- name: containerinspect
method: GET
description: Inspect a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: size
in: query
type: string
description: Return the size of container as fields `SizeRw` and `SizeRootFs`
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-top
path: /containers/{id}/top
operations:
- name: containertop
method: GET
description: List processes running inside a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: ps_args
in: query
type: string
description: The arguments to pass to `ps`. For example, `aux`
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-logs
path: /containers/{id}/logs
operations:
- name: containerlogs
method: GET
description: Get container logs
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: follow
in: query
type: string
description: Keep connection after returning logs.
- name: stdout
in: query
type: string
description: Return logs from `stdout`
- name: stderr
in: query
type: string
description: Return logs from `stderr`
- name: since
in: query
type: string
description: Only return logs since this time, as a UNIX timestamp
- name: until
in: query
type: string
description: Only return logs before this time, as a UNIX timestamp
- name: timestamps
in: query
type: string
description: Add timestamps to every log line
- name: tail
in: query
type: string
description: Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output
all log lines.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-changes
path: /containers/{id}/changes
operations:
- name: containerchanges
method: GET
description: Get changes on a container’s filesystem
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-export
path: /containers/{id}/export
operations:
- name: containerexport
method: GET
description: Export a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-stats
path: /containers/{id}/stats
operations:
- name: containerstats
method: GET
description: Get container stats based on resource usage
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: stream
in: query
type: string
description: Stream the output. If false, the stats will be output once and then it will disconnect.
- name: one-shot
in: query
type: string
description: Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-resize
path: /containers/{id}/resize
operations:
- name: containerresize
method: POST
description: Resize a container TTY
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: h
in: query
type: string
required: true
description: Height of the TTY session in characters
- name: w
in: query
type: string
required: true
description: Width of the TTY session in characters
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-start
path: /containers/{id}/start
operations:
- name: containerstart
method: POST
description: Start a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: detachKeys
in: query
type: string
description: 'Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-stop
path: /containers/{id}/stop
operations:
- name: containerstop
method: POST
description: Stop a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
- name: t
in: query
type: string
description: Number of seconds to wait before killing the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-restart
path: /containers/{id}/restart
operations:
- name: containerrestart
method: POST
description: Restart a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
- name: t
in: query
type: string
description: Number of seconds to wait before killing the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-kill
path: /containers/{id}/kill
operations:
- name: containerkill
method: POST
description: Kill a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-update
path: /containers/{id}/update
operations:
- name: containerupdate
method: POST
description: Update a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-rename
path: /containers/{id}/rename
operations:
- name: containerrename
method: POST
description: Rename a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: name
in: query
type: string
required: true
description: New name for the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-pause
path: /containers/{id}/pause
operations:
- name: containerpause
method: POST
description: Pause a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-unpause
path: /containers/{id}/unpause
operations:
- name: containerunpause
method: POST
description: Unpause a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-attach
path: /containers/{id}/attach
operations:
- name: containerattach
method: POST
description: Attach to a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: detachKeys
in: query
type: string
description: 'Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` '
- name: logs
in: query
type: string
description: Replay previous logs from the container. This is useful for attaching to a container that has started
and you want to output everything since the container star
- name: stream
in: query
type: string
description: Stream attached streams from the time the request was made onwards.
- name: stdin
in: query
type: string
description: Attach to `stdin`
- name: stdout
in: query
type: string
description: Attach to `stdout`
- name: stderr
in: query
type: string
description: Attach to `stderr`
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-attach-ws
path: /containers/{id}/attach/ws
operations:
- name: containerattachwebsocket
method: GET
description: Attach to a container via a websocket
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: detachKeys
in: query
type: string
description: 'Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>`
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`,'
- name: logs
in: query
type: string
description: Return logs
- name: stream
in: query
type: string
description: Return stream
- name: stdin
in: query
type: string
description: Attach to `stdin`
- name: stdout
in: query
type: string
description: Attach to `stdout`
- name: stderr
in: query
type: string
description: Attach to `stderr`
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-wait
path: /containers/{id}/wait
operations:
- name: containerwait
method: POST
description: Wait for a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: condition
in: query
type: string
description: Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id
path: /containers/{id}
operations:
- name: containerdelete
method: DELETE
description: Remove a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: v
in: query
type: string
description: Remove anonymous volumes associated with the container.
- name: force
in: query
type: string
description: If the container is running, kill it before removing it.
- name: link
in: query
type: string
description: Remove the specified link associated with the container.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-id-archive
path: /containers/{id}/archive
operations:
- name: containerarchive
method: GET
description: Get an archive of a filesystem resource in a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: path
in: query
type: string
required: true
description: Resource in the container’s filesystem to archive.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: putcontainerarchive
method: PUT
description: Extract an archive of files or folders to a directory in a container
inputParameters:
- name: id
in: path
type: string
required: true
description: ID or name of the container
- name: path
in: query
type: string
required: true
description: Path to a directory in the container to extract the archive’s contents into.
- name: noOverwriteDirNonDir
in: query
type: string
description: If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing
directory to be replaced with a non-directory and vice
- name: copyUIDGID
in: query
type: string
description: If `1`, `true`, then it will copy UID/GID maps to the dest file or dir
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: containers-prune
path: /containers/prune
operations:
- name: containerprune
method: POST
description: Delete stopped containers
inputParameters:
- name: filters
in: query
type: string
description: 'Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
- `until=<timestamp>` Prune containers created before this t'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-json
path: /images/json
operations:
- name: imagelist
method: GET
description: List Images
inputParameters:
- name: all
in: query
type: string
description: Show all images. Only images from a final layer (no children) are shown by default.
- name: filters
in: query
type: string
description: 'A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available
filters: - `before`=(`<image-name>[:<tag>]`, `<image id>`'
- name: shared-size
in: query
type: string
description: Compute and show shared size as a `SharedSize` field on each image.
- name: digests
in: query
type: string
description: Show digest information as a `RepoDigests` field on each image.
- name: manifests
in: query
type: string
description: Include `Manifests` in the image summary.
- name: identity
in: query
type: string
description: Include `Identity` in each manifest summary. Requires `manifests=1`.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: build
path: /build
operations:
- name: imagebuild
method: POST
description: Build an image
inputParameters:
- name: dockerfile
in: query
type: string
description: Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points
to an external `Dockerfile`.
- name: t
in: query
type: string
description: A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default
`latest` value is assumed. You can provide several `t` p
- name: extrahosts
in: query
type: string
description: Extra hosts to add to /etc/hosts
- name: remote
in: query
type: string
description: 'A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s
contents are placed into a file called `Dockerfile` and the '
- name: q
in: query
type: string
description: Suppress verbose build output.
- name: nocache
in: query
type: string
description: Do not use the cache when building the image.
- name: cachefrom
in: query
type: string
description: JSON array of images used for build cache resolution.
- name: pull
in: query
type: string
description: Attempt to pull the image even if an older image exists locally.
- name: rm
in: query
type: string
description: Remove intermediate containers after a successful build.
- name: forcerm
in: query
type: string
description: Always remove intermediate containers, even upon failure.
- name: memory
in: query
type: string
description: Set memory limit for build.
- name: memswap
in: query
type: string
description: Total memory (memory + swap). Set as `-1` to disable swap.
- name: cpushares
in: query
type: string
description: CPU shares (relative weight).
- name: cpusetcpus
in: query
type: string
description: CPUs in which to allow execution (e.g., `0-3`, `0,1`).
- name: cpuperiod
in: query
type: string
description: The length of a CPU period in microseconds.
- name: cpuquota
in: query
type: string
description: Microseconds of CPU time that the container can get in a CPU period.
- name: buildargs
in: query
type: string
description: 'JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses
the buildargs as the environment context for commands run '
- name: shmsize
in: query
type: string
description: Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
- name: squash
in: query
type: string
description: Squash the resulting images layers into a single layer. *(Experimental release only.)*
- name: labels
in: query
type: string
description: Arbitrary key/value labels to set on the image, as a JSON map of string pairs.
- name: networkmode
in: query
type: string
description: 'Sets the networking mode for the run commands during build. Supported standard values are: `bridge`,
`host`, `none`, and `container:<name|id>`. Any other value '
- name: Content-type
in: header
type: string
- name: X-Registry-Config
in: header
type: string
description: 'This is a base64-encoded JSON object with auth configurations for multiple registries that a build
may refer to. The key is a registry URL, and the value is an '
- name: platform
in: query
type: string
description: Platform in the format os[/arch[/variant]]
- name: target
in: query
type: string
description: Target build stage
- name: outputs
in: query
type: string
description: 'BuildKit output configuration in the format of a stringified JSON array of objects. Each object must
have two top-level properties: `Type` and `Attrs`. The `Typ'
- name: version
in: query
type: string
description: Version of the builder backend to use. - `1` is the first generation classic (deprecated) builder in
the Docker daemon (default) - `2` is [BuildKit](https://git
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: build-prune
path: /build/prune
operations:
- name: buildprune
method: POST
description: Delete builder cache
inputParameters:
- name: reserved-space
in: query
type: string
description: Amount of disk space in bytes to keep for cache
- name: max-used-space
in: query
type: string
description: Maximum amount of disk space allowed to keep for cache
- name: min-free-space
in: query
type: string
description: Target amount of free disk space after pruning
- name: all
in: query
type: string
description: Remove all types of build cache
- name: filters
in: query
type: string
description: 'A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache
objects. Available filters: - `until=<timestamp>` remove cac'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-create
path: /images/create
operations:
- name: imagecreate
method: POST
description: Create an image
inputParameters:
- name: fromImage
in: query
type: string
description: 'Name of the image to pull. If the name includes a tag or digest, specific behavior applies: - If only
`fromImage` includes a tag, that tag is used. - If both `f'
- name: fromSrc
in: query
type: string
description: Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image
from the request body. This parameter may only be used w
- name: repo
in: query
type: string
description: Repository name given to an image when it is imported. The repo may include a tag. This parameter may
only be used when importing an image.
- name: tag
in: query
type: string
description: Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.
- name: message
in: query
type: string
description: Set commit message for imported image.
- name: X-Registry-Auth
in: header
type: string
description: A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication)
for details.
- name: changes
in: query
type: string
description: 'Apply `Dockerfile` instructions to the image that is created, for example: `changes=ENV DEBUG=true`.
Note that `ENV DEBUG=true` should be URI component encoded.'
- name: platform
in: query
type: string
description: Platform in the format os[/arch[/variant]]. When used in combination with the `fromImage` option, the
daemon checks if the given image is present in the local i
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-name-json
path: /images/{name}/json
operations:
- name: imageinspect
method: GET
description: Inspect an image
inputParameters:
- name: name
in: path
type: string
required: true
description: Image name or id
- name: manifests
in: query
type: string
description: Include Manifests in the image summary. The `manifests` and `platform` options are mutually exclusive,
and an error is produced if both are set.
- name: platform
in: query
type: string
description: JSON-encoded OCI platform to select the platform-variant. If omitted, it defaults to any locally available
platform, prioritizing the daemon's host platform. If
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-name-history
path: /images/{name}/history
operations:
- name: imagehistory
method: GET
description: Get the history of an image
inputParameters:
- name: name
in: path
type: string
required: true
description: Image name or ID
- name: platform
in: query
type: string
description: JSON-encoded OCI platform to select the platform-variant. If omitted, it defaults to any locally available
platform, prioritizing the daemon's host platform. If
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-name-push
path: /images/{name}/push
operations:
- name: imagepush
method: POST
description: Push an image
inputParameters:
- name: name
in: path
type: string
required: true
description: Name of the image to push. For example, `registry.example.com/myimage`. The image must be present in
the local image store with the same name. The name should b
- name: tag
in: query
type: string
description: Tag of the image to push. For example, `latest`. If no tag is provided, all tags of the given image
that are present in the local image store are pushed.
- name: platform
in: query
type: string
description: JSON-encoded OCI platform to select the platform-variant to push. If not provided, all available variants
will attempt to be pushed. If the daemon provides a mu
- name: X-Registry-Auth
in: header
type: string
required: true
description: A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication)
for details.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: images-name-tag
path: /images/{name}/tag
operations:
- name: imagetag
method: POST
description: Tag an image
inputParameters:
- name: name
in: path
type: string
required: true
description: Image name or ID to tag.
- name: repo
in: query
type: string
description: The repository to tag in. For example, `someuser/someimage`.
- name: tag
in: query
type: string
description: The name of the new tag.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
# --- truncated at 32 KB (109 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docker/refs/heads/main/capabilities/docker-capability.yaml