Skip to content

Instantly share code, notes, and snippets.

@notpushkin
Last active June 18, 2020 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notpushkin/37350bd2e46ef4d8ef6926668bf069e3 to your computer and use it in GitHub Desktop.
Save notpushkin/37350bd2e46ef4d8ef6926668bf069e3 to your computer and use it in GitHub Desktop.
Docker OpenAPI schema converted from https://docs.docker.com/engine/api/v1.40.yaml for use with Swagger UI

Open with Swagger UI: v1.40

{
"basePath": "/v1.40",
"consumes": ["application/json", "text/plain"],
"definitions": {
"Address": {
"description": "Address represents an IPv4 or IPv6 IP address.",
"properties": {
"Addr": { "description": "IP address.", "type": "string" },
"PrefixLen": {
"description": "Mask length of the IP address.",
"type": "integer"
}
},
"type": "object"
},
"AuthConfig": {
"example": {
"password": "xxxx",
"serveraddress": "https://index.docker.io/v1/",
"username": "hannibal"
},
"properties": {
"email": { "type": "string" },
"password": { "type": "string" },
"serveraddress": { "type": "string" },
"username": { "type": "string" }
},
"type": "object"
},
"BuildCache": {
"properties": {
"CreatedAt": { "type": "integer" },
"Description": { "type": "string" },
"ID": { "type": "string" },
"InUse": { "type": "boolean" },
"LastUsedAt": { "type": "integer", "x-nullable": true },
"Parent": { "type": "string" },
"Shared": { "type": "boolean" },
"Size": { "type": "integer" },
"Type": { "type": "string" },
"UsageCount": { "type": "integer" }
},
"type": "object"
},
"BuildInfo": {
"properties": {
"aux": { "$ref": "#/definitions/ImageID" },
"error": { "type": "string" },
"errorDetail": { "$ref": "#/definitions/ErrorDetail" },
"id": { "type": "string" },
"progress": { "type": "string" },
"progressDetail": { "$ref": "#/definitions/ProgressDetail" },
"status": { "type": "string" },
"stream": { "type": "string" }
},
"type": "object"
},
"ClusterInfo": {
"description": "ClusterInfo represents information about the swarm as is returned by the\n\"/info\" endpoint. Join-tokens are not included.\n",
"properties": {
"CreatedAt": {
"description": "Date and time at which the swarm was initialised in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2016-08-18T10:44:24.496525531Z",
"format": "dateTime",
"type": "string"
},
"DataPathPort": {
"default": 4789,
"description": "DataPathPort specifies the data path port number for data traffic.\nAcceptable port range is 1024 to 49151.\nIf no port is set or is set to 0, the default port (4789) is used.\n",
"example": 4789,
"format": "uint32",
"type": "integer"
},
"DefaultAddrPool": {
"description": "Default Address Pool specifies default subnet pools for global scope networks.\n",
"items": {
"example": ["10.10.0.0/16", "20.20.0.0/16"],
"format": "CIDR",
"type": "string"
},
"type": "array"
},
"ID": {
"description": "The ID of the swarm.",
"example": "abajmipo7b4xz5ip2nrla6b11",
"type": "string"
},
"RootRotationInProgress": {
"description": "Whether there is currently a root CA rotation in progress for the swarm",
"example": false,
"type": "boolean"
},
"Spec": { "$ref": "#/definitions/SwarmSpec" },
"SubnetSize": {
"default": 24,
"description": "SubnetSize specifies the subnet size of the networks created from the default subnet pool\n",
"example": 24,
"format": "uint32",
"maximum": 29,
"type": "integer"
},
"TLSInfo": { "$ref": "#/definitions/TLSInfo" },
"UpdatedAt": {
"description": "Date and time at which the swarm was last updated in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2017-08-09T07:09:37.632105588Z",
"format": "dateTime",
"type": "string"
},
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object",
"x-nullable": true
},
"Commit": {
"description": "Commit holds the Git-commit (SHA1) that a binary was built from, as\nreported in the version-string of external tools, such as `containerd`,\nor `runC`.\n",
"properties": {
"Expected": {
"description": "Commit ID of external tool expected by dockerd as set at build time.\n",
"example": "2d41c047c83e09a6d61d464906feb2a2f3c52aa4",
"type": "string"
},
"ID": {
"description": "Actual commit ID of external tool.",
"example": "cfb82a876ecc11b5ca0977d1733adbe58599088a",
"type": "string"
}
},
"type": "object"
},
"Config": {
"properties": {
"CreatedAt": { "format": "dateTime", "type": "string" },
"ID": { "type": "string" },
"Spec": { "$ref": "#/definitions/ConfigSpec" },
"UpdatedAt": { "format": "dateTime", "type": "string" },
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object"
},
"ConfigSpec": {
"properties": {
"Data": {
"description": "Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-3.2))\nconfig data.\n",
"type": "string"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Name": {
"description": "User-defined name of the config.",
"type": "string"
},
"Templating": {
"$ref": "#/definitions/Driver",
"description": "Templating driver, if applicable\n\nTemplating controls whether and how to evaluate the config payload as\na template. If no driver is set, no templating is used.\n"
}
},
"type": "object"
},
"ContainerConfig": {
"description": "Configuration for a container that is portable between hosts",
"properties": {
"ArgsEscaped": {
"description": "Command is already escaped (Windows only)",
"type": "boolean"
},
"AttachStderr": {
"default": true,
"description": "Whether to attach to `stderr`.",
"type": "boolean"
},
"AttachStdin": {
"default": false,
"description": "Whether to attach to `stdin`.",
"type": "boolean"
},
"AttachStdout": {
"default": true,
"description": "Whether to attach to `stdout`.",
"type": "boolean"
},
"Cmd": {
"description": "Command to run specified as a string or an array of strings.",
"items": { "type": "string" },
"type": "array"
},
"Domainname": {
"description": "The domain name to use for the container.",
"type": "string"
},
"Entrypoint": {
"description": "The entry point for the container as a string or an array of strings.\n\nIf the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).\n",
"items": { "type": "string" },
"type": "array"
},
"Env": {
"description": "A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.\n",
"items": { "type": "string" },
"type": "array"
},
"ExposedPorts": {
"additionalProperties": {
"default": {},
"enum": [{}],
"type": "object"
},
"description": "An object mapping ports to an empty object in the form:\n\n`{\"<port>/<tcp|udp|sctp>\": {}}`\n",
"type": "object"
},
"Healthcheck": { "$ref": "#/definitions/HealthConfig" },
"Hostname": {
"description": "The hostname to use for the container, as a valid RFC 1123 hostname.",
"type": "string"
},
"Image": {
"description": "The name of the image to use when creating the container",
"type": "string"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"MacAddress": {
"description": "MAC address of the container.",
"type": "string"
},
"NetworkDisabled": {
"description": "Disable networking for the container.",
"type": "boolean"
},
"OnBuild": {
"description": "`ONBUILD` metadata that were defined in the image's `Dockerfile`.",
"items": { "type": "string" },
"type": "array"
},
"OpenStdin": {
"default": false,
"description": "Open `stdin`",
"type": "boolean"
},
"Shell": {
"description": "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.",
"items": { "type": "string" },
"type": "array"
},
"StdinOnce": {
"default": false,
"description": "Close `stdin` after one attached client disconnects",
"type": "boolean"
},
"StopSignal": {
"default": "SIGTERM",
"description": "Signal to stop a container as a string or unsigned integer.",
"type": "string"
},
"StopTimeout": {
"default": 10,
"description": "Timeout to stop a container in seconds.",
"type": "integer"
},
"Tty": {
"default": false,
"description": "Attach standard streams to a TTY, including `stdin` if it is not closed.",
"type": "boolean"
},
"User": {
"description": "The user that commands are run as inside the container.",
"type": "string"
},
"Volumes": {
"additionalProperties": {
"default": {},
"enum": [{}],
"type": "object"
},
"description": "An object mapping mount point paths inside the container to empty objects.",
"type": "object"
},
"WorkingDir": {
"description": "The working directory for commands to run in.",
"type": "string"
}
},
"type": "object"
},
"ContainerState": {
"description": "ContainerState stores container's running state. It's part of ContainerJSONBase\nand will be returned by the \"inspect\" command.\n",
"properties": {
"Dead": { "example": false, "type": "boolean" },
"Error": { "type": "string" },
"ExitCode": {
"description": "The last exit code of this container",
"example": 0,
"type": "integer"
},
"FinishedAt": {
"description": "The time when this container last exited.",
"example": "2020-01-06T09:07:59.461876391Z",
"type": "string"
},
"Health": { "$ref": "#/definitions/Health", "x-nullable": true },
"OOMKilled": {
"description": "Whether this container has been killed because it ran out of memory.",
"example": false,
"type": "boolean"
},
"Paused": {
"description": "Whether this container is paused.",
"example": false,
"type": "boolean"
},
"Pid": {
"description": "The process ID of this container",
"example": 1234,
"type": "integer"
},
"Restarting": {
"description": "Whether this container is restarting.",
"example": false,
"type": "boolean"
},
"Running": {
"description": "Whether this container is running.\n\nNote that a running container can be _paused_. The `Running` and `Paused`\nbooleans are not mutually exclusive:\n\nWhen pausing a container (on Linux), the freezer cgroup is used to suspend\nall processes in the container. Freezing the process requires the process to\nbe running. As a result, paused containers are both `Running` _and_ `Paused`.\n\nUse the `Status` field instead to determine if a container's state is \"running\".\n",
"example": true,
"type": "boolean"
},
"StartedAt": {
"description": "The time when this container was last started.",
"example": "2020-01-06T09:06:59.461876391Z",
"type": "string"
},
"Status": {
"description": "String representation of the container state. Can be one of \"created\",\n\"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\".\n",
"enum": [
"created",
"running",
"paused",
"restarting",
"removing",
"exited",
"dead"
],
"example": "running",
"type": "string"
}
},
"type": "object"
},
"ContainerSummary": {
"items": {
"properties": {
"Command": {
"description": "Command to run when starting the container",
"type": "string"
},
"Created": {
"description": "When the container was created",
"format": "int64",
"type": "integer"
},
"HostConfig": {
"properties": { "NetworkMode": { "type": "string" } },
"type": "object"
},
"Id": {
"description": "The ID of this container",
"type": "string",
"x-go-name": "ID"
},
"Image": {
"description": "The name of the image used when creating this container",
"type": "string"
},
"ImageID": {
"description": "The ID of the image that this container was created from",
"type": "string"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Mounts": {
"items": { "$ref": "#/definitions/Mount" },
"type": "array"
},
"Names": {
"description": "The names that this container has been given",
"items": { "type": "string" },
"type": "array"
},
"NetworkSettings": {
"description": "A summary of the container's network settings",
"properties": {
"Networks": {
"additionalProperties": {
"$ref": "#/definitions/EndpointSettings"
},
"type": "object"
}
},
"type": "object"
},
"Ports": {
"description": "The ports exposed by this container",
"items": { "$ref": "#/definitions/Port" },
"type": "array"
},
"SizeRootFs": {
"description": "The total size of all the files in this container",
"format": "int64",
"type": "integer"
},
"SizeRw": {
"description": "The size of files that have been created or changed by this container",
"format": "int64",
"type": "integer"
},
"State": {
"description": "The state of this container (e.g. `Exited`)",
"type": "string"
},
"Status": {
"description": "Additional human-readable status of this container (e.g. `Exit 0`)",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"CreateImageInfo": {
"properties": {
"error": { "type": "string" },
"id": { "type": "string" },
"progress": { "type": "string" },
"progressDetail": { "$ref": "#/definitions/ProgressDetail" },
"status": { "type": "string" }
},
"type": "object"
},
"DeviceMapping": {
"description": "A device mapping between the host and container",
"example": {
"CgroupPermissions": "mrw",
"PathInContainer": "/dev/deviceName",
"PathOnHost": "/dev/deviceName"
},
"properties": {
"CgroupPermissions": { "type": "string" },
"PathInContainer": { "type": "string" },
"PathOnHost": { "type": "string" }
},
"type": "object"
},
"DeviceRequest": {
"description": "A request for devices to be sent to device drivers",
"properties": {
"Capabilities": {
"description": "A list of capabilities; an OR list of AND lists of capabilities.\n",
"example": [["gpu", "nvidia", "compute"]],
"items": { "items": { "type": "string" }, "type": "array" },
"type": "array"
},
"Count": { "example": -1, "type": "integer" },
"DeviceIDs": {
"example": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"],
"items": { "type": "string" },
"type": "array"
},
"Driver": { "example": "nvidia", "type": "string" },
"Options": {
"additionalProperties": { "type": "string" },
"description": "Driver-specific options, specified as a key/value pairs. These options\nare passed directly to the driver.\n",
"type": "object"
}
},
"type": "object"
},
"Driver": {
"description": "Driver represents a driver (network, logging, secrets).",
"properties": {
"Name": {
"description": "Name of the driver.",
"example": "some-driver",
"type": "string",
"x-nullable": false
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "Key/value map of driver-specific options.",
"example": {
"OptionA": "value for driver-specific option A",
"OptionB": "value for driver-specific option B"
},
"type": "object",
"x-nullable": false
}
},
"required": ["Name"],
"type": "object"
},
"EndpointIPAMConfig": {
"description": "EndpointIPAMConfig represents an endpoint's IPAM configuration.\n",
"properties": {
"IPv4Address": { "example": "172.20.30.33", "type": "string" },
"IPv6Address": { "example": "2001:db8:abcd::3033", "type": "string" },
"LinkLocalIPs": {
"example": ["169.254.34.68", "fe80::3468"],
"items": { "type": "string" },
"type": "array"
}
},
"type": "object",
"x-nullable": true
},
"EndpointPortConfig": {
"properties": {
"Name": { "type": "string" },
"Protocol": { "enum": ["tcp", "udp", "sctp"], "type": "string" },
"PublishMode": {
"default": "ingress",
"description": "The mode in which port is published.\n\n<p><br /></p>\n\n- \"ingress\" makes the target port accessible on every node,\n regardless of whether there is a task for the service running on\n that node or not.\n- \"host\" bypasses the routing mesh and publish the port directly on\n the swarm node where that service is running.\n",
"enum": ["ingress", "host"],
"example": "ingress",
"type": "string"
},
"PublishedPort": {
"description": "The port on the swarm hosts.",
"type": "integer"
},
"TargetPort": {
"description": "The port inside the container.",
"type": "integer"
}
},
"type": "object"
},
"EndpointSettings": {
"description": "Configuration for a network endpoint.",
"properties": {
"Aliases": {
"example": ["server_x", "server_y"],
"items": { "type": "string" },
"type": "array"
},
"DriverOpts": {
"additionalProperties": { "type": "string" },
"description": "DriverOpts is a mapping of driver options and values. These options\nare passed directly to the driver and are driver specific.\n",
"example": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"type": "object",
"x-nullable": true
},
"EndpointID": {
"description": "Unique ID for the service endpoint in a Sandbox.\n",
"example": "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b",
"type": "string"
},
"Gateway": {
"description": "Gateway address for this network.\n",
"example": "172.17.0.1",
"type": "string"
},
"GlobalIPv6Address": {
"description": "Global IPv6 address.\n",
"example": "2001:db8::5689",
"type": "string"
},
"GlobalIPv6PrefixLen": {
"description": "Mask length of the global IPv6 address.\n",
"example": 64,
"format": "int64",
"type": "integer"
},
"IPAMConfig": { "$ref": "#/definitions/EndpointIPAMConfig" },
"IPAddress": {
"description": "IPv4 address.\n",
"example": "172.17.0.4",
"type": "string"
},
"IPPrefixLen": {
"description": "Mask length of the IPv4 address.\n",
"example": 16,
"type": "integer"
},
"IPv6Gateway": {
"description": "IPv6 gateway address.\n",
"example": "2001:db8:2::100",
"type": "string"
},
"Links": {
"example": ["container_1", "container_2"],
"items": { "type": "string" },
"type": "array"
},
"MacAddress": {
"description": "MAC address for the endpoint on this network.\n",
"example": "02:42:ac:11:00:04",
"type": "string"
},
"NetworkID": {
"description": "Unique ID of the network.\n",
"example": "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a",
"type": "string"
}
},
"type": "object"
},
"EndpointSpec": {
"description": "Properties that can be configured to access and load balance a service.",
"properties": {
"Mode": {
"default": "vip",
"description": "The mode of resolution to use for internal load balancing between tasks.\n",
"enum": ["vip", "dnsrr"],
"type": "string"
},
"Ports": {
"description": "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used.",
"items": { "$ref": "#/definitions/EndpointPortConfig" },
"type": "array"
}
},
"type": "object"
},
"EngineDescription": {
"description": "EngineDescription provides information about an engine.",
"properties": {
"EngineVersion": { "example": "17.06.0", "type": "string" },
"Labels": {
"additionalProperties": { "type": "string" },
"example": { "foo": "bar" },
"type": "object"
},
"Plugins": {
"example": [
{ "Name": "awslogs", "Type": "Log" },
{ "Name": "fluentd", "Type": "Log" },
{ "Name": "gcplogs", "Type": "Log" },
{ "Name": "gelf", "Type": "Log" },
{ "Name": "journald", "Type": "Log" },
{ "Name": "json-file", "Type": "Log" },
{ "Name": "logentries", "Type": "Log" },
{ "Name": "splunk", "Type": "Log" },
{ "Name": "syslog", "Type": "Log" },
{ "Name": "bridge", "Type": "Network" },
{ "Name": "host", "Type": "Network" },
{ "Name": "ipvlan", "Type": "Network" },
{ "Name": "macvlan", "Type": "Network" },
{ "Name": "null", "Type": "Network" },
{ "Name": "overlay", "Type": "Network" },
{ "Name": "local", "Type": "Volume" },
{ "Name": "localhost:5000/vieux/sshfs:latest", "Type": "Volume" },
{ "Name": "vieux/sshfs:latest", "Type": "Volume" }
],
"items": {
"properties": {
"Name": { "type": "string" },
"Type": { "type": "string" }
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"ErrorDetail": {
"properties": {
"code": { "type": "integer" },
"message": { "type": "string" }
},
"type": "object"
},
"ErrorResponse": {
"description": "Represents an error.",
"example": { "message": "Something went wrong." },
"properties": {
"message": {
"description": "The error message.",
"type": "string",
"x-nullable": false
}
},
"required": ["message"],
"type": "object"
},
"GenericResources": {
"description": "User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`)",
"example": [
{ "DiscreteResourceSpec": { "Kind": "SSD", "Value": 3 } },
{ "NamedResourceSpec": { "Kind": "GPU", "Value": "UUID1" } },
{ "NamedResourceSpec": { "Kind": "GPU", "Value": "UUID2" } }
],
"items": {
"properties": {
"DiscreteResourceSpec": {
"properties": {
"Kind": { "type": "string" },
"Value": { "format": "int64", "type": "integer" }
},
"type": "object"
},
"NamedResourceSpec": {
"properties": {
"Kind": { "type": "string" },
"Value": { "type": "string" }
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"GraphDriverData": {
"description": "Information about a container's graph driver.",
"properties": {
"Data": {
"additionalProperties": { "type": "string" },
"type": "object",
"x-nullable": false
},
"Name": { "type": "string", "x-nullable": false }
},
"required": ["Name", "Data"],
"type": "object"
},
"Health": {
"description": "Health stores information about the container's healthcheck results.\n",
"properties": {
"FailingStreak": {
"description": "FailingStreak is the number of consecutive failures",
"example": 0,
"type": "integer"
},
"Log": {
"description": "Log contains the last few results (oldest first)\n",
"items": {
"$ref": "#/definitions/HealthcheckResult",
"x-nullable": true
},
"type": "array"
},
"Status": {
"description": "Status is one of `none`, `starting`, `healthy` or `unhealthy`\n\n- \"none\" Indicates there is no healthcheck\n- \"starting\" Starting indicates that the container is not yet ready\n- \"healthy\" Healthy indicates that the container is running correctly\n- \"unhealthy\" Unhealthy indicates that the container has a problem\n",
"enum": ["none", "starting", "healthy", "unhealthy"],
"example": "healthy",
"type": "string"
}
},
"type": "object"
},
"HealthConfig": {
"description": "A test to perform to check that the container is healthy.",
"properties": {
"Interval": {
"description": "The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.",
"type": "integer"
},
"Retries": {
"description": "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.",
"type": "integer"
},
"StartPeriod": {
"description": "Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.",
"type": "integer"
},
"Test": {
"description": "The test to perform. Possible values are:\n\n- `[]` inherit healthcheck from image or parent image\n- `[\"NONE\"]` disable healthcheck\n- `[\"CMD\", args...]` exec arguments directly\n- `[\"CMD-SHELL\", command]` run command with system's default shell\n",
"items": { "type": "string" },
"type": "array"
},
"Timeout": {
"description": "The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.",
"type": "integer"
}
},
"type": "object"
},
"HealthcheckResult": {
"description": "HealthcheckResult stores information about a single run of a healthcheck probe\n",
"properties": {
"End": {
"description": "Date and time at which this check ended in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2020-01-04T10:45:21.364524523Z",
"format": "dateTime",
"type": "string"
},
"ExitCode": {
"description": "ExitCode meanings:\n\n- `0` healthy\n- `1` unhealthy\n- `2` reserved (considered unhealthy)\n- other values: error running probe\n",
"example": 0,
"type": "integer"
},
"Output": { "description": "Output from last check", "type": "string" },
"Start": {
"description": "Date and time at which this check started in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2020-01-04T10:44:24.496525531Z",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"HostConfig": {
"allOf": [
{ "$ref": "#/definitions/Resources" },
{
"properties": {
"AutoRemove": {
"description": "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set.",
"type": "boolean"
},
"Binds": {
"description": "A list of volume bindings for this container. Each volume binding\nis a string in one of these forms:\n\n- `host-src:container-dest[:options]` to bind-mount a host path\n into the container. Both `host-src`, and `container-dest` must\n be an _absolute_ path.\n- `volume-name:container-dest[:options]` to bind-mount a volume\n managed by a volume driver into the container. `container-dest`\n must be an _absolute_ path.\n\n`options` is an optional, comma-delimited list of:\n\n- `nocopy` disables automatic copying of data from the container\n path to the volume. The `nocopy` flag only applies to named volumes.\n- `[ro|rw]` mounts a volume read-only or read-write, respectively.\n If omitted or set to `rw`, volumes are mounted read-write.\n- `[z|Z]` applies SELinux labels to allow or deny multiple containers\n to read and write to the same volume.\n - `z`: a _shared_ content label is applied to the content. This\n label indicates that multiple containers can share the volume\n content, for both reading and writing.\n - `Z`: a _private unshared_ label is applied to the content.\n This label indicates that only the current container can use\n a private volume. Labeling systems such as SELinux require\n proper labels to be placed on volume content that is mounted\n into a container. Without a label, the security system can\n prevent a container's processes from using the content. By\n default, the labels set by the host operating system are not\n modified.\n- `[[r]shared|[r]slave|[r]private]` specifies mount\n [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).\n This only applies to bind-mounted volumes, not internal volumes\n or named volumes. Mount propagation requires the source mount\n point (the location where the source directory is mounted in the\n host operating system) to have the correct propagation properties.\n For shared volumes, the source mount point must be set to `shared`.\n For slave volumes, the mount must be set to either `shared` or\n `slave`.\n",
"items": { "type": "string" },
"type": "array"
},
"CapAdd": {
"description": "A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'",
"items": { "type": "string" },
"type": "array"
},
"CapDrop": {
"description": "A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'",
"items": { "type": "string" },
"type": "array"
},
"Capabilities": {
"description": "A list of kernel capabilities to be available for container (this overrides the default set).\n\nConflicts with options 'CapAdd' and 'CapDrop'\"\n",
"items": { "type": "string" },
"type": "array"
},
"Cgroup": {
"description": "Cgroup to use for the container.",
"type": "string"
},
"ConsoleSize": {
"description": "Initial console size, as an `[height, width]` array. (Windows only)",
"items": { "minimum": 0, "type": "integer" },
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"ContainerIDFile": {
"description": "Path to a file where the container ID is written",
"type": "string"
},
"Dns": {
"description": "A list of DNS servers for the container to use.",
"items": { "type": "string" },
"type": "array"
},
"DnsOptions": {
"description": "A list of DNS options.",
"items": { "type": "string" },
"type": "array"
},
"DnsSearch": {
"description": "A list of DNS search domains.",
"items": { "type": "string" },
"type": "array"
},
"ExtraHosts": {
"description": "A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `[\"hostname:IP\"]`.\n",
"items": { "type": "string" },
"type": "array"
},
"GroupAdd": {
"description": "A list of additional groups that the container process will run as.",
"items": { "type": "string" },
"type": "array"
},
"IpcMode": {
"description": "IPC sharing mode for the container. Possible values are:\n\n- `\"none\"`: own private IPC namespace, with /dev/shm not mounted\n- `\"private\"`: own private IPC namespace\n- `\"shareable\"`: own private IPC namespace, with a possibility to share it with other containers\n- `\"container:<name|id>\"`: join another (shareable) container's IPC namespace\n- `\"host\"`: use the host system's IPC namespace\n\nIf not specified, daemon default is used, which can either be `\"private\"`\nor `\"shareable\"`, depending on daemon version and configuration.\n",
"type": "string"
},
"Isolation": {
"description": "Isolation technology of the container. (Windows only)",
"enum": ["default", "process", "hyperv"],
"type": "string"
},
"Links": {
"description": "A list of links for the container in the form `container_name:alias`.",
"items": { "type": "string" },
"type": "array"
},
"LogConfig": {
"description": "The logging configuration for this container",
"properties": {
"Config": {
"additionalProperties": { "type": "string" },
"type": "object"
},
"Type": {
"enum": [
"json-file",
"syslog",
"journald",
"gelf",
"fluentd",
"awslogs",
"splunk",
"etwlogs",
"none"
],
"type": "string"
}
},
"type": "object"
},
"MaskedPaths": {
"description": "The list of paths to be masked inside the container (this overrides the default set of paths)",
"items": { "type": "string" },
"type": "array"
},
"Mounts": {
"description": "Specification for mounts to be added to the container.",
"items": { "$ref": "#/definitions/Mount" },
"type": "array"
},
"NetworkMode": {
"description": "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to.",
"type": "string"
},
"OomScoreAdj": {
"description": "An integer value containing the score given to the container in order to tune OOM killer preferences.",
"example": 500,
"type": "integer"
},
"PidMode": {
"description": "Set the PID (Process) Namespace mode for the container. It can be either:\n\n- `\"container:<name|id>\"`: joins another container's PID namespace\n- `\"host\"`: use the host's PID namespace inside the container\n",
"type": "string"
},
"PortBindings": { "$ref": "#/definitions/PortMap" },
"Privileged": {
"description": "Gives the container full access to the host.",
"type": "boolean"
},
"PublishAllPorts": {
"description": "Allocates an ephemeral host port for all of a container's\nexposed ports.\n\nPorts are de-allocated when the container stops and allocated when the container starts.\nThe allocated port might be changed when restarting the container.\n\nThe port is selected from the ephemeral port range that depends on the kernel.\nFor example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.\n",
"type": "boolean"
},
"ReadonlyPaths": {
"description": "The list of paths to be set as read-only inside the container (this overrides the default set of paths)",
"items": { "type": "string" },
"type": "array"
},
"ReadonlyRootfs": {
"description": "Mount the container's root filesystem as read only.",
"type": "boolean"
},
"RestartPolicy": { "$ref": "#/definitions/RestartPolicy" },
"Runtime": {
"description": "Runtime to use with this container.",
"type": "string"
},
"SecurityOpt": {
"description": "A list of string values to customize labels for MLS systems, such as SELinux.",
"items": { "type": "string" },
"type": "array"
},
"ShmSize": {
"description": "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.",
"minimum": 0,
"type": "integer"
},
"StorageOpt": {
"additionalProperties": { "type": "string" },
"description": "Storage driver options for this container, in the form `{\"size\": \"120G\"}`.\n",
"type": "object"
},
"Sysctls": {
"additionalProperties": { "type": "string" },
"description": "A list of kernel parameters (sysctls) to set in the container. For example: `{\"net.ipv4.ip_forward\": \"1\"}`\n",
"type": "object"
},
"Tmpfs": {
"additionalProperties": { "type": "string" },
"description": "A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ \"/run\": \"rw,noexec,nosuid,size=65536k\" }`.\n",
"type": "object"
},
"UTSMode": {
"description": "UTS namespace to use for the container.",
"type": "string"
},
"UsernsMode": {
"description": "Sets the usernamespace mode for the container when usernamespace remapping option is enabled.",
"type": "string"
},
"VolumeDriver": {
"description": "Driver that this container uses to mount volumes.",
"type": "string"
},
"VolumesFrom": {
"description": "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`.",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
}
],
"description": "Container configuration that depends on the host we are running on"
},
"IPAM": {
"properties": {
"Config": {
"description": "List of IPAM configuration options, specified as a map: `{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}`",
"items": {
"additionalProperties": { "type": "string" },
"type": "object"
},
"type": "array"
},
"Driver": {
"default": "default",
"description": "Name of the IPAM driver to use.",
"type": "string"
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "Driver-specific options, specified as a map.",
"type": "object"
}
},
"type": "object"
},
"IdResponse": {
"description": "Response to an API call that returns just an Id",
"properties": {
"Id": {
"description": "The id of the newly created object.",
"type": "string",
"x-nullable": false
}
},
"required": ["Id"],
"type": "object"
},
"Image": {
"properties": {
"Architecture": { "type": "string", "x-nullable": false },
"Author": { "type": "string", "x-nullable": false },
"Comment": { "type": "string", "x-nullable": false },
"Config": { "$ref": "#/definitions/ContainerConfig" },
"Container": { "type": "string", "x-nullable": false },
"ContainerConfig": { "$ref": "#/definitions/ContainerConfig" },
"Created": { "type": "string", "x-nullable": false },
"DockerVersion": { "type": "string", "x-nullable": false },
"GraphDriver": { "$ref": "#/definitions/GraphDriverData" },
"Id": { "type": "string", "x-nullable": false },
"Metadata": {
"properties": {
"LastTagTime": { "format": "dateTime", "type": "string" }
},
"type": "object"
},
"Os": { "type": "string", "x-nullable": false },
"OsVersion": { "type": "string" },
"Parent": { "type": "string", "x-nullable": false },
"RepoDigests": { "items": { "type": "string" }, "type": "array" },
"RepoTags": { "items": { "type": "string" }, "type": "array" },
"RootFS": {
"properties": {
"BaseLayer": { "type": "string" },
"Layers": { "items": { "type": "string" }, "type": "array" },
"Type": { "type": "string", "x-nullable": false }
},
"required": ["Type"],
"type": "object"
},
"Size": { "format": "int64", "type": "integer", "x-nullable": false },
"VirtualSize": {
"format": "int64",
"type": "integer",
"x-nullable": false
}
},
"required": [
"Id",
"Parent",
"Comment",
"Created",
"Container",
"DockerVersion",
"Author",
"Architecture",
"Os",
"Size",
"VirtualSize",
"GraphDriver",
"RootFS"
],
"type": "object"
},
"ImageDeleteResponseItem": {
"properties": {
"Deleted": {
"description": "The image ID of an image that was deleted",
"type": "string"
},
"Untagged": {
"description": "The image ID of an image that was untagged",
"type": "string"
}
},
"type": "object"
},
"ImageID": {
"description": "Image ID or Digest",
"example": {
"ID": "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
},
"properties": { "ID": { "type": "string" } },
"type": "object"
},
"ImageSummary": {
"properties": {
"Containers": { "type": "integer", "x-nullable": false },
"Created": { "type": "integer", "x-nullable": false },
"Id": { "type": "string", "x-nullable": false },
"Labels": {
"additionalProperties": { "type": "string" },
"type": "object",
"x-nullable": false
},
"ParentId": { "type": "string", "x-nullable": false },
"RepoDigests": {
"items": { "type": "string" },
"type": "array",
"x-nullable": false
},
"RepoTags": {
"items": { "type": "string" },
"type": "array",
"x-nullable": false
},
"SharedSize": { "type": "integer", "x-nullable": false },
"Size": { "type": "integer", "x-nullable": false },
"VirtualSize": { "type": "integer", "x-nullable": false }
},
"required": [
"Id",
"ParentId",
"RepoTags",
"RepoDigests",
"Created",
"Size",
"SharedSize",
"VirtualSize",
"Labels",
"Containers"
],
"type": "object"
},
"IndexInfo": {
"description": "IndexInfo contains information about a registry.",
"properties": {
"Mirrors": {
"description": "List of mirrors, expressed as URIs.\n",
"example": [
"https://hub-mirror.corp.example.com:5000/",
"https://registry-2.docker.io/",
"https://registry-3.docker.io/"
],
"items": { "type": "string" },
"type": "array"
},
"Name": {
"description": "Name of the registry, such as \"docker.io\".\n",
"example": "docker.io",
"type": "string"
},
"Official": {
"description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)\n",
"example": true,
"type": "boolean"
},
"Secure": {
"description": "Indicates if the registry is part of the list of insecure\nregistries.\n\nIf `false`, the registry is insecure. Insecure registries accept\nun-encrypted (HTTP) and/or untrusted (HTTPS with certificates from\nunknown CAs) communication.\n\n> **Warning**: Insecure registries can be useful when running a local\n> registry. However, because its use creates security vulnerabilities\n> it should ONLY be enabled for testing purposes. For increased\n> security, users should add their CA to their system's list of\n> trusted CAs instead of enabling this option.\n",
"example": true,
"type": "boolean"
}
},
"type": "object",
"x-nullable": true
},
"JoinTokens": {
"description": "JoinTokens contains the tokens workers and managers need to join the swarm.\n",
"properties": {
"Manager": {
"description": "The token managers can use to join the swarm.\n",
"example": "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2",
"type": "string"
},
"Worker": {
"description": "The token workers can use to join the swarm.\n",
"example": "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx",
"type": "string"
}
},
"type": "object"
},
"LocalNodeState": {
"default": "",
"description": "Current local status of this node.",
"enum": ["", "inactive", "pending", "active", "error", "locked"],
"example": "active",
"type": "string"
},
"ManagerStatus": {
"description": "ManagerStatus represents the status of a manager.\n\nIt provides the current status of a node's manager component, if the node\nis a manager.\n",
"properties": {
"Addr": {
"description": "The IP address and port at which the manager is reachable.\n",
"example": "10.0.0.46:2377",
"type": "string"
},
"Leader": { "default": false, "example": true, "type": "boolean" },
"Reachability": { "$ref": "#/definitions/Reachability" }
},
"type": "object",
"x-nullable": true
},
"Mount": {
"properties": {
"BindOptions": {
"description": "Optional configuration for the `bind` type.",
"properties": {
"NonRecursive": {
"default": false,
"description": "Disable recursive bind mount.",
"type": "boolean"
},
"Propagation": {
"description": "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.",
"enum": [
"private",
"rprivate",
"shared",
"rshared",
"slave",
"rslave"
],
"type": "string"
}
},
"type": "object"
},
"Consistency": {
"description": "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.",
"type": "string"
},
"ReadOnly": {
"description": "Whether the mount should be read-only.",
"type": "boolean"
},
"Source": {
"description": "Mount source (e.g. a volume name, a host path).",
"type": "string"
},
"Target": { "description": "Container path.", "type": "string" },
"TmpfsOptions": {
"description": "Optional configuration for the `tmpfs` type.",
"properties": {
"Mode": {
"description": "The permission mode for the tmpfs mount in an integer.",
"type": "integer"
},
"SizeBytes": {
"description": "The size for the tmpfs mount in bytes.",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Type": {
"description": "The mount type. Available types:\n\n- `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.\n- `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.\n- `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.\n- `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.\n",
"enum": ["bind", "volume", "tmpfs", "npipe"],
"type": "string"
},
"VolumeOptions": {
"description": "Optional configuration for the `volume` type.",
"properties": {
"DriverConfig": {
"description": "Map of driver specific options",
"properties": {
"Name": {
"description": "Name of the driver to use to create the volume.",
"type": "string"
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "key/value map of driver specific options.",
"type": "object"
}
},
"type": "object"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"NoCopy": {
"default": false,
"description": "Populate volume with data from the target.",
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object"
},
"MountPoint": {
"description": "A mount point inside a container",
"properties": {
"Destination": { "type": "string" },
"Driver": { "type": "string" },
"Mode": { "type": "string" },
"Name": { "type": "string" },
"Propagation": { "type": "string" },
"RW": { "type": "boolean" },
"Source": { "type": "string" },
"Type": { "type": "string" }
},
"type": "object"
},
"Network": {
"example": {
"Attachable": false,
"Containers": {
"19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c": {
"EndpointID": "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": "",
"MacAddress": "02:42:ac:13:00:02",
"Name": "test"
}
},
"Created": "2016-10-19T04:33:30.360899459Z",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Config": [{ "Gateway": "172.19.0.1", "Subnet": "172.19.0.0/16" }],
"Driver": "default",
"Options": { "foo": "bar" }
},
"Id": "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99",
"Ingress": false,
"Internal": false,
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Name": "net01",
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Scope": "local"
},
"properties": {
"Attachable": { "type": "boolean" },
"Containers": {
"additionalProperties": { "$ref": "#/definitions/NetworkContainer" },
"type": "object"
},
"Created": { "format": "dateTime", "type": "string" },
"Driver": { "type": "string" },
"EnableIPv6": { "type": "boolean" },
"IPAM": { "$ref": "#/definitions/IPAM" },
"Id": { "type": "string" },
"Ingress": { "type": "boolean" },
"Internal": { "type": "boolean" },
"Labels": {
"additionalProperties": { "type": "string" },
"type": "object"
},
"Name": { "type": "string" },
"Options": {
"additionalProperties": { "type": "string" },
"type": "object"
},
"Scope": { "type": "string" }
},
"type": "object"
},
"NetworkAttachmentConfig": {
"description": "Specifies how a service should be attached to a particular network.",
"properties": {
"Aliases": {
"description": "Discoverable alternate names for the service on this network.",
"items": { "type": "string" },
"type": "array"
},
"DriverOpts": {
"additionalProperties": { "type": "string" },
"description": "Driver attachment options for the network target",
"type": "object"
},
"Target": {
"description": "The target network for attachment. Must be a network name or ID.",
"type": "string"
}
},
"type": "object"
},
"NetworkContainer": {
"properties": {
"EndpointID": { "type": "string" },
"IPv4Address": { "type": "string" },
"IPv6Address": { "type": "string" },
"MacAddress": { "type": "string" },
"Name": { "type": "string" }
},
"type": "object"
},
"NetworkSettings": {
"description": "NetworkSettings exposes the network settings in the API",
"properties": {
"Bridge": {
"description": "Name of the network'a bridge (for example, `docker0`).",
"example": "docker0",
"type": "string"
},
"EndpointID": {
"description": "EndpointID uniquely represents a service endpoint in a Sandbox.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b",
"type": "string"
},
"Gateway": {
"description": "Gateway address for the default \"bridge\" network.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "172.17.0.1",
"type": "string"
},
"GlobalIPv6Address": {
"description": "Global IPv6 address for the default \"bridge\" network.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "2001:db8::5689",
"type": "string"
},
"GlobalIPv6PrefixLen": {
"description": "Mask length of the global IPv6 address.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": 64,
"type": "integer"
},
"HairpinMode": {
"description": "Indicates if hairpin NAT should be enabled on the virtual interface.\n",
"example": false,
"type": "boolean"
},
"IPAddress": {
"description": "IPv4 address for the default \"bridge\" network.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "172.17.0.4",
"type": "string"
},
"IPPrefixLen": {
"description": "Mask length of the IPv4 address.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": 16,
"type": "integer"
},
"IPv6Gateway": {
"description": "IPv6 gateway address for this network.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "2001:db8:2::100",
"type": "string"
},
"LinkLocalIPv6Address": {
"description": "IPv6 unicast address using the link-local prefix.",
"example": "fe80::42:acff:fe11:1",
"type": "string"
},
"LinkLocalIPv6PrefixLen": {
"description": "Prefix length of the IPv6 unicast address.",
"example": "64",
"type": "integer"
},
"MacAddress": {
"description": "MAC address for the container on the default \"bridge\" network.\n\n<p><br /></p>\n\n> **Deprecated**: This field is only propagated when attached to the\n> default \"bridge\" network. Use the information from the \"bridge\"\n> network inside the `Networks` map instead, which contains the same\n> information. This field was deprecated in Docker 1.9 and is scheduled\n> to be removed in Docker 17.12.0\n",
"example": "02:42:ac:11:00:04",
"type": "string"
},
"Networks": {
"additionalProperties": { "$ref": "#/definitions/EndpointSettings" },
"description": "Information about all networks that the container is connected to.\n",
"type": "object"
},
"Ports": { "$ref": "#/definitions/PortMap" },
"SandboxID": {
"description": "SandboxID uniquely represents a container's network stack.",
"example": "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3",
"type": "string"
},
"SandboxKey": {
"description": "SandboxKey identifies the sandbox",
"example": "/var/run/docker/netns/8ab54b426c38",
"type": "string"
},
"SecondaryIPAddresses": {
"description": "",
"items": { "$ref": "#/definitions/Address" },
"type": "array",
"x-nullable": true
},
"SecondaryIPv6Addresses": {
"description": "",
"items": { "$ref": "#/definitions/Address" },
"type": "array",
"x-nullable": true
}
},
"type": "object"
},
"Node": {
"properties": {
"CreatedAt": {
"description": "Date and time at which the node was added to the swarm in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2016-08-18T10:44:24.496525531Z",
"format": "dateTime",
"type": "string"
},
"Description": { "$ref": "#/definitions/NodeDescription" },
"ID": { "example": "24ifsmvkjbyhk", "type": "string" },
"ManagerStatus": { "$ref": "#/definitions/ManagerStatus" },
"Spec": { "$ref": "#/definitions/NodeSpec" },
"Status": { "$ref": "#/definitions/NodeStatus" },
"UpdatedAt": {
"description": "Date and time at which the node was last updated in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
"example": "2017-08-09T07:09:37.632105588Z",
"format": "dateTime",
"type": "string"
},
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object"
},
"NodeDescription": {
"description": "NodeDescription encapsulates the properties of the Node as reported by the\nagent.\n",
"properties": {
"Engine": { "$ref": "#/definitions/EngineDescription" },
"Hostname": { "example": "bf3067039e47", "type": "string" },
"Platform": { "$ref": "#/definitions/Platform" },
"Resources": { "$ref": "#/definitions/ResourceObject" },
"TLSInfo": { "$ref": "#/definitions/TLSInfo" }
},
"type": "object"
},
"NodeSpec": {
"example": {
"Availability": "active",
"Labels": { "foo": "bar" },
"Name": "node-name",
"Role": "manager"
},
"properties": {
"Availability": {
"description": "Availability of the node.",
"enum": ["active", "pause", "drain"],
"example": "active",
"type": "string"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Name": {
"description": "Name for the node.",
"example": "my-node",
"type": "string"
},
"Role": {
"description": "Role of the node.",
"enum": ["worker", "manager"],
"example": "manager",
"type": "string"
}
},
"type": "object"
},
"NodeState": {
"description": "NodeState represents the state of a node.",
"enum": ["unknown", "down", "ready", "disconnected"],
"example": "ready",
"type": "string"
},
"NodeStatus": {
"description": "NodeStatus represents the status of a node.\n\nIt provides the current status of the node, as seen by the manager.\n",
"properties": {
"Addr": {
"description": "IP address of the node.",
"example": "172.17.0.2",
"type": "string"
},
"Message": { "example": "", "type": "string" },
"State": { "$ref": "#/definitions/NodeState" }
},
"type": "object"
},
"ObjectVersion": {
"description": "The version number of the object such as node, service, etc. This is needed to avoid conflicting writes.\nThe client must send the version number along with the modified specification when updating these objects.\nThis approach ensures safe concurrency and determinism in that the change on the object\nmay not be applied if the version number has changed from the last read. In other words,\nif two update requests specify the same base version, only one of the requests can succeed.\nAs a result, two separate update requests that happen at the same time will not\nunintentionally overwrite each other.\n",
"properties": {
"Index": { "example": 373531, "format": "uint64", "type": "integer" }
},
"type": "object"
},
"PeerNode": {
"description": "Represents a peer-node in the swarm",
"properties": {
"Addr": {
"description": "IP address and ports at which this node can be reached.\n",
"type": "string"
},
"NodeID": {
"description": "Unique identifier of for this node in the swarm.",
"type": "string"
}
}
},
"Platform": {
"description": "Platform represents the platform (Arch/OS).\n",
"properties": {
"Architecture": {
"description": "Architecture represents the hardware architecture (for example,\n`x86_64`).\n",
"example": "x86_64",
"type": "string"
},
"OS": {
"description": "OS represents the Operating System (for example, `linux` or `windows`).\n",
"example": "linux",
"type": "string"
}
},
"type": "object"
},
"Plugin": {
"description": "A plugin for the Engine API",
"properties": {
"Config": {
"description": "The config of a plugin.",
"properties": {
"Args": {
"properties": {
"Description": {
"example": "command line arguments",
"type": "string",
"x-nullable": false
},
"Name": {
"example": "args",
"type": "string",
"x-nullable": false
},
"Settable": { "items": { "type": "string" }, "type": "array" },
"Value": { "items": { "type": "string" }, "type": "array" }
},
"required": ["Name", "Description", "Settable", "Value"],
"type": "object",
"x-nullable": false
},
"Description": {
"example": "A sample volume plugin for Docker",
"type": "string",
"x-nullable": false
},
"DockerVersion": {
"description": "Docker Version used to create the plugin",
"example": "17.06.0-ce",
"type": "string",
"x-nullable": false
},
"Documentation": {
"example": "https://docs.docker.com/engine/extend/plugins/",
"type": "string",
"x-nullable": false
},
"Entrypoint": {
"example": ["/usr/bin/sample-volume-plugin", "/data"],
"items": { "type": "string" },
"type": "array"
},
"Env": {
"example": [
{
"Description": "If set, prints debug messages",
"Name": "DEBUG",
"Settable": null,
"Value": "0"
}
],
"items": { "$ref": "#/definitions/PluginEnv" },
"type": "array"
},
"Interface": {
"description": "The interface between Docker and the plugin",
"properties": {
"ProtocolScheme": {
"description": "Protocol to use for clients connecting to the plugin.",
"enum": ["", "moby.plugins.http/v1"],
"example": "some.protocol/v1.0",
"type": "string"
},
"Socket": {
"example": "plugins.sock",
"type": "string",
"x-nullable": false
},
"Types": {
"example": ["docker.volumedriver/1.0"],
"items": { "$ref": "#/definitions/PluginInterfaceType" },
"type": "array"
}
},
"required": ["Types", "Socket"],
"type": "object",
"x-nullable": false
},
"IpcHost": {
"example": false,
"type": "boolean",
"x-nullable": false
},
"Linux": {
"properties": {
"AllowAllDevices": {
"example": false,
"type": "boolean",
"x-nullable": false
},
"Capabilities": {
"example": ["CAP_SYS_ADMIN", "CAP_SYSLOG"],
"items": { "type": "string" },
"type": "array"
},
"Devices": {
"items": { "$ref": "#/definitions/PluginDevice" },
"type": "array"
}
},
"required": ["Capabilities", "AllowAllDevices", "Devices"],
"type": "object",
"x-nullable": false
},
"Mounts": {
"items": { "$ref": "#/definitions/PluginMount" },
"type": "array"
},
"Network": {
"properties": {
"Type": {
"example": "host",
"type": "string",
"x-nullable": false
}
},
"required": ["Type"],
"type": "object",
"x-nullable": false
},
"PidHost": {
"example": false,
"type": "boolean",
"x-nullable": false
},
"PropagatedMount": {
"example": "/mnt/volumes",
"type": "string",
"x-nullable": false
},
"User": {
"properties": {
"GID": {
"example": 1000,
"format": "uint32",
"type": "integer"
},
"UID": {
"example": 1000,
"format": "uint32",
"type": "integer"
}
},
"type": "object",
"x-nullable": false
},
"WorkDir": {
"example": "/bin/",
"type": "string",
"x-nullable": false
},
"rootfs": {
"properties": {
"diff_ids": {
"example": [
"sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887",
"sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
],
"items": { "type": "string" },
"type": "array"
},
"type": { "example": "layers", "type": "string" }
},
"type": "object"
}
},
"required": [
"Description",
"Documentation",
"Interface",
"Entrypoint",
"WorkDir",
"Network",
"Linux",
"PidHost",
"PropagatedMount",
"IpcHost",
"Mounts",
"Env",
"Args"
],
"type": "object",
"x-nullable": false
},
"Enabled": {
"description": "True if the plugin is running. False if the plugin is not running, only installed.",
"example": true,
"type": "boolean",
"x-nullable": false
},
"Id": {
"example": "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078",
"type": "string"
},
"Name": {
"example": "tiborvass/sample-volume-plugin",
"type": "string",
"x-nullable": false
},
"PluginReference": {
"description": "plugin remote reference used to push/pull the plugin",
"example": "localhost:5000/tiborvass/sample-volume-plugin:latest",
"type": "string",
"x-nullable": false
},
"Settings": {
"description": "Settings that can be modified by users.",
"properties": {
"Args": { "items": { "type": "string" }, "type": "array" },
"Devices": {
"items": { "$ref": "#/definitions/PluginDevice" },
"type": "array"
},
"Env": {
"example": ["DEBUG=0"],
"items": { "type": "string" },
"type": "array"
},
"Mounts": {
"items": { "$ref": "#/definitions/PluginMount" },
"type": "array"
}
},
"required": ["Args", "Devices", "Env", "Mounts"],
"type": "object",
"x-nullable": false
}
},
"required": ["Settings", "Enabled", "Config", "Name"],
"type": "object"
},
"PluginDevice": {
"properties": {
"Description": { "type": "string", "x-nullable": false },
"Name": { "type": "string", "x-nullable": false },
"Path": { "example": "/dev/fuse", "type": "string" },
"Settable": { "items": { "type": "string" }, "type": "array" }
},
"required": ["Name", "Description", "Settable", "Path"],
"type": "object",
"x-nullable": false
},
"PluginEnv": {
"properties": {
"Description": { "type": "string", "x-nullable": false },
"Name": { "type": "string", "x-nullable": false },
"Settable": { "items": { "type": "string" }, "type": "array" },
"Value": { "type": "string" }
},
"required": ["Name", "Description", "Settable", "Value"],
"type": "object",
"x-nullable": false
},
"PluginInterfaceType": {
"properties": {
"Capability": { "type": "string", "x-nullable": false },
"Prefix": { "type": "string", "x-nullable": false },
"Version": { "type": "string", "x-nullable": false }
},
"required": ["Prefix", "Capability", "Version"],
"type": "object",
"x-nullable": false
},
"PluginMount": {
"properties": {
"Description": {
"example": "This is a mount that's used by the plugin.",
"type": "string",
"x-nullable": false
},
"Destination": {
"example": "/mnt/state",
"type": "string",
"x-nullable": false
},
"Name": {
"example": "some-mount",
"type": "string",
"x-nullable": false
},
"Options": {
"example": ["rbind", "rw"],
"items": { "type": "string" },
"type": "array"
},
"Settable": { "items": { "type": "string" }, "type": "array" },
"Source": { "example": "/var/lib/docker/plugins/", "type": "string" },
"Type": { "example": "bind", "type": "string", "x-nullable": false }
},
"required": [
"Name",
"Description",
"Settable",
"Source",
"Destination",
"Type",
"Options"
],
"type": "object",
"x-nullable": false
},
"PluginsInfo": {
"description": "Available plugins per type.\n\n<p><br /></p>\n\n> **Note**: Only unmanaged (V1) plugins are included in this list.\n> V1 plugins are \"lazily\" loaded, and are not returned in this list\n> if there is no resource using the plugin.\n",
"properties": {
"Authorization": {
"description": "Names of available authorization plugins.",
"example": ["img-authz-plugin", "hbm"],
"items": { "type": "string" },
"type": "array"
},
"Log": {
"description": "Names of available logging-drivers, and logging-driver plugins.",
"example": [
"awslogs",
"fluentd",
"gcplogs",
"gelf",
"journald",
"json-file",
"logentries",
"splunk",
"syslog"
],
"items": { "type": "string" },
"type": "array"
},
"Network": {
"description": "Names of available network-drivers, and network-driver plugins.",
"example": ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"],
"items": { "type": "string" },
"type": "array"
},
"Volume": {
"description": "Names of available volume-drivers, and network-driver plugins.",
"example": ["local"],
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
},
"Port": {
"description": "An open port on a container",
"example": { "PrivatePort": 8080, "PublicPort": 80, "Type": "tcp" },
"properties": {
"IP": {
"description": "Host IP address that the container's port is mapped to",
"format": "ip-address",
"type": "string"
},
"PrivatePort": {
"description": "Port on the container",
"format": "uint16",
"type": "integer",
"x-nullable": false
},
"PublicPort": {
"description": "Port exposed on the host",
"format": "uint16",
"type": "integer"
},
"Type": {
"enum": ["tcp", "udp", "sctp"],
"type": "string",
"x-nullable": false
}
},
"required": ["PrivatePort", "Type"],
"type": "object"
},
"PortBinding": {
"description": "PortBinding represents a binding between a host IP address and a host\nport.\n",
"properties": {
"HostIp": {
"description": "Host IP address that the container's port is mapped to.",
"example": "127.0.0.1",
"type": "string"
},
"HostPort": {
"description": "Host port number that the container's port is mapped to.",
"example": "4443",
"type": "string"
}
},
"type": "object"
},
"PortMap": {
"additionalProperties": {
"items": { "$ref": "#/definitions/PortBinding" },
"type": "array",
"x-nullable": true
},
"description": "PortMap describes the mapping of container ports to host ports, using the\ncontainer's port-number and protocol as key in the format `<port>/<protocol>`,\nfor example, `80/udp`.\n\nIf a container's port is mapped for multiple protocols, separate entries\nare added to the mapping table.\n",
"example": {
"2377/tcp": null,
"443/tcp": [{ "HostIp": "127.0.0.1", "HostPort": "4443" }],
"53/udp": [{ "HostIp": "0.0.0.0", "HostPort": "53" }],
"80/tcp": [
{ "HostIp": "0.0.0.0", "HostPort": "80" },
{ "HostIp": "0.0.0.0", "HostPort": "8080" }
],
"80/udp": [{ "HostIp": "0.0.0.0", "HostPort": "80" }]
},
"type": "object"
},
"ProcessConfig": {
"properties": {
"arguments": { "items": { "type": "string" }, "type": "array" },
"entrypoint": { "type": "string" },
"privileged": { "type": "boolean" },
"tty": { "type": "boolean" },
"user": { "type": "string" }
},
"type": "object"
},
"ProgressDetail": {
"properties": {
"current": { "type": "integer" },
"total": { "type": "integer" }
},
"type": "object"
},
"PushImageInfo": {
"properties": {
"error": { "type": "string" },
"progress": { "type": "string" },
"progressDetail": { "$ref": "#/definitions/ProgressDetail" },
"status": { "type": "string" }
},
"type": "object"
},
"Reachability": {
"description": "Reachability represents the reachability of a node.",
"enum": ["unknown", "unreachable", "reachable"],
"example": "reachable",
"type": "string"
},
"RegistryServiceConfig": {
"description": "RegistryServiceConfig stores daemon registry services configuration.\n",
"properties": {
"AllowNondistributableArtifactsCIDRs": {
"description": "List of IP ranges to which nondistributable artifacts can be pushed,\nusing the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).\n\nSome images (for example, Windows base images) contain artifacts\nwhose distribution is restricted by license. When these images are\npushed to a registry, restricted artifacts are not included.\n\nThis configuration override this behavior, and enables the daemon to\npush nondistributable artifacts to all registries whose resolved IP\naddress is within the subnet described by the CIDR syntax.\n\nThis option is useful when pushing images containing\nnondistributable artifacts to a registry on an air-gapped network so\nhosts on that network can pull the images without connecting to\nanother server.\n\n> **Warning**: Nondistributable artifacts typically have restrictions\n> on how and where they can be distributed and shared. Only use this\n> feature to push artifacts to private registries and ensure that you\n> are in compliance with any terms that cover redistributing\n> nondistributable artifacts.\n",
"example": ["::1/128", "127.0.0.0/8"],
"items": { "type": "string" },
"type": "array"
},
"AllowNondistributableArtifactsHostnames": {
"description": "List of registry hostnames to which nondistributable artifacts can be\npushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.\n\nSome images (for example, Windows base images) contain artifacts\nwhose distribution is restricted by license. When these images are\npushed to a registry, restricted artifacts are not included.\n\nThis configuration override this behavior for the specified\nregistries.\n\nThis option is useful when pushing images containing\nnondistributable artifacts to a registry on an air-gapped network so\nhosts on that network can pull the images without connecting to\nanother server.\n\n> **Warning**: Nondistributable artifacts typically have restrictions\n> on how and where they can be distributed and shared. Only use this\n> feature to push artifacts to private registries and ensure that you\n> are in compliance with any terms that cover redistributing\n> nondistributable artifacts.\n",
"example": [
"registry.internal.corp.example.com:3000",
"[2001:db8:a0b:12f0::1]:443"
],
"items": { "type": "string" },
"type": "array"
},
"IndexConfigs": {
"additionalProperties": { "$ref": "#/definitions/IndexInfo" },
"example": {
"127.0.0.1:5000": {
"Mirrors": [],
"Name": "127.0.0.1:5000",
"Official": false,
"Secure": false
},
"[2001:db8:a0b:12f0::1]:80": {
"Mirrors": [],
"Name": "[2001:db8:a0b:12f0::1]:80",
"Official": false,
"Secure": false
},
"docker.io": {
"Mirrors": ["https://hub-mirror.corp.example.com:5000/"],
"Name": "docker.io",
"Official": true,
"Secure": true
},
"registry.internal.corp.example.com:3000": {
"Mirrors": [],
"Name": "registry.internal.corp.example.com:3000",
"Official": false,
"Secure": false
}
},
"type": "object"
},
"InsecureRegistryCIDRs": {
"description": "List of IP ranges of insecure registries, using the CIDR syntax\n([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries\naccept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates\nfrom unknown CAs) communication.\n\nBy default, local registries (`127.0.0.0/8`) are configured as\ninsecure. All other registries are secure. Communicating with an\ninsecure registry is not possible if the daemon assumes that registry\nis secure.\n\nThis configuration override this behavior, insecure communication with\nregistries whose resolved IP address is within the subnet described by\nthe CIDR syntax.\n\nRegistries can also be marked insecure by hostname. Those registries\nare listed under `IndexConfigs` and have their `Secure` field set to\n`false`.\n\n> **Warning**: Using this option can be useful when running a local\n> registry, but introduces security vulnerabilities. This option\n> should therefore ONLY be used for testing purposes. For increased\n> security, users should add their CA to their system's list of trusted\n> CAs instead of enabling this option.\n",
"example": ["::1/128", "127.0.0.0/8"],
"items": { "type": "string" },
"type": "array"
},
"Mirrors": {
"description": "List of registry URLs that act as a mirror for the official\n(`docker.io`) registry.\n",
"example": [
"https://hub-mirror.corp.example.com:5000/",
"https://[2001:db8:a0b:12f0::1]/"
],
"items": { "type": "string" },
"type": "array"
}
},
"type": "object",
"x-nullable": true
},
"ResourceObject": {
"description": "An object describing the resources which can be advertised by a node and requested by a task",
"properties": {
"GenericResources": { "$ref": "#/definitions/GenericResources" },
"MemoryBytes": {
"example": 8272408576,
"format": "int64",
"type": "integer"
},
"NanoCPUs": {
"example": 4000000000,
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Resources": {
"description": "A container's resources (cgroups config, ulimits, etc)",
"properties": {
"BlkioDeviceReadBps": {
"description": "Limit read rate (bytes per second) from a device, in the form `[{\"Path\": \"device_path\", \"Rate\": rate}]`.\n",
"items": { "$ref": "#/definitions/ThrottleDevice" },
"type": "array"
},
"BlkioDeviceReadIOps": {
"description": "Limit read rate (IO per second) from a device, in the form `[{\"Path\": \"device_path\", \"Rate\": rate}]`.\n",
"items": { "$ref": "#/definitions/ThrottleDevice" },
"type": "array"
},
"BlkioDeviceWriteBps": {
"description": "Limit write rate (bytes per second) to a device, in the form `[{\"Path\": \"device_path\", \"Rate\": rate}]`.\n",
"items": { "$ref": "#/definitions/ThrottleDevice" },
"type": "array"
},
"BlkioDeviceWriteIOps": {
"description": "Limit write rate (IO per second) to a device, in the form `[{\"Path\": \"device_path\", \"Rate\": rate}]`.\n",
"items": { "$ref": "#/definitions/ThrottleDevice" },
"type": "array"
},
"BlkioWeight": {
"description": "Block IO weight (relative weight).",
"maximum": 1000,
"minimum": 0,
"type": "integer"
},
"BlkioWeightDevice": {
"description": "Block IO weight (relative device weight) in the form `[{\"Path\": \"device_path\", \"Weight\": weight}]`.\n",
"items": {
"properties": {
"Path": { "type": "string" },
"Weight": { "minimum": 0, "type": "integer" }
},
"type": "object"
},
"type": "array"
},
"CgroupParent": {
"description": "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.",
"type": "string"
},
"CpuCount": {
"description": "The number of usable CPUs (Windows only).\n\nOn Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.\n",
"format": "int64",
"type": "integer"
},
"CpuPercent": {
"description": "The usable percentage of the available CPUs (Windows only).\n\nOn Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.\n",
"format": "int64",
"type": "integer"
},
"CpuPeriod": {
"description": "The length of a CPU period in microseconds.",
"format": "int64",
"type": "integer"
},
"CpuQuota": {
"description": "Microseconds of CPU time that the container can get in a CPU period.",
"format": "int64",
"type": "integer"
},
"CpuRealtimePeriod": {
"description": "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.",
"format": "int64",
"type": "integer"
},
"CpuRealtimeRuntime": {
"description": "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.",
"format": "int64",
"type": "integer"
},
"CpuShares": {
"description": "An integer value representing this container's relative CPU weight versus other containers.",
"type": "integer"
},
"CpusetCpus": {
"description": "CPUs in which to allow execution (e.g., `0-3`, `0,1`)",
"example": "0-3",
"type": "string"
},
"CpusetMems": {
"description": "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.",
"type": "string"
},
"DeviceCgroupRules": {
"description": "a list of cgroup rules to apply to the container",
"items": { "example": "c 13:* rwm", "type": "string" },
"type": "array"
},
"DeviceRequests": {
"description": "a list of requests for devices to be sent to device drivers",
"items": { "$ref": "#/definitions/DeviceRequest" },
"type": "array"
},
"Devices": {
"description": "A list of devices to add to the container.",
"items": { "$ref": "#/definitions/DeviceMapping" },
"type": "array"
},
"IOMaximumBandwidth": {
"description": "Maximum IO in bytes per second for the container system drive (Windows only)",
"format": "int64",
"type": "integer"
},
"IOMaximumIOps": {
"description": "Maximum IOps for the container system drive (Windows only)",
"format": "int64",
"type": "integer"
},
"Init": {
"description": "Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.",
"type": "boolean",
"x-nullable": true
},
"KernelMemory": {
"description": "Kernel memory limit in bytes.",
"example": 209715200,
"format": "int64",
"type": "integer"
},
"KernelMemoryTCP": {
"description": "Hard limit for kernel TCP buffer memory (in bytes).",
"format": "int64",
"type": "integer"
},
"Memory": {
"default": 0,
"description": "Memory limit in bytes.",
"format": "int64",
"type": "integer"
},
"MemoryReservation": {
"description": "Memory soft limit in bytes.",
"format": "int64",
"type": "integer"
},
"MemorySwap": {
"description": "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.",
"format": "int64",
"type": "integer"
},
"MemorySwappiness": {
"description": "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.",
"format": "int64",
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"NanoCPUs": {
"description": "CPU quota in units of 10<sup>-9</sup> CPUs.",
"format": "int64",
"type": "integer"
},
"OomKillDisable": {
"description": "Disable OOM Killer for the container.",
"type": "boolean"
},
"PidsLimit": {
"description": "Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change.\n",
"format": "int64",
"type": "integer",
"x-nullable": true
},
"Ulimits": {
"description": "A list of resource limits to set in the container. For example: `{\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}`\"\n",
"items": {
"properties": {
"Hard": { "description": "Hard limit", "type": "integer" },
"Name": { "description": "Name of ulimit", "type": "string" },
"Soft": { "description": "Soft limit", "type": "integer" }
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"RestartPolicy": {
"description": "The behavior to apply when the container exits. The default is not to restart.\n\nAn ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.\n",
"properties": {
"MaximumRetryCount": {
"description": "If `on-failure` is used, the number of times to retry before giving up",
"type": "integer"
},
"Name": {
"description": "- Empty string means not to restart\n- `always` Always restart\n- `unless-stopped` Restart always except when the user has manually stopped the container\n- `on-failure` Restart only when the container exit code is non-zero\n",
"enum": ["", "always", "unless-stopped", "on-failure"],
"type": "string"
}
},
"type": "object"
},
"Runtime": {
"description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)\nruntime.\n\nThe runtime is invoked by the daemon via the `containerd` daemon. OCI\nruntimes act as an interface to the Linux kernel namespaces, cgroups,\nand SELinux.\n",
"properties": {
"path": {
"description": "Name and, optional, path, of the OCI executable binary.\n\nIf the path is omitted, the daemon searches the host's `$PATH` for the\nbinary and uses the first result.\n",
"example": "/usr/local/bin/my-oci-runtime",
"type": "string"
},
"runtimeArgs": {
"description": "List of command-line arguments to pass to the runtime when invoked.\n",
"example": ["--debug", "--systemd-cgroup=false"],
"items": { "type": "string" },
"type": "array",
"x-nullable": true
}
},
"type": "object"
},
"Secret": {
"properties": {
"CreatedAt": {
"example": "2017-07-20T13:55:28.678958722Z",
"format": "dateTime",
"type": "string"
},
"ID": { "example": "blt1owaxmitz71s9v5zh81zun", "type": "string" },
"Spec": { "$ref": "#/definitions/SecretSpec" },
"UpdatedAt": {
"example": "2017-07-20T13:55:28.678958722Z",
"format": "dateTime",
"type": "string"
},
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object"
},
"SecretSpec": {
"properties": {
"Data": {
"description": "Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-3.2))\ndata to store as secret.\n\nThis field is only used to _create_ a secret, and is not returned by\nother endpoints.\n",
"example": "",
"type": "string"
},
"Driver": {
"$ref": "#/definitions/Driver",
"description": "Name of the secrets driver used to fetch the secret's value from an external secret store"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"example": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"type": "object"
},
"Name": {
"description": "User-defined name of the secret.",
"type": "string"
},
"Templating": {
"$ref": "#/definitions/Driver",
"description": "Templating driver, if applicable\n\nTemplating controls whether and how to evaluate the config payload as\na template. If no driver is set, no templating is used.\n"
}
},
"type": "object"
},
"Service": {
"example": {
"CreatedAt": "2016-06-07T21:05:51.880065305Z",
"Endpoint": {
"Ports": [
{ "Protocol": "tcp", "PublishedPort": 30001, "TargetPort": 6379 }
],
"Spec": {
"Mode": "vip",
"Ports": [
{ "Protocol": "tcp", "PublishedPort": 30001, "TargetPort": 6379 }
]
},
"VirtualIPs": [
{
"Addr": "10.255.0.2/16",
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1"
},
{
"Addr": "10.255.0.3/16",
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1"
}
]
},
"ID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"Spec": {
"EndpointSpec": {
"Mode": "vip",
"Ports": [
{ "Protocol": "tcp", "PublishedPort": 30001, "TargetPort": 6379 }
]
},
"Mode": { "Replicated": { "Replicas": 1 } },
"Name": "hopeful_cori",
"RollbackConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 1
},
"TaskTemplate": {
"ContainerSpec": { "Image": "redis" },
"ForceUpdate": 0,
"Placement": {},
"Resources": { "Limits": {}, "Reservations": {} },
"RestartPolicy": { "Condition": "any", "MaxAttempts": 0 }
},
"UpdateConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 1
}
},
"UpdatedAt": "2016-06-07T21:07:29.962229872Z",
"Version": { "Index": 19 }
},
"properties": {
"CreatedAt": { "format": "dateTime", "type": "string" },
"Endpoint": {
"properties": {
"Ports": {
"items": { "$ref": "#/definitions/EndpointPortConfig" },
"type": "array"
},
"Spec": { "$ref": "#/definitions/EndpointSpec" },
"VirtualIPs": {
"items": {
"properties": {
"Addr": { "type": "string" },
"NetworkID": { "type": "string" }
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"ID": { "type": "string" },
"Spec": { "$ref": "#/definitions/ServiceSpec" },
"UpdateStatus": {
"description": "The status of a service update.",
"properties": {
"CompletedAt": { "format": "dateTime", "type": "string" },
"Message": { "type": "string" },
"StartedAt": { "format": "dateTime", "type": "string" },
"State": {
"enum": ["updating", "paused", "completed"],
"type": "string"
}
},
"type": "object"
},
"UpdatedAt": { "format": "dateTime", "type": "string" },
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object"
},
"ServiceSpec": {
"description": "User modifiable configuration for a service.",
"properties": {
"EndpointSpec": { "$ref": "#/definitions/EndpointSpec" },
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Mode": {
"description": "Scheduling mode for the service.",
"properties": {
"Global": { "type": "object" },
"Replicated": {
"properties": {
"Replicas": { "format": "int64", "type": "integer" }
},
"type": "object"
}
},
"type": "object"
},
"Name": { "description": "Name of the service.", "type": "string" },
"Networks": {
"description": "Specifies which networks the service should attach to.",
"items": { "$ref": "#/definitions/NetworkAttachmentConfig" },
"type": "array"
},
"RollbackConfig": {
"description": "Specification for the rollback strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between rollback iterations, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an rolled back task fails to run, or stops running during the rollback.",
"enum": ["continue", "pause"],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1.",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each rolled back task for failures, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down.",
"enum": ["stop-first", "start-first"],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism).",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"TaskTemplate": { "$ref": "#/definitions/TaskSpec" },
"UpdateConfig": {
"description": "Specification for the update strategy of the service.",
"properties": {
"Delay": {
"description": "Amount of time between updates, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"FailureAction": {
"description": "Action to take if an updated task fails to run, or stops running during the update.",
"enum": ["continue", "pause", "rollback"],
"type": "string"
},
"MaxFailureRatio": {
"default": 0,
"description": "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1.",
"type": "number"
},
"Monitor": {
"description": "Amount of time to monitor each updated task for failures, in nanoseconds.",
"format": "int64",
"type": "integer"
},
"Order": {
"description": "The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down.",
"enum": ["stop-first", "start-first"],
"type": "string"
},
"Parallelism": {
"description": "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism).",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}
}
},
"ServiceUpdateResponse": {
"example": {
"Warning": "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
},
"properties": {
"Warnings": {
"description": "Optional warning messages",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
},
"Swarm": {
"allOf": [
{ "$ref": "#/definitions/ClusterInfo" },
{
"properties": {
"JoinTokens": { "$ref": "#/definitions/JoinTokens" }
},
"type": "object"
}
],
"type": "object"
},
"SwarmInfo": {
"description": "Represents generic information about swarm.\n",
"properties": {
"Cluster": { "$ref": "#/definitions/ClusterInfo" },
"ControlAvailable": {
"default": false,
"example": true,
"type": "boolean"
},
"Error": { "default": "", "type": "string" },
"LocalNodeState": { "$ref": "#/definitions/LocalNodeState" },
"Managers": {
"description": "Total number of managers in the swarm.",
"example": 3,
"type": "integer",
"x-nullable": true
},
"NodeAddr": {
"default": "",
"description": "IP address at which this node can be reached by other nodes in the\nswarm.\n",
"example": "10.0.0.46",
"type": "string"
},
"NodeID": {
"default": "",
"description": "Unique identifier of for this node in the swarm.",
"example": "k67qz4598weg5unwwffg6z1m1",
"type": "string"
},
"Nodes": {
"description": "Total number of nodes in the swarm.",
"example": 4,
"type": "integer",
"x-nullable": true
},
"RemoteManagers": {
"default": null,
"description": "List of ID's and addresses of other managers in the swarm.\n",
"example": [
{
"Addr": "10.0.0.158:2377",
"NodeID": "71izy0goik036k48jg985xnds"
},
{
"Addr": "10.0.0.159:2377",
"NodeID": "79y6h1o4gv8n120drcprv5nmc"
},
{ "Addr": "10.0.0.46:2377", "NodeID": "k67qz4598weg5unwwffg6z1m1" }
],
"items": { "$ref": "#/definitions/PeerNode" },
"type": "array",
"x-nullable": true
}
},
"type": "object"
},
"SwarmSpec": {
"description": "User modifiable swarm configuration.",
"properties": {
"CAConfig": {
"description": "CA configuration.",
"properties": {
"ExternalCAs": {
"description": "Configuration for forwarding signing requests to an external certificate authority.",
"items": {
"properties": {
"CACert": {
"description": "The root CA certificate (in PEM format) this external CA uses to issue TLS certificates (assumed to be to the current swarm root CA certificate if not provided).",
"type": "string"
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver.",
"type": "object"
},
"Protocol": {
"default": "cfssl",
"description": "Protocol for communication with the external CA (currently only `cfssl` is supported).",
"enum": ["cfssl"],
"type": "string"
},
"URL": {
"description": "URL where certificate signing requests should be sent.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"ForceRotate": {
"description": "An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey`",
"format": "uint64",
"type": "integer"
},
"NodeCertExpiry": {
"description": "The duration node certificates are issued for.",
"example": 7776000000000000,
"format": "int64",
"type": "integer"
},
"SigningCACert": {
"description": "The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format.",
"type": "string"
},
"SigningCAKey": {
"description": "The desired signing CA key for all swarm node TLS leaf certificates, in PEM format.",
"type": "string"
}
},
"type": "object",
"x-nullable": true
},
"Dispatcher": {
"description": "Dispatcher configuration.",
"properties": {
"HeartbeatPeriod": {
"description": "The delay for an agent to send a heartbeat to the dispatcher.",
"example": 5000000000,
"format": "int64",
"type": "integer"
}
},
"type": "object",
"x-nullable": true
},
"EncryptionConfig": {
"description": "Parameters related to encryption-at-rest.",
"properties": {
"AutoLockManagers": {
"description": "If set, generate a key and use it to lock data stored on the managers.",
"example": false,
"type": "boolean"
}
},
"type": "object"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"example": {
"com.example.corp.department": "engineering",
"com.example.corp.type": "production"
},
"type": "object"
},
"Name": {
"description": "Name of the swarm.",
"example": "default",
"type": "string"
},
"Orchestration": {
"description": "Orchestration configuration.",
"properties": {
"TaskHistoryRetentionLimit": {
"description": "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks.",
"example": 10,
"format": "int64",
"type": "integer"
}
},
"type": "object",
"x-nullable": true
},
"Raft": {
"description": "Raft configuration.",
"properties": {
"ElectionTick": {
"description": "The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`.\n\nA tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.\n",
"example": 3,
"type": "integer"
},
"HeartbeatTick": {
"description": "The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers.\n\nA tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.\n",
"example": 1,
"type": "integer"
},
"KeepOldSnapshots": {
"description": "The number of snapshots to keep beyond the current snapshot.",
"format": "uint64",
"type": "integer"
},
"LogEntriesForSlowFollowers": {
"description": "The number of log entries to keep around to sync up slow followers after a snapshot is created.",
"example": 500,
"format": "uint64",
"type": "integer"
},
"SnapshotInterval": {
"description": "The number of log entries between snapshots.",
"example": 10000,
"format": "uint64",
"type": "integer"
}
},
"type": "object"
},
"TaskDefaults": {
"description": "Defaults for creating tasks in this cluster.",
"properties": {
"LogDriver": {
"description": "The log driver to use for tasks created in the orchestrator if\nunspecified by a service.\n\nUpdating this value only affects new tasks. Existing tasks continue\nto use their previously configured log driver until recreated.\n",
"properties": {
"Name": {
"description": "The log driver to use as a default for new tasks.\n",
"example": "json-file",
"type": "string"
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "Driver-specific options for the selectd log driver, specified\nas key/value pairs.\n",
"example": { "max-file": "10", "max-size": "100m" },
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"SystemInfo": {
"properties": {
"Architecture": {
"description": "Hardware architecture of the host, as returned by the Go runtime\n(`GOARCH`).\n\nA full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).\n",
"example": "x86_64",
"type": "string"
},
"BridgeNfIp6tables": {
"description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.",
"example": true,
"type": "boolean"
},
"BridgeNfIptables": {
"description": "Indicates if `bridge-nf-call-iptables` is available on the host.",
"example": true,
"type": "boolean"
},
"CPUSet": {
"description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.\n\nSee [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)\n",
"example": true,
"type": "boolean"
},
"CPUShares": {
"description": "Indicates if CPU Shares limiting is supported by the host.",
"example": true,
"type": "boolean"
},
"CgroupDriver": {
"default": "cgroupfs",
"description": "The driver to use for managing cgroups.\n",
"enum": ["cgroupfs", "systemd", "none"],
"example": "cgroupfs",
"type": "string"
},
"ClusterAdvertise": {
"description": "The network endpoint that the Engine advertises for the purpose of\nnode discovery. ClusterAdvertise is a `host:port` combination on which\nthe daemon is reachable by other hosts.\n\n<p><br /></p>\n\n> **Note**: This field is only propagated when using standalone Swarm\n> mode, and overlay networking using an external k/v store. Overlay\n> networks with Swarm mode enabled use the built-in raft store, and\n> this field will be empty.\n",
"example": "node5.corp.example.com:8000",
"type": "string"
},
"ClusterStore": {
"description": "URL of the distributed storage backend.\n\n\nThe storage backend is used for multihost networking (to store\nnetwork and endpoint information) and by the node discovery mechanism.\n\n<p><br /></p>\n\n> **Note**: This field is only propagated when using standalone Swarm\n> mode, and overlay networking using an external k/v store. Overlay\n> networks with Swarm mode enabled use the built-in raft store, and\n> this field will be empty.\n",
"example": "consul://consul.corp.example.com:8600/some/path",
"type": "string"
},
"ContainerdCommit": { "$ref": "#/definitions/Commit" },
"Containers": {
"description": "Total number of containers on the host.",
"example": 14,
"type": "integer"
},
"ContainersPaused": {
"description": "Number of containers with status `\"paused\"`.\n",
"example": 1,
"type": "integer"
},
"ContainersRunning": {
"description": "Number of containers with status `\"running\"`.\n",
"example": 3,
"type": "integer"
},
"ContainersStopped": {
"description": "Number of containers with status `\"stopped\"`.\n",
"example": 10,
"type": "integer"
},
"CpuCfsPeriod": {
"description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.",
"example": true,
"type": "boolean"
},
"CpuCfsQuota": {
"description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.",
"example": true,
"type": "boolean"
},
"Debug": {
"description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.",
"example": true,
"type": "boolean"
},
"DefaultRuntime": {
"default": "runc",
"description": "Name of the default OCI runtime that is used when starting containers.\n\nThe default can be overridden per-container at create time.\n",
"example": "runc",
"type": "string"
},
"DockerRootDir": {
"description": "Root directory of persistent Docker state.\n\nDefaults to `/var/lib/docker` on Linux, and `C:\\ProgramData\\docker`\non Windows.\n",
"example": "/var/lib/docker",
"type": "string"
},
"Driver": {
"description": "Name of the storage driver in use.",
"example": "overlay2",
"type": "string"
},
"DriverStatus": {
"description": "Information specific to the storage driver, provided as\n\"label\" / \"value\" pairs.\n\nThis information is provided by the storage driver, and formatted\nin a way consistent with the output of `docker info` on the command\nline.\n\n<p><br /></p>\n\n> **Note**: The information returned in this field, including the\n> formatting of values and labels, should not be considered stable,\n> and may change without notice.\n",
"example": [
["Backing Filesystem", "extfs"],
["Supports d_type", "true"],
["Native Overlay Diff", "true"]
],
"items": { "items": { "type": "string" }, "type": "array" },
"type": "array"
},
"ExperimentalBuild": {
"description": "Indicates if experimental features are enabled on the daemon.\n",
"example": true,
"type": "boolean"
},
"GenericResources": { "$ref": "#/definitions/GenericResources" },
"HttpProxy": {
"description": "HTTP-proxy configured for the daemon. This value is obtained from the\n[`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.\nCredentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL\nare masked in the API response.\n\nContainers do not automatically inherit this configuration.\n",
"example": "http://xxxxx:xxxxx@proxy.corp.example.com:8080",
"type": "string"
},
"HttpsProxy": {
"description": "HTTPS-proxy configured for the daemon. This value is obtained from the\n[`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.\nCredentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL\nare masked in the API response.\n\nContainers do not automatically inherit this configuration.\n",
"example": "https://xxxxx:xxxxx@proxy.corp.example.com:4443",
"type": "string"
},
"ID": {
"description": "Unique identifier of the daemon.\n\n<p><br /></p>\n\n> **Note**: The format of the ID itself is not part of the API, and\n> should not be considered stable.\n",
"example": "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS",
"type": "string"
},
"IPv4Forwarding": {
"description": "Indicates IPv4 forwarding is enabled.",
"example": true,
"type": "boolean"
},
"Images": {
"description": "Total number of images on the host.\n\nBoth _tagged_ and _untagged_ (dangling) images are counted.\n",
"example": 508,
"type": "integer"
},
"IndexServerAddress": {
"default": "https://index.docker.io/v1/",
"description": "Address / URL of the index server that is used for image search,\nand as a default for user authentication for Docker Hub and Docker Cloud.\n",
"example": "https://index.docker.io/v1/",
"type": "string"
},
"InitBinary": {
"description": "Name and, optional, path of the `docker-init` binary.\n\nIf the path is omitted, the daemon searches the host's `$PATH` for the\nbinary and uses the first result.\n",
"example": "docker-init",
"type": "string"
},
"InitCommit": { "$ref": "#/definitions/Commit" },
"Isolation": {
"default": "default",
"description": "Represents the isolation technology to use as a default for containers.\nThe supported values are platform-specific.\n\nIf no isolation value is specified on daemon start, on Windows client,\nthe default is `hyperv`, and on Windows server, the default is `process`.\n\nThis option is currently not used on other platforms.\n",
"enum": ["default", "hyperv", "process"],
"type": "string"
},
"KernelMemory": {
"description": "Indicates if the host has kernel memory limit support enabled.",
"example": true,
"type": "boolean"
},
"KernelVersion": {
"description": "Kernel version of the host.\n\nOn Linux, this information obtained from `uname`. On Windows this\ninformation is queried from the <kbd>HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\</kbd>\nregistry value, for example _\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\"_.\n",
"example": "4.9.38-moby",
"type": "string"
},
"Labels": {
"description": "User-defined labels (key/value metadata) as set on the daemon.\n\n<p><br /></p>\n\n> **Note**: When part of a Swarm, nodes can both have _daemon_ labels,\n> set through the daemon configuration, and _node_ labels, set from a\n> manager node in the Swarm. Node labels are not included in this\n> field. Node labels can be retrieved using the `/nodes/(id)` endpoint\n> on a manager node in the Swarm.\n",
"example": ["storage=ssd", "production"],
"items": { "type": "string" },
"type": "array"
},
"LiveRestoreEnabled": {
"default": false,
"description": "Indicates if live restore is enabled.\n\nIf enabled, containers are kept running when the daemon is shutdown\nor upon daemon start if running containers are detected.\n",
"example": false,
"type": "boolean"
},
"LoggingDriver": {
"description": "The logging driver to use as a default for new containers.\n",
"type": "string"
},
"MemTotal": {
"description": "Total amount of physical memory available on the host, in kilobytes (kB).\n",
"example": 2095882240,
"format": "int64",
"type": "integer"
},
"MemoryLimit": {
"description": "Indicates if the host has memory limit support enabled.",
"example": true,
"type": "boolean"
},
"NCPU": {
"description": "The number of logical CPUs usable by the daemon.\n\nThe number of available CPUs is checked by querying the operating\nsystem when the daemon starts. Changes to operating system CPU\nallocation after the daemon is started are not reflected.\n",
"example": 4,
"type": "integer"
},
"NEventsListener": {
"description": "Number of event listeners subscribed.",
"example": 30,
"type": "integer"
},
"NFd": {
"description": "The total number of file Descriptors in use by the daemon process.\n\nThis information is only returned if debug-mode is enabled.\n",
"example": 64,
"type": "integer"
},
"NGoroutines": {
"description": "The number of goroutines that currently exist.\n\nThis information is only returned if debug-mode is enabled.\n",
"example": 174,
"type": "integer"
},
"Name": {
"description": "Hostname of the host.",
"example": "node5.corp.example.com",
"type": "string"
},
"NoProxy": {
"description": "Comma-separated list of domain extensions for which no proxy should be\nused. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)\nenvironment variable.\n\nContainers do not automatically inherit this configuration.\n",
"example": "*.local, 169.254/16",
"type": "string"
},
"OSType": {
"description": "Generic type of the operating system of the host, as returned by the\nGo runtime (`GOOS`).\n\nCurrently returned values are \"linux\" and \"windows\". A full list of\npossible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).\n",
"example": "linux",
"type": "string"
},
"OomKillDisable": {
"description": "Indicates if OOM killer disable is supported on the host.",
"type": "boolean"
},
"OperatingSystem": {
"description": "Name of the host's operating system, for example: \"Ubuntu 16.04.2 LTS\"\nor \"Windows Server 2016 Datacenter\"\n",
"example": "Alpine Linux v3.5",
"type": "string"
},
"PidsLimit": {
"description": "Indicates if the host kernel has PID limit support enabled.",
"example": true,
"type": "boolean"
},
"Plugins": { "$ref": "#/definitions/PluginsInfo" },
"ProductLicense": {
"description": "Reports a summary of the product license on the daemon.\n\nIf a commercial license has been applied to the daemon, information\nsuch as number of nodes, and expiration are included.\n",
"example": "Community Engine",
"type": "string"
},
"RegistryConfig": { "$ref": "#/definitions/RegistryServiceConfig" },
"RuncCommit": { "$ref": "#/definitions/Commit" },
"Runtimes": {
"additionalProperties": { "$ref": "#/definitions/Runtime" },
"default": { "runc": { "path": "runc" } },
"description": "List of [OCI compliant](https://github.com/opencontainers/runtime-spec)\nruntimes configured on the daemon. Keys hold the \"name\" used to\nreference the runtime.\n\nThe Docker daemon relies on an OCI compliant runtime (invoked via the\n`containerd` daemon) as its interface to the Linux kernel namespaces,\ncgroups, and SELinux.\n\nThe default runtime is `runc`, and automatically configured. Additional\nruntimes can be configured by the user and will be listed here.\n",
"example": {
"custom": {
"path": "/usr/local/bin/my-oci-runtime",
"runtimeArgs": ["--debug", "--systemd-cgroup=false"]
},
"runc": { "path": "runc" },
"runc-master": { "path": "/go/bin/runc" }
},
"type": "object"
},
"SecurityOptions": {
"description": "List of security features that are enabled on the daemon, such as\napparmor, seccomp, SELinux, user-namespaces (userns), and rootless.\n\nAdditional configuration options for each security feature may\nbe present, and are included as a comma-separated list of key/value\npairs.\n",
"example": [
"name=apparmor",
"name=seccomp,profile=default",
"name=selinux",
"name=userns",
"name=rootless"
],
"items": { "type": "string" },
"type": "array"
},
"ServerVersion": {
"description": "Version string of the daemon.\n\n> **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/)\n> returns the Swarm version instead of the daemon version, for example\n> `swarm/1.2.8`.\n",
"example": "17.06.0-ce",
"type": "string"
},
"SwapLimit": {
"description": "Indicates if the host has memory swap limit support enabled.",
"example": true,
"type": "boolean"
},
"Swarm": { "$ref": "#/definitions/SwarmInfo" },
"SystemStatus": {
"description": "Status information about this node (standalone Swarm API).\n\n<p><br /></p>\n\n> **Note**: The information returned in this field is only propagated\n> by the Swarm standalone API, and is empty (`null`) when using\n> built-in swarm mode.\n",
"example": [
["Role", "primary"],
["State", "Healthy"],
["Strategy", "spread"],
[
"Filters",
"health, port, containerslots, dependency, affinity, constraint, whitelist"
],
["Nodes", "2"],
[" swarm-agent-00", "192.168.99.102:2376"],
[
" └ ID",
"5CT6:FBGO:RVGO:CZL4:PB2K:WCYN:2JSV:KSHH:GGFW:QOPG:6J5Q:IOZ2|192.168.99.102:2376"
],
[" └ Status", "Healthy"],
[" └ Containers", "1 (1 Running, 0 Paused, 0 Stopped)"],
[" └ Reserved CPUs", "0 / 1"],
[" └ Reserved Memory", "0 B / 1.021 GiB"],
[
" └ Labels",
"kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"
],
[" └ UpdatedAt", "2017-08-09T10:03:46Z"],
[" └ ServerVersion", "17.06.0-ce"],
[" swarm-manager", "192.168.99.101:2376"],
[
" └ ID",
"TAMD:7LL3:SEF7:LW2W:4Q2X:WVFH:RTXX:JSYS:XY2P:JEHL:ZMJK:JGIW|192.168.99.101:2376"
],
[" └ Status", "Healthy"],
[" └ Containers", "2 (2 Running, 0 Paused, 0 Stopped)"],
[" └ Reserved CPUs", "0 / 1"],
[" └ Reserved Memory", "0 B / 1.021 GiB"],
[
" └ Labels",
"kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"
],
[" └ UpdatedAt", "2017-08-09T10:04:11Z"],
[" └ ServerVersion", "17.06.0-ce"]
],
"items": { "items": { "type": "string" }, "type": "array" },
"type": "array"
},
"SystemTime": {
"description": "Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat with nano-seconds.\n",
"example": "2017-08-08T20:28:29.06202363Z",
"type": "string"
},
"Warnings": {
"description": "List of warnings / informational messages about missing features, or\nissues related to the daemon configuration.\n\nThese messages can be printed by the client as information to the user.\n",
"example": [
"WARNING: No memory limit support",
"WARNING: bridge-nf-call-iptables is disabled",
"WARNING: bridge-nf-call-ip6tables is disabled"
],
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
},
"TLSInfo": {
"description": "Information about the issuer of leaf TLS certificates and the trusted root CA certificate",
"example": {
"CertIssuerPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==",
"CertIssuerSubject": "MBMxETAPBgNVBAMTCHN3YXJtLWNh",
"TrustRoot": "-----BEGIN CERTIFICATE-----\nMIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0\nMzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\nA0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf\n3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO\nPQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz\npxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H\n-----END CERTIFICATE-----\n"
},
"properties": {
"CertIssuerPublicKey": {
"description": "The base64-url-safe-encoded raw public key bytes of the issuer",
"type": "string"
},
"CertIssuerSubject": {
"description": "The base64-url-safe-encoded raw subject bytes of the issuer",
"type": "string"
},
"TrustRoot": {
"description": "The root CA certificate(s) that are used to validate leaf TLS certificates",
"type": "string"
}
},
"type": "object"
},
"Task": {
"example": {
"AssignedGenericResources": [
{ "DiscreteResourceSpec": { "Kind": "SSD", "Value": 3 } },
{ "NamedResourceSpec": { "Kind": "GPU", "Value": "UUID1" } },
{ "NamedResourceSpec": { "Kind": "GPU", "Value": "UUID2" } }
],
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
"DesiredState": "running",
"ID": "0kzzo1i0y4jz6027t0k7aezc7",
"NetworksAttachments": [
{
"Addresses": ["10.255.0.10/16"],
"Network": {
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"IPAMOptions": {
"Configs": [
{ "Gateway": "10.255.0.1", "Subnet": "10.255.0.0/16" }
],
"Driver": { "Name": "default" }
},
"Spec": {
"DriverConfiguration": {},
"IPAMOptions": {
"Configs": [
{ "Gateway": "10.255.0.1", "Subnet": "10.255.0.0/16" }
],
"Driver": {}
},
"Labels": { "com.docker.swarm.internal": "true" },
"Name": "ingress"
},
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"Version": { "Index": 18 }
}
}
],
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"Slot": 1,
"Spec": {
"ContainerSpec": { "Image": "redis" },
"Placement": {},
"Resources": { "Limits": {}, "Reservations": {} },
"RestartPolicy": { "Condition": "any", "MaxAttempts": 0 }
},
"Status": {
"ContainerStatus": {
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
"PID": 677
},
"Message": "started",
"State": "running",
"Timestamp": "2016-06-07T21:07:31.290032978Z"
},
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
"Version": { "Index": 71 }
},
"properties": {
"AssignedGenericResources": {
"$ref": "#/definitions/GenericResources"
},
"CreatedAt": { "format": "dateTime", "type": "string" },
"DesiredState": { "$ref": "#/definitions/TaskState" },
"ID": { "description": "The ID of the task.", "type": "string" },
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Name": { "description": "Name of the task.", "type": "string" },
"NodeID": {
"description": "The ID of the node that this task is on.",
"type": "string"
},
"ServiceID": {
"description": "The ID of the service this task is part of.",
"type": "string"
},
"Slot": { "type": "integer" },
"Spec": { "$ref": "#/definitions/TaskSpec" },
"Status": {
"properties": {
"ContainerStatus": {
"properties": {
"ContainerID": { "type": "string" },
"ExitCode": { "type": "integer" },
"PID": { "type": "integer" }
},
"type": "object"
},
"Err": { "type": "string" },
"Message": { "type": "string" },
"State": { "$ref": "#/definitions/TaskState" },
"Timestamp": { "format": "dateTime", "type": "string" }
},
"type": "object"
},
"UpdatedAt": { "format": "dateTime", "type": "string" },
"Version": { "$ref": "#/definitions/ObjectVersion" }
},
"type": "object"
},
"TaskSpec": {
"description": "User modifiable task configuration.",
"properties": {
"ContainerSpec": {
"description": "Container spec for the service.\n\n<p><br /></p>\n\n> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are\n> mutually exclusive. PluginSpec is only used when the Runtime field\n> is set to `plugin`. NetworkAttachmentSpec is used when the Runtime\n> field is set to `attachment`.\n",
"properties": {
"Args": {
"description": "Arguments to the command.",
"items": { "type": "string" },
"type": "array"
},
"Command": {
"description": "The command to be run in the image.",
"items": { "type": "string" },
"type": "array"
},
"Configs": {
"description": "Configs contains references to zero or more configs that will be exposed to the service.",
"items": {
"properties": {
"ConfigID": {
"description": "ConfigID represents the ID of the specific config that we're referencing.",
"type": "string"
},
"ConfigName": {
"description": "ConfigName is the name of the config that this references, but this is just provided for\nlookup/display purposes. The config in the reference will be identified by its ID.\n",
"type": "string"
},
"File": {
"description": "File represents a specific target that is backed by a file.\n\n<p><br /><p>\n\n> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive\n",
"properties": {
"GID": {
"description": "GID represents the file GID.",
"type": "string"
},
"Mode": {
"description": "Mode represents the FileMode of the file.",
"format": "uint32",
"type": "integer"
},
"Name": {
"description": "Name represents the final filename in the filesystem.",
"type": "string"
},
"UID": {
"description": "UID represents the file UID.",
"type": "string"
}
},
"type": "object"
},
"Runtime": {
"description": "Runtime represents a target that is not mounted into the container but is used by the task\n\n<p><br /><p>\n\n> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive\n",
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"DNSConfig": {
"description": "Specification for DNS related configurations in resolver configuration file (`resolv.conf`).",
"properties": {
"Nameservers": {
"description": "The IP addresses of the name servers.",
"items": { "type": "string" },
"type": "array"
},
"Options": {
"description": "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.).",
"items": { "type": "string" },
"type": "array"
},
"Search": {
"description": "A search list for host-name lookup.",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
},
"Dir": {
"description": "The working directory for commands to run in.",
"type": "string"
},
"Env": {
"description": "A list of environment variables in the form `VAR=value`.",
"items": { "type": "string" },
"type": "array"
},
"Groups": {
"description": "A list of additional groups that the container process will run as.",
"items": { "type": "string" },
"type": "array"
},
"HealthCheck": { "$ref": "#/definitions/HealthConfig" },
"Hostname": {
"description": "The hostname to use for the container, as a valid RFC 1123 hostname.",
"type": "string"
},
"Hosts": {
"description": "A list of hostname/IP mappings to add to the container's `hosts`\nfile. The format of extra hosts is specified in the\n[hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)\nman page:\n\n IP_address canonical_hostname [aliases...]\n",
"items": { "type": "string" },
"type": "array"
},
"Image": {
"description": "The image name to use for the container",
"type": "string"
},
"Init": {
"description": "Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.",
"type": "boolean",
"x-nullable": true
},
"Isolation": {
"description": "Isolation technology of the containers running the service. (Windows only)",
"enum": ["default", "process", "hyperv"],
"type": "string"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value data.",
"type": "object"
},
"Mounts": {
"description": "Specification for mounts to be added to containers created as part of the service.",
"items": { "$ref": "#/definitions/Mount" },
"type": "array"
},
"OpenStdin": { "description": "Open `stdin`", "type": "boolean" },
"Privileges": {
"description": "Security options for the container",
"properties": {
"CredentialSpec": {
"description": "CredentialSpec for managed service account (Windows only)",
"properties": {
"Config": {
"description": "Load credential spec from a Swarm Config with the given ID.\nThe specified config must also be present in the Configs field with the Runtime property set.\n\n<p><br /></p>\n\n\n> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and `CredentialSpec.Config` are mutually exclusive.\n",
"example": "0bt9dmxjvjiqermk6xrop3ekq",
"type": "string"
},
"File": {
"description": "Load credential spec from this file. The file is read by the daemon, and must be present in the\n`CredentialSpecs` subdirectory in the docker data directory, which defaults to\n`C:\\ProgramData\\Docker\\` on Windows.\n\nFor example, specifying `spec.json` loads `C:\\ProgramData\\Docker\\CredentialSpecs\\spec.json`.\n\n<p><br /></p>\n\n> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and `CredentialSpec.Config` are mutually exclusive.\n",
"example": "spec.json",
"type": "string"
},
"Registry": {
"description": "Load credential spec from this value in the Windows registry. The specified registry value must be\nlocated in:\n\n`HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Virtualization\\Containers\\CredentialSpecs`\n\n<p><br /></p>\n\n\n> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and `CredentialSpec.Config` are mutually exclusive.\n",
"type": "string"
}
},
"type": "object"
},
"SELinuxContext": {
"description": "SELinux labels of the container",
"properties": {
"Disable": {
"description": "Disable SELinux",
"type": "boolean"
},
"Level": {
"description": "SELinux level label",
"type": "string"
},
"Role": {
"description": "SELinux role label",
"type": "string"
},
"Type": {
"description": "SELinux type label",
"type": "string"
},
"User": {
"description": "SELinux user label",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"ReadOnly": {
"description": "Mount the container's root filesystem as read only.",
"type": "boolean"
},
"Secrets": {
"description": "Secrets contains references to zero or more secrets that will be exposed to the service.",
"items": {
"properties": {
"File": {
"description": "File represents a specific target that is backed by a file.",
"properties": {
"GID": {
"description": "GID represents the file GID.",
"type": "string"
},
"Mode": {
"description": "Mode represents the FileMode of the file.",
"format": "uint32",
"type": "integer"
},
"Name": {
"description": "Name represents the final filename in the filesystem.",
"type": "string"
},
"UID": {
"description": "UID represents the file UID.",
"type": "string"
}
},
"type": "object"
},
"SecretID": {
"description": "SecretID represents the ID of the specific secret that we're referencing.",
"type": "string"
},
"SecretName": {
"description": "SecretName is the name of the secret that this references, but this is just provided for\nlookup/display purposes. The secret in the reference will be identified by its ID.\n",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"StopGracePeriod": {
"description": "Amount of time to wait for the container to terminate before forcefully killing it.",
"format": "int64",
"type": "integer"
},
"StopSignal": {
"description": "Signal to stop the container.",
"type": "string"
},
"Sysctls": {
"additionalProperties": { "type": "string" },
"description": "Set kernel namedspaced parameters (sysctls) in the container.\nThe Sysctls option on services accepts the same sysctls as the\nare supported on containers. Note that while the same sysctls are\nsupported, no guarantees or checks are made about their\nsuitability for a clustered environment, and it's up to the user\nto determine whether a given sysctl will work properly in a\nService.\n",
"type": "object"
},
"TTY": {
"description": "Whether a pseudo-TTY should be allocated.",
"type": "boolean"
},
"User": {
"description": "The user inside the container.",
"type": "string"
}
},
"type": "object"
},
"ForceUpdate": {
"description": "A counter that triggers an update even if no relevant parameters have been changed.",
"type": "integer"
},
"LogDriver": {
"description": "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified.",
"properties": {
"Name": { "type": "string" },
"Options": {
"additionalProperties": { "type": "string" },
"type": "object"
}
},
"type": "object"
},
"NetworkAttachmentSpec": {
"description": "Read-only spec type for non-swarm containers attached to swarm overlay\nnetworks.\n\n<p><br /></p>\n\n> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are\n> mutually exclusive. PluginSpec is only used when the Runtime field\n> is set to `plugin`. NetworkAttachmentSpec is used when the Runtime\n> field is set to `attachment`.\n",
"properties": {
"ContainerID": {
"description": "ID of the container represented by this task",
"type": "string"
}
},
"type": "object"
},
"Networks": {
"description": "Specifies which networks the service should attach to.",
"items": { "$ref": "#/definitions/NetworkAttachmentConfig" },
"type": "array"
},
"Placement": {
"properties": {
"Constraints": {
"description": "An array of constraint expressions to limit the set of nodes where\na task can be scheduled. Constraint expressions can either use a\n_match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find\nnodes that satisfy every expression (AND match). Constraints can\nmatch node or Docker Engine labels as follows:\n\nnode attribute | matches | example\n---------------------|--------------------------------|-----------------------------------------------\n`node.id` | Node ID | `node.id==2ivku8v2gvtg4`\n`node.hostname` | Node hostname | `node.hostname!=node-2`\n`node.role` | Node role (`manager`/`worker`) | `node.role==manager`\n`node.platform.os` | Node operating system | `node.platform.os==windows`\n`node.platform.arch` | Node architecture | `node.platform.arch==x86_64`\n`node.labels` | User-defined node labels | `node.labels.security==high`\n`engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04`\n\n`engine.labels` apply to Docker Engine labels like operating system,\ndrivers, etc. Swarm administrators add `node.labels` for operational\npurposes by using the [`node update endpoint`](#operation/NodeUpdate).\n",
"example": [
"node.hostname!=node3.corp.example.com",
"node.role!=manager",
"node.labels.type==production",
"node.platform.os==linux",
"node.platform.arch==x86_64"
],
"items": { "type": "string" },
"type": "array"
},
"MaxReplicas": {
"default": 0,
"description": "Maximum number of replicas for per node (default value is 0, which is unlimited)",
"format": "int64",
"type": "integer"
},
"Platforms": {
"description": "Platforms stores all the platforms that the service's image can\nrun on. This field is used in the platform filter for scheduling.\nIf empty, then the platform filter is off, meaning there are no\nscheduling restrictions.\n",
"items": { "$ref": "#/definitions/Platform" },
"type": "array"
},
"Preferences": {
"description": "Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence.",
"example": [
{ "Spread": { "SpreadDescriptor": "node.labels.datacenter" } },
{ "Spread": { "SpreadDescriptor": "node.labels.rack" } }
],
"items": {
"properties": {
"Spread": {
"properties": {
"SpreadDescriptor": {
"description": "label descriptor, such as engine.labels.az",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"PluginSpec": {
"description": "Plugin spec for the service. *(Experimental release only.)*\n\n<p><br /></p>\n\n> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are\n> mutually exclusive. PluginSpec is only used when the Runtime field\n> is set to `plugin`. NetworkAttachmentSpec is used when the Runtime\n> field is set to `attachment`.\n",
"properties": {
"Disabled": {
"description": "Disable the plugin once scheduled.",
"type": "boolean"
},
"Name": {
"description": "The name or 'alias' to use for the plugin.",
"type": "string"
},
"PluginPrivilege": {
"items": {
"description": "Describes a permission accepted by the user upon installing the plugin.",
"properties": {
"Description": { "type": "string" },
"Name": { "type": "string" },
"Value": { "items": { "type": "string" }, "type": "array" }
},
"type": "object"
},
"type": "array"
},
"Remote": {
"description": "The plugin image reference to use.",
"type": "string"
}
},
"type": "object"
},
"Resources": {
"description": "Resource requirements which apply to each individual container created as part of the service.",
"properties": {
"Limits": {
"$ref": "#/definitions/ResourceObject",
"description": "Define resources limits."
},
"Reservation": {
"$ref": "#/definitions/ResourceObject",
"description": "Define resources reservation."
}
},
"type": "object"
},
"RestartPolicy": {
"description": "Specification for the restart policy which applies to containers created as part of this service.",
"properties": {
"Condition": {
"description": "Condition for restart.",
"enum": ["none", "on-failure", "any"],
"type": "string"
},
"Delay": {
"description": "Delay between restart attempts.",
"format": "int64",
"type": "integer"
},
"MaxAttempts": {
"default": 0,
"description": "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored).",
"format": "int64",
"type": "integer"
},
"Window": {
"default": 0,
"description": "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded).",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Runtime": {
"description": "Runtime is the type of runtime specified for the task executor.",
"type": "string"
}
},
"type": "object"
},
"TaskState": {
"enum": [
"new",
"allocated",
"pending",
"assigned",
"accepted",
"preparing",
"ready",
"starting",
"running",
"complete",
"shutdown",
"failed",
"rejected",
"remove",
"orphaned"
],
"type": "string"
},
"ThrottleDevice": {
"properties": {
"Path": { "description": "Device path", "type": "string" },
"Rate": {
"description": "Rate",
"format": "int64",
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"Volume": {
"example": {
"CreatedAt": "2016-06-07T20:31:11.853781916Z",
"Driver": "custom",
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Mountpoint": "/var/lib/docker/volumes/tardis",
"Name": "tardis",
"Scope": "local",
"Status": { "hello": "world" }
},
"properties": {
"CreatedAt": {
"description": "Date/Time the volume was created.",
"format": "dateTime",
"type": "string"
},
"Driver": {
"description": "Name of the volume driver used by the volume.",
"type": "string",
"x-nullable": false
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object",
"x-nullable": false
},
"Mountpoint": {
"description": "Mount path of the volume on the host.",
"type": "string",
"x-nullable": false
},
"Name": {
"description": "Name of the volume.",
"type": "string",
"x-nullable": false
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "The driver specific options used when creating the volume.",
"type": "object"
},
"Scope": {
"default": "local",
"description": "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level.",
"enum": ["local", "global"],
"type": "string",
"x-nullable": false
},
"Status": {
"additionalProperties": { "type": "object" },
"description": "Low-level details about the volume, provided by the volume driver.\nDetails are returned as a map with key/value pairs:\n`{\"key\":\"value\",\"key2\":\"value2\"}`.\n\nThe `Status` field is optional, and is omitted if the volume driver\ndoes not support this feature.\n",
"type": "object"
},
"UsageData": {
"description": "Usage details about the volume. This information is used by the\n`GET /system/df` endpoint, and omitted in other endpoints.\n",
"properties": {
"RefCount": {
"default": -1,
"description": "The number of containers referencing this volume. This field\nis set to `-1` if the reference-count is not available.\n",
"type": "integer",
"x-nullable": false
},
"Size": {
"default": -1,
"description": "Amount of disk space used by the volume (in bytes). This information\nis only available for volumes created with the `\"local\"` volume\ndriver. For volumes created with other volume drivers, this field\nis set to `-1` (\"not available\")\n",
"type": "integer",
"x-nullable": false
}
},
"required": ["Size", "RefCount"],
"type": "object",
"x-nullable": true
}
},
"required": [
"Name",
"Driver",
"Mountpoint",
"Labels",
"Scope",
"Options"
],
"type": "object"
}
},
"info": {
"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.\n\nMost 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.\n\n# Errors\n\nThe 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:\n\n```\n{\n \"message\": \"page not found\"\n}\n```\n\n# Versioning\n\nThe API is usually changed in each release, so API calls are versioned to\nensure that clients don't break. To lock to a specific version of the API,\nyou prefix the URL with its version, for example, call `/v1.30/info` to use\nthe v1.30 version of the `/info` endpoint. If the API version specified in\nthe URL is not supported by the daemon, a HTTP `400 Bad Request` error message\nis returned.\n\nIf you omit the version-prefix, the current version of the API (v1.40) is used.\nFor example, calling `/info` is the same as calling `/v1.40/info`. Using the\nAPI without a version-prefix is deprecated and will be removed in a future release.\n\nEngine releases in the near future should support this version of the API,\nso your client will continue to work even if it is talking to a newer Engine.\n\nThe API uses an open schema model, which means server may add extra properties\nto responses. Likewise, the server will ignore any extra query parameters and\nrequest body properties. When you write clients, you need to ignore additional\nproperties in responses to ensure they do not break when talking to newer\ndaemons.\n\n\n# Authentication\n\nAuthentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure:\n\n```\n{\n \"username\": \"string\",\n \"password\": \"string\",\n \"email\": \"string\",\n \"serveraddress\": \"string\"\n}\n```\n\nThe `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required.\n\nIf you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials:\n\n```\n{\n \"identitytoken\": \"9cbaf023786cd7...\"\n}\n```\n",
"title": "Docker Engine API",
"version": "1.40",
"x-logo": { "url": "https://docs.docker.com/images/logo-docker-main.png" }
},
"paths": {
"/_ping": {
"get": {
"description": "This is a dummy endpoint you can use to test if the server is accessible.",
"operationId": "SystemPing",
"produces": ["text/plain"],
"responses": {
"200": {
"description": "no error",
"headers": {
"API-Version": {
"description": "Max API Version the server supports",
"type": "string"
},
"BuildKit-Version": {
"description": "Default version of docker image builder",
"type": "string"
},
"Cache-Control": {
"default": "no-cache, no-store, must-revalidate",
"type": "string"
},
"Docker-Experimental": {
"description": "If the server is running with experimental mode enabled",
"type": "boolean"
},
"Pragma": { "default": "no-cache", "type": "string" }
},
"schema": { "example": "OK", "type": "string" }
},
"500": {
"description": "server error",
"headers": {
"Cache-Control": {
"default": "no-cache, no-store, must-revalidate",
"type": "string"
},
"Pragma": { "default": "no-cache", "type": "string" }
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Ping",
"tags": ["System"]
},
"head": {
"description": "This is a dummy endpoint you can use to test if the server is accessible.",
"operationId": "SystemPingHead",
"produces": ["text/plain"],
"responses": {
"200": {
"description": "no error",
"headers": {
"API-Version": {
"description": "Max API Version the server supports",
"type": "string"
},
"BuildKit-Version": {
"description": "Default version of docker image builder",
"type": "string"
},
"Cache-Control": {
"default": "no-cache, no-store, must-revalidate",
"type": "string"
},
"Docker-Experimental": {
"description": "If the server is running with experimental mode enabled",
"type": "boolean"
},
"Pragma": { "default": "no-cache", "type": "string" }
},
"schema": { "example": "(empty)", "type": "string" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Ping",
"tags": ["System"]
}
},
"/auth": {
"post": {
"consumes": ["application/json"],
"description": "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.",
"operationId": "SystemAuth",
"parameters": [
{
"description": "Authentication to check",
"in": "body",
"name": "authConfig",
"schema": { "$ref": "#/definitions/AuthConfig" }
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "An identity token was generated successfully.",
"examples": {
"application/json": {
"IdentityToken": "9cbaf023786cd7...",
"Status": "Login Succeeded"
}
},
"schema": {
"properties": {
"IdentityToken": {
"description": "An opaque token used to authenticate a user after a successful login",
"type": "string",
"x-nullable": false
},
"Status": {
"description": "The status of the authentication",
"type": "string",
"x-nullable": false
}
},
"required": ["Status"],
"title": "SystemAuthResponse",
"type": "object"
}
},
"204": { "description": "No error" },
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Check auth configuration",
"tags": ["System"]
}
},
"/build": {
"post": {
"consumes": ["application/octet-stream"],
"description": "Build an image from a tar archive with a `Dockerfile` in it.\n\nThe `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/).\n\nThe Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output.\n\nThe build is canceled if the client drops the connection by quitting or being killed.\n",
"operationId": "ImageBuild",
"parameters": [
{
"description": "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.",
"in": "body",
"name": "inputStream",
"schema": { "format": "binary", "type": "string" }
},
{
"default": "Dockerfile",
"description": "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`.",
"in": "query",
"name": "dockerfile",
"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` parameters.",
"in": "query",
"name": "t",
"type": "string"
},
{
"description": "Extra hosts to add to /etc/hosts",
"in": "query",
"name": "extrahosts",
"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 image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball.",
"in": "query",
"name": "remote",
"type": "string"
},
{
"default": false,
"description": "Suppress verbose build output.",
"in": "query",
"name": "q",
"type": "boolean"
},
{
"default": false,
"description": "Do not use the cache when building the image.",
"in": "query",
"name": "nocache",
"type": "boolean"
},
{
"description": "JSON array of images used for build cache resolution.",
"in": "query",
"name": "cachefrom",
"type": "string"
},
{
"description": "Attempt to pull the image even if an older image exists locally.",
"in": "query",
"name": "pull",
"type": "string"
},
{
"default": true,
"description": "Remove intermediate containers after a successful build.",
"in": "query",
"name": "rm",
"type": "boolean"
},
{
"default": false,
"description": "Always remove intermediate containers, even upon failure.",
"in": "query",
"name": "forcerm",
"type": "boolean"
},
{
"description": "Set memory limit for build.",
"in": "query",
"name": "memory",
"type": "integer"
},
{
"description": "Total memory (memory + swap). Set as `-1` to disable swap.",
"in": "query",
"name": "memswap",
"type": "integer"
},
{
"description": "CPU shares (relative weight).",
"in": "query",
"name": "cpushares",
"type": "integer"
},
{
"description": "CPUs in which to allow execution (e.g., `0-3`, `0,1`).",
"in": "query",
"name": "cpusetcpus",
"type": "string"
},
{
"description": "The length of a CPU period in microseconds.",
"in": "query",
"name": "cpuperiod",
"type": "integer"
},
{
"description": "Microseconds of CPU time that the container can get in a CPU period.",
"in": "query",
"name": "cpuquota",
"type": "integer"
},
{
"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 via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values.\n\nFor example, the build arg `FOO=bar` would become `{\"FOO\":\"bar\"}` in JSON. This would result in the the query parameter `buildargs={\"FOO\":\"bar\"}`. Note that `{\"FOO\":\"bar\"}` should be URI component encoded.\n\n[Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)\n",
"in": "query",
"name": "buildargs",
"type": "string"
},
{
"description": "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.",
"in": "query",
"name": "shmsize",
"type": "integer"
},
{
"description": "Squash the resulting images layers into a single layer. *(Experimental release only.)*",
"in": "query",
"name": "squash",
"type": "boolean"
},
{
"description": "Arbitrary key/value labels to set on the image, as a JSON map of string pairs.",
"in": "query",
"name": "labels",
"type": "string"
},
{
"description": "Sets the networking mode for the run commands during build. Supported\nstandard values are: `bridge`, `host`, `none`, and `container:<name|id>`.\nAny other value is taken as a custom network's name or ID to which this\ncontainer should connect to.\n",
"in": "query",
"name": "networkmode",
"type": "string"
},
{
"default": "application/x-tar",
"enum": ["application/x-tar"],
"in": "header",
"name": "Content-type",
"type": "string"
},
{
"description": "This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.\n\nThe key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:\n\n```\n{\n \"docker.example.com\": {\n \"username\": \"janedoe\",\n \"password\": \"hunter2\"\n },\n \"https://index.docker.io/v1/\": {\n \"username\": \"mobydock\",\n \"password\": \"conta1n3rize14\"\n }\n}\n```\n\nOnly the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API.\n",
"in": "header",
"name": "X-Registry-Config",
"type": "string"
},
{
"default": "",
"description": "Platform in the format os[/arch[/variant]]",
"in": "query",
"name": "platform",
"type": "string"
},
{
"default": "",
"description": "Target build stage",
"in": "query",
"name": "target",
"type": "string"
},
{
"default": "",
"description": "BuildKit output configuration",
"in": "query",
"name": "outputs",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "Bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Build an image",
"tags": ["Image"]
}
},
"/build/prune": {
"post": {
"operationId": "BuildPrune",
"parameters": [
{
"description": "Amount of disk space in bytes to keep for cache",
"format": "int64",
"in": "query",
"name": "keep-storage",
"type": "integer"
},
{
"description": "Remove all types of build cache",
"in": "query",
"name": "all",
"type": "boolean"
},
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache objects. Available filters:\n- `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')\n- `id=<id>`\n- `parent=<id>`\n- `type=<string>`\n- `description=<string>`\n- `inuse`\n- `shared`\n- `private`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"properties": {
"CachesDeleted": {
"items": {
"description": "ID of build cache object",
"type": "string"
},
"type": "array"
},
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
}
},
"title": "BuildPruneResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete builder cache",
"tags": ["Image"]
}
},
"/commit": {
"post": {
"consumes": ["application/json"],
"operationId": "ImageCommit",
"parameters": [
{
"description": "The container configuration",
"in": "body",
"name": "containerConfig",
"schema": { "$ref": "#/definitions/ContainerConfig" }
},
{
"description": "The ID or name of the container to commit",
"in": "query",
"name": "container",
"type": "string"
},
{
"description": "Repository name for the created image",
"in": "query",
"name": "repo",
"type": "string"
},
{
"description": "Tag name for the create image",
"in": "query",
"name": "tag",
"type": "string"
},
{
"description": "Commit message",
"in": "query",
"name": "comment",
"type": "string"
},
{
"description": "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)",
"in": "query",
"name": "author",
"type": "string"
},
{
"default": true,
"description": "Whether to pause the container before committing",
"in": "query",
"name": "pause",
"type": "boolean"
},
{
"description": "`Dockerfile` instructions to apply while committing",
"in": "query",
"name": "changes",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "no error",
"schema": { "$ref": "#/definitions/IdResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a new image from a container",
"tags": ["Image"]
}
},
"/configs": {
"get": {
"operationId": "ConfigList",
"parameters": [
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters:\n\n- `id=<config id>`\n- `label=<key> or label=<key>=value`\n- `name=<config name>`\n- `names=<config name>`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"schema": {
"example": [
{
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": { "Name": "server.conf" },
"UpdatedAt": "2016-11-05T01:20:17.327670065Z",
"Version": { "Index": 11 }
}
],
"items": { "$ref": "#/definitions/Config" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List configs",
"tags": ["Config"]
}
},
"/configs/create": {
"post": {
"consumes": ["application/json"],
"operationId": "ConfigCreate",
"parameters": [
{
"in": "body",
"name": "body",
"schema": {
"allOf": [
{ "$ref": "#/definitions/ConfigSpec" },
{
"example": {
"Data": "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==",
"Labels": { "foo": "bar" },
"Name": "server.conf"
},
"type": "object"
}
]
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "no error",
"schema": { "$ref": "#/definitions/IdResponse" }
},
"409": {
"description": "name conflicts with an existing object",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a config",
"tags": ["Config"]
}
},
"/configs/{id}": {
"delete": {
"operationId": "ConfigDelete",
"parameters": [
{
"description": "ID of the config",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "config not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete a config",
"tags": ["Config"]
},
"get": {
"operationId": "ConfigInspect",
"parameters": [
{
"description": "ID of the config",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": { "Name": "app-dev.crt" },
"UpdatedAt": "2016-11-05T01:20:17.327670065Z",
"Version": { "Index": 11 }
}
},
"schema": { "$ref": "#/definitions/Config" }
},
"404": {
"description": "config not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a config",
"tags": ["Config"]
}
},
"/configs/{id}/update": {
"post": {
"operationId": "ConfigUpdate",
"parameters": [
{
"description": "The ID or name of the config",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values.",
"in": "body",
"name": "body",
"schema": { "$ref": "#/definitions/ConfigSpec" }
},
{
"description": "The version number of the config object being updated. This is required to avoid conflicting writes.",
"format": "int64",
"in": "query",
"name": "version",
"required": true,
"type": "integer"
}
],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such config",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a Config",
"tags": ["Config"]
}
},
"/containers/create": {
"post": {
"consumes": ["application/json", "application/octet-stream"],
"operationId": "ContainerCreate",
"parameters": [
{
"description": "Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`.",
"in": "query",
"name": "name",
"pattern": "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$",
"type": "string"
},
{
"description": "Container to create",
"in": "body",
"name": "body",
"required": true,
"schema": {
"allOf": [
{ "$ref": "#/definitions/ContainerConfig" },
{
"properties": {
"HostConfig": { "$ref": "#/definitions/HostConfig" },
"NetworkingConfig": {
"description": "This container's networking configuration.",
"properties": {
"EndpointsConfig": {
"additionalProperties": {
"$ref": "#/definitions/EndpointSettings"
},
"description": "A mapping of network name to endpoint configuration for that network.",
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
],
"example": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": ["date"],
"Domainname": "",
"Entrypoint": "",
"Env": ["FOO=bar", "BAZ=quux"],
"ExposedPorts": { "22/tcp": {} },
"HostConfig": {
"AutoRemove": true,
"Binds": ["/tmp:/tmp"],
"BlkioDeviceReadBps": [{}],
"BlkioDeviceReadIOps": [{}],
"BlkioDeviceWriteBps": [{}],
"BlkioDeviceWriteIOps": [{}],
"BlkioWeight": 300,
"BlkioWeightDevice": [{}],
"CapAdd": ["NET_ADMIN"],
"CapDrop": ["MKNOD"],
"CgroupParent": "",
"CpuPercent": 80,
"CpuPeriod": 100000,
"CpuQuota": 50000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpuShares": 512,
"CpusetCpus": "0,1",
"CpusetMems": "0,1",
"Devices": [],
"Dns": ["8.8.8.8"],
"DnsOptions": [""],
"DnsSearch": [""],
"GroupAdd": ["newgroup"],
"KernelMemory": 0,
"Links": ["redis3:redis"],
"LogConfig": { "Config": {}, "Type": "json-file" },
"MaximumIOBps": 0,
"MaximumIOps": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": 60,
"NanoCPUs": 500000,
"NetworkMode": "bridge",
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PidsLimit": 0,
"PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"RestartPolicy": { "MaximumRetryCount": 0, "Name": "" },
"SecurityOpt": [],
"ShmSize": 67108864,
"StorageOpt": {},
"Ulimits": [{}],
"VolumeDriver": "",
"VolumesFrom": ["parent", "other:ro"]
},
"Hostname": "",
"Image": "ubuntu",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"MacAddress": "12:34:56:78:9a:bc",
"NetworkDisabled": false,
"NetworkingConfig": {
"EndpointsConfig": {
"isolated_nw": {
"Aliases": ["server_x", "server_y"],
"IPAMConfig": {
"IPv4Address": "172.20.30.33",
"IPv6Address": "2001:db8:abcd::3033",
"LinkLocalIPs": ["169.254.34.68", "fe80::3468"]
},
"Links": ["container_1", "container_2"]
}
}
},
"OpenStdin": false,
"StdinOnce": false,
"StopSignal": "SIGTERM",
"StopTimeout": 10,
"Tty": false,
"User": "",
"Volumes": { "/volumes/data": {} },
"WorkingDir": ""
}
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "Container created successfully",
"examples": {
"application/json": { "Id": "e90e34656806", "Warnings": [] }
},
"schema": {
"description": "OK response to ContainerCreate operation",
"properties": {
"Id": {
"description": "The ID of the created container",
"type": "string",
"x-nullable": false
},
"Warnings": {
"description": "Warnings encountered when creating the container",
"items": { "type": "string" },
"type": "array",
"x-nullable": false
}
},
"required": ["Id", "Warnings"],
"title": "ContainerCreateResponse",
"type": "object"
}
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "conflict",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a container",
"tags": ["Container"]
}
},
"/containers/json": {
"get": {
"description": "Returns a list of containers. For details on the format, see [the inspect endpoint](#operation/ContainerInspect).\n\nNote that it uses a different, smaller representation of a container than inspecting a single container. For example,\nthe list of linked containers is not propagated .\n",
"operationId": "ContainerList",
"parameters": [
{
"default": false,
"description": "Return all containers. By default, only running containers are shown",
"in": "query",
"name": "all",
"type": "boolean"
},
{
"description": "Return this number of most recently created containers, including non-running ones.",
"in": "query",
"name": "limit",
"type": "integer"
},
{
"default": false,
"description": "Return the size of container as fields `SizeRw` and `SizeRootFs`.",
"in": "query",
"name": "size",
"type": "boolean"
},
{
"description": "Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{\"status\": [\"paused\"]}` will only return paused containers. Available filters:\n\n- `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)\n- `before`=(`<container id>` or `<container name>`)\n- `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)\n- `exited=<int>` containers with exit code of `<int>`\n- `health`=(`starting`|`healthy`|`unhealthy`|`none`)\n- `id=<ID>` a container's ID\n- `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)\n- `is-task=`(`true`|`false`)\n- `label=key` or `label=\"key=value\"` of a container label\n- `name=<name>` a container's name\n- `network`=(`<network id>` or `<network name>`)\n- `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)\n- `since`=(`<container id>` or `<container name>`)\n- `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)\n- `volume`=(`<volume name>` or `<mount point destination>`)\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": [
{
"Command": "echo 1",
"Created": 1367854155,
"HostConfig": { "NetworkMode": "default" },
"Id": "8dfafdbc3a40",
"Image": "ubuntu:latest",
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"Mounts": [
{
"Destination": "/data",
"Driver": "local",
"Mode": "ro,Z",
"Name": "fac362...80535",
"Propagation": "",
"RW": false,
"Source": "/data"
}
],
"Names": ["/boring_feynman"],
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
}
}
},
"Ports": [
{ "PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp" }
],
"SizeRootFs": 0,
"SizeRw": 12288,
"State": "Exited",
"Status": "Exit 0"
},
{
"Command": "echo 222222",
"Created": 1367854155,
"HostConfig": { "NetworkMode": "default" },
"Id": "9cd87474be90",
"Image": "ubuntu:latest",
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"Labels": {},
"Mounts": [],
"Names": ["/coolName"],
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.8",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:08",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
}
}
},
"Ports": [],
"SizeRootFs": 0,
"SizeRw": 12288,
"State": "Exited",
"Status": "Exit 0"
},
{
"Command": "echo 3333333333333333",
"Created": 1367854154,
"HostConfig": { "NetworkMode": "default" },
"Id": "3176a2479c92",
"Image": "ubuntu:latest",
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"Labels": {},
"Mounts": [],
"Names": ["/sleepy_dog"],
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.6",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:06",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
}
}
},
"Ports": [],
"SizeRootFs": 0,
"SizeRw": 12288,
"State": "Exited",
"Status": "Exit 0"
},
{
"Command": "echo 444444444444444444444444444444444",
"Created": 1367854152,
"HostConfig": { "NetworkMode": "default" },
"Id": "4cb07b47f9fb",
"Image": "ubuntu:latest",
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"Labels": {},
"Mounts": [],
"Names": ["/running_cat"],
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:05",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
}
}
},
"Ports": [],
"SizeRootFs": 0,
"SizeRw": 12288,
"State": "Exited",
"Status": "Exit 0"
}
]
},
"schema": { "$ref": "#/definitions/ContainerSummary" }
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List containers",
"tags": ["Container"]
}
},
"/containers/prune": {
"post": {
"operationId": "ContainerPrune",
"parameters": [
{
"description": "Filters to process on the prune list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.\n- `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"properties": {
"ContainersDeleted": {
"description": "Container IDs that were deleted",
"items": { "type": "string" },
"type": "array"
},
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
}
},
"title": "ContainerPruneResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete stopped containers",
"tags": ["Container"]
}
},
"/containers/{id}": {
"delete": {
"operationId": "ContainerDelete",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Remove the volumes associated with the container.",
"in": "query",
"name": "v",
"type": "boolean"
},
{
"default": false,
"description": "If the container is running, kill it before removing it.",
"in": "query",
"name": "force",
"type": "boolean"
},
{
"default": false,
"description": "Remove the specified link associated with the container.",
"in": "query",
"name": "link",
"type": "boolean"
}
],
"responses": {
"204": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "conflict",
"examples": {
"application/json": {
"message": "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Remove a container",
"tags": ["Container"]
}
},
"/containers/{id}/archive": {
"get": {
"description": "Get a tar archive of a resource in the filesystem of container id.",
"operationId": "ContainerArchive",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Resource in the container’s filesystem to archive.",
"in": "query",
"name": "path",
"required": true,
"type": "string"
}
],
"produces": ["application/x-tar"],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "Bad parameter",
"schema": {
"allOf": [
{ "$ref": "#/definitions/ErrorResponse" },
{
"properties": {
"message": {
"description": "The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file).",
"type": "string",
"x-nullable": false
}
},
"type": "object"
}
]
}
},
"404": {
"description": "Container or path does not exist",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get an archive of a filesystem resource in a container",
"tags": ["Container"]
},
"head": {
"description": "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path.",
"operationId": "ContainerArchiveInfo",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Resource in the container’s filesystem to archive.",
"in": "query",
"name": "path",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"headers": {
"X-Docker-Container-Path-Stat": {
"description": "A base64 - encoded JSON object with some filesystem header information about the path",
"type": "string"
}
}
},
"400": {
"description": "Bad parameter",
"schema": {
"allOf": [
{ "$ref": "#/definitions/ErrorResponse" },
{
"properties": {
"message": {
"description": "The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file).",
"type": "string",
"x-nullable": false
}
},
"type": "object"
}
]
}
},
"404": {
"description": "Container or path does not exist",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get information about files in a container",
"tags": ["Container"]
},
"put": {
"consumes": ["application/x-tar", "application/octet-stream"],
"description": "Upload a tar archive to be extracted to a path in the filesystem of container id.",
"operationId": "PutContainerArchive",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Path to a directory in the container to extract the archive’s contents into. ",
"in": "query",
"name": "path",
"required": true,
"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 versa.",
"in": "query",
"name": "noOverwriteDirNonDir",
"type": "string"
},
{
"description": "If “1”, “true”, then it will copy UID/GID maps to the dest file or dir",
"in": "query",
"name": "copyUIDGID",
"type": "string"
},
{
"description": "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.",
"in": "body",
"name": "inputStream",
"required": true,
"schema": { "format": "binary", "type": "string" }
}
],
"responses": {
"200": { "description": "The content was extracted successfully" },
"400": {
"description": "Bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"403": {
"description": "Permission denied, the volume or container rootfs is marked as read-only.",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "No such container or path does not exist inside the container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Extract an archive of files or folders to a directory in a container",
"tags": ["Container"]
}
},
"/containers/{id}/attach": {
"post": {
"description": "Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.\n\nEither the `stream` or `logs` parameter must be `true` for this endpoint to do anything.\n\nSee [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.\n\n### Hijacking\n\nThis endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.\n\nThis is the response from the daemon for an attach request:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/vnd.docker.raw-stream\n\n[STREAM]\n```\n\nAfter the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.\n\nTo hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.\n\nFor example, the client sends this request to upgrade the connection:\n\n```\nPOST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1\nUpgrade: tcp\nConnection: Upgrade\n```\n\nThe Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:\n\n```\nHTTP/1.1 101 UPGRADED\nContent-Type: application/vnd.docker.raw-stream\nConnection: Upgrade\nUpgrade: tcp\n\n[STREAM]\n```\n\n### Stream format\n\nWhen the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.\n\nThe header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).\n\nIt is encoded on the first eight bytes like this:\n\n```go\nheader := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}\n```\n\n`STREAM_TYPE` can be:\n\n- 0: `stdin` (is written on `stdout`)\n- 1: `stdout`\n- 2: `stderr`\n\n`SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.\n\nFollowing the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.\n\nThe simplest way to implement this protocol is the following:\n\n1. Read 8 bytes.\n2. Choose `stdout` or `stderr` depending on the first byte.\n3. Extract the frame size from the last four bytes.\n4. Read the extracted size and output it on the correct output.\n5. Goto 1.\n\n### Stream format when using a TTY\n\nWhen the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.\n",
"operationId": "ContainerAttach",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"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`, `@`, `^`, `[`, `,` or `_`.",
"in": "query",
"name": "detachKeys",
"type": "string"
},
{
"default": false,
"description": "Replay previous logs from the container.\n\nThis is useful for attaching to a container that has started and you want to output everything since the container started.\n\nIf `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.\n",
"in": "query",
"name": "logs",
"type": "boolean"
},
{
"default": false,
"description": "Stream attached streams from the time the request was made onwards",
"in": "query",
"name": "stream",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stdin`",
"in": "query",
"name": "stdin",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stdout`",
"in": "query",
"name": "stdout",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stderr`",
"in": "query",
"name": "stderr",
"type": "boolean"
}
],
"produces": ["application/vnd.docker.raw-stream"],
"responses": {
"101": { "description": "no error, hints proxy about hijacking" },
"200": { "description": "no error, no upgrade header found" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Attach to a container",
"tags": ["Container"]
}
},
"/containers/{id}/attach/ws": {
"get": {
"operationId": "ContainerAttachWebsocket",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"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`, `@`, `^`, `[`, `,`, or `_`.",
"in": "query",
"name": "detachKeys",
"type": "string"
},
{
"default": false,
"description": "Return logs",
"in": "query",
"name": "logs",
"type": "boolean"
},
{
"default": false,
"description": "Return stream",
"in": "query",
"name": "stream",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stdin`",
"in": "query",
"name": "stdin",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stdout`",
"in": "query",
"name": "stdout",
"type": "boolean"
},
{
"default": false,
"description": "Attach to `stderr`",
"in": "query",
"name": "stderr",
"type": "boolean"
}
],
"responses": {
"101": { "description": "no error, hints proxy about hijacking" },
"200": { "description": "no error, no upgrade header found" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Attach to a container via a websocket",
"tags": ["Container"]
}
},
"/containers/{id}/changes": {
"get": {
"description": "Returns which files in a container's filesystem have been added, deleted,\nor modified. The `Kind` of modification can be one of:\n\n- `0`: Modified\n- `1`: Added\n- `2`: Deleted\n",
"operationId": "ContainerChanges",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "The list of changes",
"examples": {
"application/json": [
{ "Kind": 0, "Path": "/dev" },
{ "Kind": 1, "Path": "/dev/kmsg" },
{ "Kind": 1, "Path": "/test" }
]
},
"schema": {
"items": {
"description": "change item in response to ContainerChanges operation",
"properties": {
"Kind": {
"description": "Kind of change",
"enum": [0, 1, 2],
"format": "uint8",
"type": "integer",
"x-nullable": false
},
"Path": {
"description": "Path to file that has changed",
"type": "string",
"x-nullable": false
}
},
"required": ["Path", "Kind"],
"title": "ContainerChangeResponseItem",
"type": "object",
"x-go-name": "ContainerChangeResponseItem"
},
"type": "array"
}
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get changes on a container’s filesystem",
"tags": ["Container"]
}
},
"/containers/{id}/exec": {
"post": {
"consumes": ["application/json"],
"description": "Run a command inside a running container.",
"operationId": "ContainerExec",
"parameters": [
{
"description": "Exec configuration",
"in": "body",
"name": "execConfig",
"required": true,
"schema": {
"example": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": ["date"],
"DetachKeys": "ctrl-p,ctrl-q",
"Env": ["FOO=bar", "BAZ=quux"],
"Tty": false
},
"properties": {
"AttachStderr": {
"description": "Attach to `stderr` of the exec command.",
"type": "boolean"
},
"AttachStdin": {
"description": "Attach to `stdin` of the exec command.",
"type": "boolean"
},
"AttachStdout": {
"description": "Attach to `stdout` of the exec command.",
"type": "boolean"
},
"Cmd": {
"description": "Command to run, as a string or array of strings.",
"items": { "type": "string" },
"type": "array"
},
"DetachKeys": {
"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`, `@`, `^`, `[`, `,` or `_`.",
"type": "string"
},
"Env": {
"description": "A list of environment variables in the form `[\"VAR=value\", ...]`.",
"items": { "type": "string" },
"type": "array"
},
"Privileged": {
"default": false,
"description": "Runs the exec process with extended privileges.",
"type": "boolean"
},
"Tty": {
"description": "Allocate a pseudo-TTY.",
"type": "boolean"
},
"User": {
"description": "The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`.",
"type": "string"
},
"WorkingDir": {
"description": "The working directory for the exec process inside the container.",
"type": "string"
}
},
"type": "object"
}
},
{
"description": "ID or name of container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "no error",
"schema": { "$ref": "#/definitions/IdResponse" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "container is paused",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create an exec instance",
"tags": ["Exec"]
}
},
"/containers/{id}/export": {
"get": {
"description": "Export the contents of a container as a tarball.",
"operationId": "ContainerExport",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/octet-stream"],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Export a container",
"tags": ["Container"]
}
},
"/containers/{id}/json": {
"get": {
"description": "Return low-level information about a container.",
"operationId": "ContainerInspect",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Return the size of container as fields `SizeRw` and `SizeRootFs`",
"in": "query",
"name": "size",
"type": "boolean"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"AppArmorProfile": "",
"Args": ["-c", "exit 9"],
"Config": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": ["/bin/sh", "-c", "exit 9"],
"Domainname": "",
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Healthcheck": { "Test": ["CMD-SHELL", "exit 0"] },
"Hostname": "ba033ac44011",
"Image": "ubuntu",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"MacAddress": "",
"NetworkDisabled": false,
"OpenStdin": false,
"StdinOnce": false,
"StopSignal": "SIGTERM",
"StopTimeout": 10,
"Tty": false,
"User": "",
"Volumes": { "/volumes/data": {} },
"WorkingDir": ""
},
"Created": "2015-01-06T15:47:31.485331387Z",
"Driver": "devicemapper",
"ExecIDs": [
"b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca",
"3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
],
"HostConfig": {
"BlkioDeviceReadBps": [{}],
"BlkioDeviceReadIOps": [{}],
"BlkioDeviceWriteBps": [{}],
"BlkioDeviceWriteIOps": [{}],
"BlkioWeight": 0,
"BlkioWeightDevice": [{}],
"ContainerIDFile": "",
"CpuPercent": 80,
"CpuPeriod": 100000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpuShares": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"IpcMode": "",
"KernelMemory": 0,
"LogConfig": { "Type": "json-file" },
"LxcConf": [],
"MaximumIOBps": 0,
"MaximumIOps": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"NetworkMode": "bridge",
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PortBindings": {},
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"RestartPolicy": {
"MaximumRetryCount": 2,
"Name": "on-failure"
},
"ShmSize": 67108864,
"Sysctls": { "net.ipv4.ip_forward": "1" },
"Ulimits": [{}],
"VolumeDriver": ""
},
"HostnamePath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname",
"HostsPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts",
"Id": "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39",
"Image": "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2",
"LogPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log",
"MountLabel": "",
"Mounts": [
{
"Destination": "/data",
"Driver": "local",
"Mode": "ro,Z",
"Name": "fac362...80535",
"Propagation": "",
"RW": false,
"Source": "/data"
}
],
"Name": "/boring_euclid",
"NetworkSettings": {
"Bridge": "",
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"HairpinMode": false,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"MacAddress": "",
"Networks": {
"bridge": {
"EndpointID": "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:12:00:02",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
}
},
"SandboxID": "",
"SandboxKey": ""
},
"Path": "/bin/sh",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf",
"RestartCount": 1,
"State": {
"Dead": false,
"Error": "",
"ExitCode": 9,
"FinishedAt": "2015-01-06T15:47:32.080254511Z",
"Health": {
"FailingStreak": 0,
"Log": [
{
"End": "2019-12-22T10:59:05.8078452Z",
"ExitCode": 0,
"Output": "",
"Start": "2019-12-22T10:59:05.6385933Z"
}
],
"Status": "healthy"
},
"OOMKilled": false,
"Paused": false,
"Pid": 0,
"Restarting": false,
"Running": true,
"StartedAt": "2015-01-06T15:47:32.072697474Z",
"Status": "running"
}
}
},
"schema": {
"properties": {
"AppArmorProfile": { "type": "string" },
"Args": {
"description": "The arguments to the command being run",
"items": { "type": "string" },
"type": "array"
},
"Config": { "$ref": "#/definitions/ContainerConfig" },
"Created": {
"description": "The time the container was created",
"type": "string"
},
"Driver": { "type": "string" },
"ExecIDs": {
"description": "IDs of exec instances that are running in the container.",
"items": { "type": "string" },
"type": "array",
"x-nullable": true
},
"GraphDriver": { "$ref": "#/definitions/GraphDriverData" },
"HostConfig": { "$ref": "#/definitions/HostConfig" },
"HostnamePath": { "type": "string" },
"HostsPath": { "type": "string" },
"Id": {
"description": "The ID of the container",
"type": "string"
},
"Image": {
"description": "The container's image",
"type": "string"
},
"LogPath": { "type": "string" },
"MountLabel": { "type": "string" },
"Mounts": {
"items": { "$ref": "#/definitions/MountPoint" },
"type": "array"
},
"Name": { "type": "string" },
"NetworkSettings": { "$ref": "#/definitions/NetworkSettings" },
"Node": { "description": "TODO", "type": "object" },
"Path": {
"description": "The path to the command being run",
"type": "string"
},
"Platform": { "type": "string" },
"ProcessLabel": { "type": "string" },
"ResolvConfPath": { "type": "string" },
"RestartCount": { "type": "integer" },
"SizeRootFs": {
"description": "The total size of all the files in this container.",
"format": "int64",
"type": "integer"
},
"SizeRw": {
"description": "The size of files that have been created or changed by this container.",
"format": "int64",
"type": "integer"
},
"State": {
"$ref": "#/definitions/ContainerState",
"x-nullable": true
}
},
"title": "ContainerInspectResponse",
"type": "object"
}
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a container",
"tags": ["Container"]
}
},
"/containers/{id}/kill": {
"post": {
"description": "Send a POSIX signal to a container, defaulting to killing to the container.",
"operationId": "ContainerKill",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": "SIGKILL",
"description": "Signal to send to the container as an integer or string (e.g. `SIGINT`)",
"in": "query",
"name": "signal",
"type": "string"
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "container is not running",
"examples": {
"application/json": {
"message": "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Kill a container",
"tags": ["Container"]
}
},
"/containers/{id}/logs": {
"get": {
"description": "Get `stdout` and `stderr` logs from a container.\n\nNote: This endpoint works only for containers with the `json-file` or `journald` logging driver.\n",
"operationId": "ContainerLogs",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Keep connection after returning logs.",
"in": "query",
"name": "follow",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stdout`",
"in": "query",
"name": "stdout",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stderr`",
"in": "query",
"name": "stderr",
"type": "boolean"
},
{
"default": 0,
"description": "Only return logs since this time, as a UNIX timestamp",
"in": "query",
"name": "since",
"type": "integer"
},
{
"default": 0,
"description": "Only return logs before this time, as a UNIX timestamp",
"in": "query",
"name": "until",
"type": "integer"
},
{
"default": false,
"description": "Add timestamps to every log line",
"in": "query",
"name": "timestamps",
"type": "boolean"
},
{
"default": "all",
"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.",
"in": "query",
"name": "tail",
"type": "string"
}
],
"responses": {
"200": {
"description": "logs returned as a stream in response body.\nFor the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).\nNote that unlike the attach endpoint, the logs endpoint does not upgrade the connection and does not\nset Content-Type.\n",
"schema": { "format": "binary", "type": "string" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get container logs",
"tags": ["Container"]
}
},
"/containers/{id}/pause": {
"post": {
"description": "Use the freezer cgroup to suspend all processes in a container.\n\nTraditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.\n",
"operationId": "ContainerPause",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Pause a container",
"tags": ["Container"]
}
},
"/containers/{id}/rename": {
"post": {
"operationId": "ContainerRename",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "New name for the container",
"in": "query",
"name": "name",
"required": true,
"type": "string"
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "name already in use",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Rename a container",
"tags": ["Container"]
}
},
"/containers/{id}/resize": {
"post": {
"consumes": ["application/octet-stream"],
"description": "Resize the TTY for a container.",
"operationId": "ContainerResize",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Height of the tty session in characters",
"in": "query",
"name": "h",
"type": "integer"
},
{
"description": "Width of the tty session in characters",
"in": "query",
"name": "w",
"type": "integer"
}
],
"produces": ["text/plain"],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "cannot resize container",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Resize a container TTY",
"tags": ["Container"]
}
},
"/containers/{id}/restart": {
"post": {
"operationId": "ContainerRestart",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Number of seconds to wait before killing the container",
"in": "query",
"name": "t",
"type": "integer"
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Restart a container",
"tags": ["Container"]
}
},
"/containers/{id}/start": {
"post": {
"operationId": "ContainerStart",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"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`, `@`, `^`, `[`, `,` or `_`.",
"in": "query",
"name": "detachKeys",
"type": "string"
}
],
"responses": {
"204": { "description": "no error" },
"304": { "description": "container already started" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Start a container",
"tags": ["Container"]
}
},
"/containers/{id}/stats": {
"get": {
"description": "This endpoint returns a live stream of a container’s resource usage\nstatistics.\n\nThe `precpu_stats` is the CPU statistic of the *previous* read, and is\nused to calculate the CPU usage percentage. It is not an exact copy\nof the `cpu_stats` field.\n\nIf either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is\nnil then for compatibility with older daemons the length of the\ncorresponding `cpu_usage.percpu_usage` array should be used.\n",
"operationId": "ContainerStats",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": true,
"description": "Stream the output. If false, the stats will be output once and then it will disconnect.",
"in": "query",
"name": "stream",
"type": "boolean"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"blkio_stats": {},
"cpu_stats": {
"cpu_usage": {
"percpu_usage": [8646879, 24472255, 36438778, 30657443],
"total_usage": 100215355,
"usage_in_kernelmode": 30000000,
"usage_in_usermode": 50000000
},
"online_cpus": 4,
"system_cpu_usage": 739306590000000,
"throttling_data": {
"periods": 0,
"throttled_periods": 0,
"throttled_time": 0
}
},
"memory_stats": {
"failcnt": 0,
"limit": 67108864,
"max_usage": 6651904,
"stats": {
"active_anon": 6537216,
"active_file": 0,
"cache": 0,
"hierarchical_memory_limit": 67108864,
"inactive_anon": 0,
"inactive_file": 0,
"mapped_file": 0,
"pgfault": 964,
"pgmajfault": 0,
"pgpgin": 477,
"pgpgout": 414,
"rss": 6537216,
"rss_huge": 6291456,
"total_active_anon": 6537216,
"total_active_file": 0,
"total_cache": 0,
"total_inactive_anon": 0,
"total_inactive_file": 0,
"total_mapped_file": 0,
"total_pgfault": 964,
"total_pgmajfault": 0,
"total_pgpgin": 477,
"total_pgpgout": 414,
"total_rss": 6537216,
"total_rss_huge": 6291456,
"total_unevictable": 0,
"total_writeback": 0,
"unevictable": 0,
"writeback": 0
},
"usage": 6537216
},
"networks": {
"eth0": {
"rx_bytes": 5338,
"rx_dropped": 0,
"rx_errors": 0,
"rx_packets": 36,
"tx_bytes": 648,
"tx_dropped": 0,
"tx_errors": 0,
"tx_packets": 8
},
"eth5": {
"rx_bytes": 4641,
"rx_dropped": 0,
"rx_errors": 0,
"rx_packets": 26,
"tx_bytes": 690,
"tx_dropped": 0,
"tx_errors": 0,
"tx_packets": 9
}
},
"pids_stats": { "current": 3 },
"precpu_stats": {
"cpu_usage": {
"percpu_usage": [8646879, 24350896, 36438778, 30657443],
"total_usage": 100093996,
"usage_in_kernelmode": 30000000,
"usage_in_usermode": 50000000
},
"online_cpus": 4,
"system_cpu_usage": 9492140000000,
"throttling_data": {
"periods": 0,
"throttled_periods": 0,
"throttled_time": 0
}
},
"read": "2015-01-08T22:57:31.547920715Z"
}
},
"schema": { "type": "object" }
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get container stats based on resource usage",
"tags": ["Container"]
}
},
"/containers/{id}/stop": {
"post": {
"operationId": "ContainerStop",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Number of seconds to wait before killing the container",
"in": "query",
"name": "t",
"type": "integer"
}
],
"responses": {
"204": { "description": "no error" },
"304": { "description": "container already stopped" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Stop a container",
"tags": ["Container"]
}
},
"/containers/{id}/top": {
"get": {
"description": "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows.",
"operationId": "ContainerTop",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": "-ef",
"description": "The arguments to pass to `ps`. For example, `aux`",
"in": "query",
"name": "ps_args",
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"Processes": [
[
"root",
"13642",
"882",
"0",
"17:03",
"pts/0",
"00:00:00",
"/bin/bash"
],
[
"root",
"13735",
"13642",
"0",
"17:06",
"pts/0",
"00:00:00",
"sleep 10"
]
],
"Titles": [
"UID",
"PID",
"PPID",
"C",
"STIME",
"TTY",
"TIME",
"CMD"
]
}
},
"schema": {
"description": "OK response to ContainerTop operation",
"properties": {
"Processes": {
"description": "Each process running in the container, where each is process is an array of values corresponding to the titles",
"items": { "items": { "type": "string" }, "type": "array" },
"type": "array"
},
"Titles": {
"description": "The ps column titles",
"items": { "type": "string" },
"type": "array"
}
},
"title": "ContainerTopResponse",
"type": "object"
}
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List processes running inside a container",
"tags": ["Container"]
}
},
"/containers/{id}/unpause": {
"post": {
"description": "Resume a container which has been paused.",
"operationId": "ContainerUnpause",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Unpause a container",
"tags": ["Container"]
}
},
"/containers/{id}/update": {
"post": {
"consumes": ["application/json"],
"description": "Change various configuration options of a container without having to recreate it.",
"operationId": "ContainerUpdate",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "update",
"required": true,
"schema": {
"allOf": [
{ "$ref": "#/definitions/Resources" },
{
"properties": {
"RestartPolicy": { "$ref": "#/definitions/RestartPolicy" }
},
"type": "object"
}
],
"example": {
"BlkioWeight": 300,
"CpuPeriod": 100000,
"CpuQuota": 50000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpuShares": 512,
"CpusetCpus": "0,1",
"CpusetMems": "0",
"KernelMemory": 52428800,
"Memory": 314572800,
"MemoryReservation": 209715200,
"MemorySwap": 514288000,
"RestartPolicy": {
"MaximumRetryCount": 4,
"Name": "on-failure"
}
}
}
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "The container has been updated.",
"schema": {
"description": "OK response to ContainerUpdate operation",
"properties": {
"Warnings": { "items": { "type": "string" }, "type": "array" }
},
"title": "ContainerUpdateResponse",
"type": "object"
}
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a container",
"tags": ["Container"]
}
},
"/containers/{id}/wait": {
"post": {
"description": "Block until a container stops, then returns the exit code.",
"operationId": "ContainerWait",
"parameters": [
{
"description": "ID or name of the container",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": "not-running",
"description": "Wait until a container state reaches the given condition, either 'not-running' (default), 'next-exit', or 'removed'.",
"in": "query",
"name": "condition",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "The container has exit.",
"schema": {
"description": "OK response to ContainerWait operation",
"properties": {
"Error": {
"description": "container waiting error, if any",
"properties": {
"Message": {
"description": "Details of an error",
"type": "string"
}
},
"type": "object"
},
"StatusCode": {
"description": "Exit code of the container",
"type": "integer",
"x-nullable": false
}
},
"required": ["StatusCode"],
"title": "ContainerWaitResponse",
"type": "object"
}
},
"404": {
"description": "no such container",
"examples": {
"application/json": {
"message": "No such container: c2ada9df5af8"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Wait for a container",
"tags": ["Container"]
}
},
"/distribution/{name}/json": {
"get": {
"description": "Return image digest and platform information by contacting the registry.",
"operationId": "DistributionInspect",
"parameters": [
{
"description": "Image name or id",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "descriptor and platform information",
"examples": {
"application/json": {
"Descriptor": {
"Digest": "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96",
"MediaType": "application/vnd.docker.distribution.manifest.v2+json",
"Size": 3987495,
"URLs": [""]
},
"Platforms": [
{
"Architecture": "amd64",
"Features": [""],
"OS": "linux",
"OSFeatures": [""],
"OSVersion": "",
"Variant": ""
}
]
}
},
"schema": {
"properties": {
"Descriptor": {
"description": "A descriptor struct containing digest, media type, and size",
"properties": {
"Digest": { "type": "string" },
"MediaType": { "type": "string" },
"Size": { "format": "int64", "type": "integer" },
"URLs": { "items": { "type": "string" }, "type": "array" }
},
"type": "object"
},
"Platforms": {
"description": "An array containing all platforms supported by the image",
"items": {
"properties": {
"Architecture": { "type": "string" },
"Features": {
"items": { "type": "string" },
"type": "array"
},
"OS": { "type": "string" },
"OSFeatures": {
"items": { "type": "string" },
"type": "array"
},
"OSVersion": { "type": "string" },
"Variant": { "type": "string" }
},
"type": "object"
},
"type": "array"
}
},
"required": ["Descriptor", "Platforms"],
"title": "DistributionInspectResponse",
"type": "object",
"x-go-name": "DistributionInspect"
}
},
"401": {
"description": "Failed authentication or no image found",
"examples": {
"application/json": {
"message": "No such image: someimage (tag: latest)"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get image information from the registry",
"tags": ["Distribution"]
}
},
"/events": {
"get": {
"description": "Stream real-time events from the server.\n\nVarious objects within Docker report events when something happens to them.\n\nContainers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, and `update`\n\nImages report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag`\n\nVolumes report these events: `create`, `mount`, `unmount`, and `destroy`\n\nNetworks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove`\n\nThe Docker daemon reports these events: `reload`\n\nServices report these events: `create`, `update`, and `remove`\n\nNodes report these events: `create`, `update`, and `remove`\n\nSecrets report these events: `create`, `update`, and `remove`\n\nConfigs report these events: `create`, `update`, and `remove`\n",
"operationId": "SystemEvents",
"parameters": [
{
"description": "Show events created since this timestamp then stream new events.",
"in": "query",
"name": "since",
"type": "string"
},
{
"description": "Show events created until this timestamp then stop streaming.",
"in": "query",
"name": "until",
"type": "string"
},
{
"description": "A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:\n\n- `config=<string>` config name or ID\n- `container=<string>` container name or ID\n- `daemon=<string>` daemon name or ID\n- `event=<string>` event type\n- `image=<string>` image name or ID\n- `label=<string>` image or container label\n- `network=<string>` network name or ID\n- `node=<string>` node ID\n- `plugin`=<string> plugin name or ID\n- `scope`=<string> local or swarm\n- `secret=<string>` secret name or ID\n- `service=<string>` service name or ID\n- `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config`\n- `volume=<string>` volume name\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"Action": "create",
"Actor": {
"Attributes": {
"com.example.some-label": "some-label-value",
"image": "alpine",
"name": "my-container"
},
"ID": "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
},
"Type": "container",
"time": 1461943101
}
},
"schema": {
"properties": {
"Action": {
"description": "The type of event",
"type": "string"
},
"Actor": {
"properties": {
"Attributes": {
"additionalProperties": { "type": "string" },
"description": "Various key/value attributes of the object, depending on its type",
"type": "object"
},
"ID": {
"description": "The ID of the object emitting the event",
"type": "string"
}
},
"type": "object"
},
"Type": {
"description": "The type of object emitting the event",
"type": "string"
},
"time": {
"description": "Timestamp of event",
"type": "integer"
},
"timeNano": {
"description": "Timestamp of event, with nanosecond accuracy",
"format": "int64",
"type": "integer"
}
},
"title": "SystemEventsResponse",
"type": "object"
}
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Monitor events",
"tags": ["System"]
}
},
"/exec/{id}/json": {
"get": {
"description": "Return low-level information about an exec instance.",
"operationId": "ExecInspect",
"parameters": [
{
"description": "Exec instance ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"examples": {
"application/json": {
"CanRemove": false,
"ContainerID": "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126",
"DetachKeys": "",
"ExitCode": 2,
"ID": "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b",
"OpenStderr": true,
"OpenStdin": true,
"OpenStdout": true,
"Pid": 42000,
"ProcessConfig": {
"arguments": ["-c", "exit 2"],
"entrypoint": "sh",
"privileged": false,
"tty": true,
"user": "1000"
},
"Running": false
}
},
"schema": {
"properties": {
"CanRemove": { "type": "boolean" },
"ContainerID": { "type": "string" },
"DetachKeys": { "type": "string" },
"ExitCode": { "type": "integer" },
"ID": { "type": "string" },
"OpenStderr": { "type": "boolean" },
"OpenStdin": { "type": "boolean" },
"OpenStdout": { "type": "boolean" },
"Pid": {
"description": "The system process ID for the exec process.",
"type": "integer"
},
"ProcessConfig": { "$ref": "#/definitions/ProcessConfig" },
"Running": { "type": "boolean" }
},
"title": "ExecInspectResponse",
"type": "object"
}
},
"404": {
"description": "No such exec instance",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect an exec instance",
"tags": ["Exec"]
}
},
"/exec/{id}/resize": {
"post": {
"description": "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance.",
"operationId": "ExecResize",
"parameters": [
{
"description": "Exec instance ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "Height of the TTY session in characters",
"in": "query",
"name": "h",
"type": "integer"
},
{
"description": "Width of the TTY session in characters",
"in": "query",
"name": "w",
"type": "integer"
}
],
"responses": {
"201": { "description": "No error" },
"404": {
"description": "No such exec instance",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Resize an exec instance",
"tags": ["Exec"]
}
},
"/exec/{id}/start": {
"post": {
"consumes": ["application/json"],
"description": "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.",
"operationId": "ExecStart",
"parameters": [
{
"in": "body",
"name": "execStartConfig",
"schema": {
"example": { "Detach": false, "Tty": false },
"properties": {
"Detach": {
"description": "Detach from the command.",
"type": "boolean"
},
"Tty": {
"description": "Allocate a pseudo-TTY.",
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Exec instance ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/vnd.docker.raw-stream"],
"responses": {
"200": { "description": "No error" },
"404": {
"description": "No such exec instance",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "Container is stopped or paused",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Start an exec instance",
"tags": ["Exec"]
}
},
"/images/create": {
"post": {
"consumes": ["text/plain", "application/octet-stream"],
"description": "Create an image by either pulling it from a registry or importing it.",
"operationId": "ImageCreate",
"parameters": [
{
"description": "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed.",
"in": "query",
"name": "fromImage",
"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 when importing an image.",
"in": "query",
"name": "fromSrc",
"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.",
"in": "query",
"name": "repo",
"type": "string"
},
{
"description": "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.",
"in": "query",
"name": "tag",
"type": "string"
},
{
"description": "Set commit message for imported image.",
"in": "query",
"name": "message",
"type": "string"
},
{
"description": "Image content if the value `-` has been specified in fromSrc query parameter",
"in": "body",
"name": "inputImage",
"required": false,
"schema": { "type": "string" }
},
{
"description": "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"type": "string"
},
{
"default": "",
"description": "Platform in the format os[/arch[/variant]]",
"in": "query",
"name": "platform",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "repository does not exist or no read access",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create an image",
"tags": ["Image"]
}
},
"/images/get": {
"get": {
"description": "Get a tarball containing all images and metadata for several image repositories.\n\nFor each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.\n\nFor details on the format, see [the export image endpoint](#operation/ImageGet).\n",
"operationId": "ImageGetAll",
"parameters": [
{
"description": "Image names to filter by",
"in": "query",
"items": { "type": "string" },
"name": "names",
"type": "array"
}
],
"produces": ["application/x-tar"],
"responses": {
"200": {
"description": "no error",
"schema": { "format": "binary", "type": "string" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Export several images",
"tags": ["Image"]
}
},
"/images/json": {
"get": {
"description": "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.",
"operationId": "ImageList",
"parameters": [
{
"default": false,
"description": "Show all images. Only images from a final layer (no children) are shown by default.",
"in": "query",
"name": "all",
"type": "boolean"
},
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:\n\n- `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)\n- `dangling=true`\n- `label=key` or `label=\"key=value\"` of an image label\n- `reference`=(`<image-name>[:<tag>]`)\n- `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)\n",
"in": "query",
"name": "filters",
"type": "string"
},
{
"default": false,
"description": "Show digest information as a `RepoDigests` field on each image.",
"in": "query",
"name": "digests",
"type": "boolean"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Summary image data for the images matching the query",
"examples": {
"application/json": [
{
"Containers": 2,
"Created": 1474925151,
"Id": "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8",
"Labels": {},
"ParentId": "",
"RepoDigests": [
"ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
],
"RepoTags": ["ubuntu:12.04", "ubuntu:precise"],
"SharedSize": 0,
"Size": 103579269,
"VirtualSize": 103579269
},
{
"Containers": 5,
"Created": 1403128455,
"Id": "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175",
"Labels": {},
"ParentId": "",
"RepoDigests": [
"ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7",
"ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
],
"RepoTags": ["ubuntu:12.10", "ubuntu:quantal"],
"SharedSize": 0,
"Size": 172064416,
"VirtualSize": 172064416
}
]
},
"schema": {
"items": { "$ref": "#/definitions/ImageSummary" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List Images",
"tags": ["Image"]
}
},
"/images/load": {
"post": {
"consumes": ["application/x-tar"],
"description": "Load a set of images and tags into a repository.\n\nFor details on the format, see [the export image endpoint](#operation/ImageGet).\n",
"operationId": "ImageLoad",
"parameters": [
{
"description": "Tar archive containing images",
"in": "body",
"name": "imagesTarball",
"schema": { "format": "binary", "type": "string" }
},
{
"default": false,
"description": "Suppress progress details during load.",
"in": "query",
"name": "quiet",
"type": "boolean"
}
],
"produces": ["application/json"],
"responses": {
"200": { "description": "no error" },
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Import images",
"tags": ["Image"]
}
},
"/images/prune": {
"post": {
"operationId": "ImagePrune",
"parameters": [
{
"description": "Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:\n\n- `dangling=<boolean>` When set to `true` (or `1`), prune only\n unused *and* untagged images. When set to `false`\n (or `0`), all unused images are pruned.\n- `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.\n- `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune images with (or without, in case `label!=...` is used) the specified labels.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"properties": {
"ImagesDeleted": {
"description": "Images that were deleted",
"items": { "$ref": "#/definitions/ImageDeleteResponseItem" },
"type": "array"
},
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
}
},
"title": "ImagePruneResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete unused images",
"tags": ["Image"]
}
},
"/images/search": {
"get": {
"description": "Search for an image on Docker Hub.",
"operationId": "ImageSearch",
"parameters": [
{
"description": "Term to search",
"in": "query",
"name": "term",
"required": true,
"type": "string"
},
{
"description": "Maximum number of results to return",
"in": "query",
"name": "limit",
"type": "integer"
},
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:\n\n- `is-automated=(true|false)`\n- `is-official=(true|false)`\n- `stars=<number>` Matches images that has at least 'number' stars.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"examples": {
"application/json": [
{
"description": "",
"is_automated": false,
"is_official": false,
"name": "wma55/u1210sshd",
"star_count": 0
},
{
"description": "",
"is_automated": false,
"is_official": false,
"name": "jdswinbank/sshd",
"star_count": 0
},
{
"description": "",
"is_automated": false,
"is_official": false,
"name": "vgauthier/sshd",
"star_count": 0
}
]
},
"schema": {
"items": {
"properties": {
"description": { "type": "string" },
"is_automated": { "type": "boolean" },
"is_official": { "type": "boolean" },
"name": { "type": "string" },
"star_count": { "type": "integer" }
},
"title": "ImageSearchResponseItem",
"type": "object"
},
"type": "array"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Search images",
"tags": ["Image"]
}
},
"/images/{name}": {
"delete": {
"description": "Remove an image, along with any untagged parent images that were\nreferenced by that image.\n\nImages can't be removed if they have descendant images, are being\nused by a running container or are being used by a build.\n",
"operationId": "ImageDelete",
"parameters": [
{
"description": "Image name or ID",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Remove the image even if it is being used by stopped containers or has other tags",
"in": "query",
"name": "force",
"type": "boolean"
},
{
"default": false,
"description": "Do not delete untagged parent images",
"in": "query",
"name": "noprune",
"type": "boolean"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "The image was deleted successfully",
"examples": {
"application/json": [
{ "Untagged": "3e2f21a89f" },
{ "Deleted": "3e2f21a89f" },
{ "Deleted": "53b4f83ac9" }
]
},
"schema": {
"items": { "$ref": "#/definitions/ImageDeleteResponseItem" },
"type": "array"
}
},
"404": {
"description": "No such image",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "Conflict",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Remove an image",
"tags": ["Image"]
}
},
"/images/{name}/get": {
"get": {
"description": "Get a tarball containing all images and metadata for a repository.\n\nIf `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced.\n\n### Image tarball format\n\nAn image tarball contains one directory per image layer (named using its long ID), each containing these files:\n\n- `VERSION`: currently `1.0` - the file format version\n- `json`: detailed layer information, similar to `docker inspect layer_id`\n- `layer.tar`: A tarfile containing the filesystem changes in this layer\n\nThe `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.\n\nIf the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs.\n\n```json\n{\n \"hello-world\": {\n \"latest\": \"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1\"\n }\n}\n```\n",
"operationId": "ImageGet",
"parameters": [
{
"description": "Image name or ID",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"produces": ["application/x-tar"],
"responses": {
"200": {
"description": "no error",
"schema": { "format": "binary", "type": "string" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Export an image",
"tags": ["Image"]
}
},
"/images/{name}/history": {
"get": {
"description": "Return parent layers of an image.",
"operationId": "ImageHistory",
"parameters": [
{
"description": "Image name or ID",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "List of image layers",
"examples": {
"application/json": [
{
"Comment": "",
"Created": 1398108230,
"CreatedBy": "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /",
"Id": "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710",
"Size": 182964289,
"Tags": ["ubuntu:lucid", "ubuntu:10.04"]
},
{
"Comment": "",
"Created": 1398108222,
"CreatedBy": "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/",
"Id": "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8",
"Size": 0,
"Tags": []
},
{
"Comment": "Imported from -",
"Created": 1371157430,
"CreatedBy": "",
"Id": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
"Size": 0,
"Tags": ["scratch12:latest", "scratch:latest"]
}
]
},
"schema": {
"items": {
"description": "individual image layer information in response to ImageHistory operation",
"properties": {
"Comment": { "type": "string", "x-nullable": false },
"Created": {
"format": "int64",
"type": "integer",
"x-nullable": false
},
"CreatedBy": { "type": "string", "x-nullable": false },
"Id": { "type": "string", "x-nullable": false },
"Size": {
"format": "int64",
"type": "integer",
"x-nullable": false
},
"Tags": { "items": { "type": "string" }, "type": "array" }
},
"required": [
"Id",
"Created",
"CreatedBy",
"Tags",
"Size",
"Comment"
],
"title": "HistoryResponseItem",
"type": "object",
"x-go-name": "HistoryResponseItem"
},
"type": "array"
}
},
"404": {
"description": "No such image",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get the history of an image",
"tags": ["Image"]
}
},
"/images/{name}/json": {
"get": {
"description": "Return low-level information about an image.",
"operationId": "ImageInspect",
"parameters": [
{
"description": "Image name or id",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"examples": {
"application/json": {
"Architecture": "amd64",
"Author": "",
"Comment": "",
"Config": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": ["/bin/bash"],
"Domainname": "",
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Hostname": "e611e15f9c9d",
"Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"MacAddress": "",
"NetworkDisabled": false,
"OnBuild": [],
"OpenStdin": false,
"PublishService": "",
"StdinOnce": false,
"Tty": false,
"User": "",
"WorkingDir": ""
},
"Container": "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a",
"ContainerConfig": {
"AttachStderr": false,
"AttachStdin": false,
"AttachStdout": false,
"Cmd": [
"/bin/sh",
"-c",
"#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
],
"Domainname": "",
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Hostname": "e611e15f9c9d",
"Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"MacAddress": "",
"NetworkDisabled": false,
"OnBuild": [],
"OpenStdin": false,
"PublishService": "",
"StdinOnce": false,
"Tty": false,
"User": "",
"WorkingDir": ""
},
"Created": "2015-09-10T08:30:53.26995814Z",
"DockerVersion": "1.9.0-dev",
"GraphDriver": { "Data": {}, "Name": "aufs" },
"Id": "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c",
"Os": "linux",
"Parent": "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"RepoDigests": [
"localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
],
"RepoTags": ["example:1.0", "example:latest", "example:stable"],
"RootFS": {
"Layers": [
"sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
],
"Type": "layers"
},
"Size": 0,
"VirtualSize": 188359297
}
},
"schema": { "$ref": "#/definitions/Image" }
},
"404": {
"description": "No such image",
"examples": {
"application/json": {
"message": "No such image: someimage (tag: latest)"
}
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect an image",
"tags": ["Image"]
}
},
"/images/{name}/push": {
"post": {
"consumes": ["application/octet-stream"],
"description": "Push an image to a registry.\n\nIf you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`.\n\nThe push is cancelled if the HTTP connection is closed.\n",
"operationId": "ImagePush",
"parameters": [
{
"description": "Image name or ID.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"description": "The tag to associate with the image on the registry.",
"in": "query",
"name": "tag",
"type": "string"
},
{
"description": "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"required": true,
"type": "string"
}
],
"responses": {
"200": { "description": "No error" },
"404": {
"description": "No such image",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Push an image",
"tags": ["Image"]
}
},
"/images/{name}/tag": {
"post": {
"description": "Tag an image so that it becomes part of a repository.",
"operationId": "ImageTag",
"parameters": [
{
"description": "Image name or ID to tag.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"description": "The repository to tag in. For example, `someuser/someimage`.",
"in": "query",
"name": "repo",
"type": "string"
},
{
"description": "The name of the new tag.",
"in": "query",
"name": "tag",
"type": "string"
}
],
"responses": {
"201": { "description": "No error" },
"400": {
"description": "Bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "No such image",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "Conflict",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Tag an image",
"tags": ["Image"]
}
},
"/info": {
"get": {
"operationId": "SystemInfo",
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": { "$ref": "#/definitions/SystemInfo" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get system information",
"tags": ["System"]
}
},
"/networks": {
"get": {
"description": "Returns a list of networks. For details on the format, see [the network inspect endpoint](#operation/NetworkInspect).\n\nNote that it uses a different, smaller representation of a network than inspecting a single network. For example,\nthe list of containers attached to the network is not propagated in API versions 1.28 and up.\n",
"operationId": "NetworkList",
"parameters": [
{
"description": "JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters:\n\n- `dangling=<boolean>` When set to `true` (or `1`), returns all\n networks that are not in use by a container. When set to `false`\n (or `0`), only networks that are in use by one or more\n containers are returned.\n- `driver=<driver-name>` Matches a network's driver.\n- `id=<network-id>` Matches all or part of a network ID.\n- `label=<key>` or `label=<key>=<value>` of a network label.\n- `name=<network-name>` Matches all or part of a network name.\n- `scope=[\"swarm\"|\"global\"|\"local\"]` Filters networks by scope (`swarm`, `global`, or `local`).\n- `type=[\"custom\"|\"builtin\"]` Filters networks by type. The `custom` keyword returns all user-defined networks.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"examples": {
"application/json": [
{
"Attachable": false,
"Created": "2016-10-19T06:21:00.416543526Z",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Config": [{ "Subnet": "172.17.0.0/16" }],
"Driver": "default"
},
"Id": "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566",
"Ingress": false,
"Internal": false,
"Name": "bridge",
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Scope": "local"
},
{
"Attachable": false,
"Containers": {},
"Created": "0001-01-01T00:00:00Z",
"Driver": "null",
"EnableIPv6": false,
"IPAM": { "Config": [], "Driver": "default" },
"Id": "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794",
"Ingress": false,
"Internal": false,
"Name": "none",
"Options": {},
"Scope": "local"
},
{
"Attachable": false,
"Containers": {},
"Created": "0001-01-01T00:00:00Z",
"Driver": "host",
"EnableIPv6": false,
"IPAM": { "Config": [], "Driver": "default" },
"Id": "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e",
"Ingress": false,
"Internal": false,
"Name": "host",
"Options": {},
"Scope": "local"
}
]
},
"schema": {
"items": { "$ref": "#/definitions/Network" },
"type": "array"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List networks",
"tags": ["Network"]
}
},
"/networks/create": {
"post": {
"consumes": ["application/json"],
"operationId": "NetworkCreate",
"parameters": [
{
"description": "Network configuration",
"in": "body",
"name": "networkConfig",
"required": true,
"schema": {
"example": {
"Attachable": false,
"CheckDuplicate": false,
"Driver": "bridge",
"EnableIPv6": true,
"IPAM": {
"Config": [
{
"Gateway": "172.20.10.11",
"IPRange": "172.20.10.0/24",
"Subnet": "172.20.0.0/16"
},
{
"Gateway": "2001:db8:abcd::1011",
"Subnet": "2001:db8:abcd::/64"
}
],
"Driver": "default",
"Options": { "foo": "bar" }
},
"Ingress": false,
"Internal": true,
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Name": "isolated_nw",
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
}
},
"properties": {
"Attachable": {
"description": "Globally scoped network is manually attachable by regular containers from workers in swarm mode.",
"type": "boolean"
},
"CheckDuplicate": {
"description": "Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions.",
"type": "boolean"
},
"Driver": {
"default": "bridge",
"description": "Name of the network driver plugin to use.",
"type": "string"
},
"EnableIPv6": {
"description": "Enable IPv6 on the network.",
"type": "boolean"
},
"IPAM": {
"$ref": "#/definitions/IPAM",
"description": "Optional custom IP scheme for the network."
},
"Ingress": {
"description": "Ingress network is the network which provides the routing-mesh in swarm mode.",
"type": "boolean"
},
"Internal": {
"description": "Restrict external access to the network.",
"type": "boolean"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Name": {
"description": "The network's name.",
"type": "string"
},
"Options": {
"additionalProperties": { "type": "string" },
"description": "Network specific options to be used by the drivers.",
"type": "object"
}
},
"required": ["Name"],
"type": "object"
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "No error",
"schema": {
"example": {
"Id": "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30",
"Warning": ""
},
"properties": {
"Id": {
"description": "The ID of the created network.",
"type": "string"
},
"Warning": { "type": "string" }
},
"title": "NetworkCreateResponse",
"type": "object"
}
},
"403": {
"description": "operation not supported for pre-defined networks",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "plugin not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a network",
"tags": ["Network"]
}
},
"/networks/prune": {
"post": {
"operationId": "NetworkPrune",
"parameters": [
{
"description": "Filters to process on the prune list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.\n- `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"properties": {
"NetworksDeleted": {
"description": "Networks that were deleted",
"items": { "type": "string" },
"type": "array"
}
},
"title": "NetworkPruneResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete unused networks",
"tags": ["Network"]
}
},
"/networks/{id}": {
"delete": {
"operationId": "NetworkDelete",
"parameters": [
{
"description": "Network ID or name",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": { "description": "No error" },
"403": {
"description": "operation not supported for pre-defined networks",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such network",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Remove a network",
"tags": ["Network"]
},
"get": {
"operationId": "NetworkInspect",
"parameters": [
{
"description": "Network ID or name",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Detailed inspect output for troubleshooting",
"in": "query",
"name": "verbose",
"type": "boolean"
},
{
"description": "Filter the network by scope (swarm, global, or local)",
"in": "query",
"name": "scope",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": { "$ref": "#/definitions/Network" }
},
"404": {
"description": "Network not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a network",
"tags": ["Network"]
}
},
"/networks/{id}/connect": {
"post": {
"consumes": ["application/json"],
"operationId": "NetworkConnect",
"parameters": [
{
"description": "Network ID or name",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "container",
"required": true,
"schema": {
"example": {
"Container": "3613f73ba0e4",
"EndpointConfig": {
"IPAMConfig": {
"IPv4Address": "172.24.56.89",
"IPv6Address": "2001:db8::5689"
}
}
},
"properties": {
"Container": {
"description": "The ID or name of the container to connect to the network.",
"type": "string"
},
"EndpointConfig": { "$ref": "#/definitions/EndpointSettings" }
},
"type": "object"
}
}
],
"responses": {
"200": { "description": "No error" },
"403": {
"description": "Operation not supported for swarm scoped networks",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "Network or container not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Connect a container to a network",
"tags": ["Network"]
}
},
"/networks/{id}/disconnect": {
"post": {
"consumes": ["application/json"],
"operationId": "NetworkDisconnect",
"parameters": [
{
"description": "Network ID or name",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "container",
"required": true,
"schema": {
"properties": {
"Container": {
"description": "The ID or name of the container to disconnect from the network.",
"type": "string"
},
"Force": {
"description": "Force the container to disconnect from the network.",
"type": "boolean"
}
},
"type": "object"
}
}
],
"responses": {
"200": { "description": "No error" },
"403": {
"description": "Operation not supported for swarm scoped networks",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "Network or container not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Disconnect a container from a network",
"tags": ["Network"]
}
},
"/nodes": {
"get": {
"operationId": "NodeList",
"parameters": [
{
"description": "Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `id=<node id>`\n- `label=<engine label>`\n- `membership=`(`accepted`|`pending`)`\n- `name=<node name>`\n- `node.label=<node label>`\n- `role=`(`manager`|`worker`)`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"schema": {
"items": { "$ref": "#/definitions/Node" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List nodes",
"tags": ["Node"]
}
},
"/nodes/{id}": {
"delete": {
"operationId": "NodeDelete",
"parameters": [
{
"description": "The ID or name of the node",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Force remove a node from the swarm",
"in": "query",
"name": "force",
"type": "boolean"
}
],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "no such node",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete a node",
"tags": ["Node"]
},
"get": {
"operationId": "NodeInspect",
"parameters": [
{
"description": "The ID or name of the node",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Node" }
},
"404": {
"description": "no such node",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a node",
"tags": ["Node"]
}
},
"/nodes/{id}/update": {
"post": {
"operationId": "NodeUpdate",
"parameters": [
{
"description": "The ID of the node",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"schema": { "$ref": "#/definitions/NodeSpec" }
},
{
"description": "The version number of the node object being updated. This is required to avoid conflicting writes.",
"format": "int64",
"in": "query",
"name": "version",
"required": true,
"type": "integer"
}
],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such node",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a node",
"tags": ["Node"]
}
},
"/plugins": {
"get": {
"description": "Returns information about installed plugins.",
"operationId": "PluginList",
"parameters": [
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters:\n\n- `capability=<capability name>`\n- `enable=<true>|<false>`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"items": { "$ref": "#/definitions/Plugin" },
"type": "array"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List plugins",
"tags": ["Plugin"]
}
},
"/plugins/create": {
"post": {
"consumes": ["application/x-tar"],
"operationId": "PluginCreate",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "query",
"name": "name",
"required": true,
"type": "string"
},
{
"description": "Path to tar containing plugin rootfs and manifest",
"in": "body",
"name": "tarContext",
"schema": { "format": "binary", "type": "string" }
}
],
"responses": {
"204": { "description": "no error" },
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a plugin",
"tags": ["Plugin"]
}
},
"/plugins/privileges": {
"get": {
"operationId": "GetPluginPrivileges",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "query",
"name": "remote",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"schema": {
"example": [
{ "Description": "", "Name": "network", "Value": ["host"] },
{ "Description": "", "Name": "mount", "Value": ["/data"] },
{
"Description": "",
"Name": "device",
"Value": ["/dev/cpu_dma_latency"]
}
],
"items": {
"description": "Describes a permission the user has to accept upon installing the plugin.",
"properties": {
"Description": { "type": "string" },
"Name": { "type": "string" },
"Value": { "items": { "type": "string" }, "type": "array" }
},
"title": "PluginPrivilegeItem",
"type": "object"
},
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get plugin privileges",
"tags": ["Plugin"]
}
},
"/plugins/pull": {
"post": {
"description": "Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).\n",
"operationId": "PluginPull",
"parameters": [
{
"description": "Remote reference for plugin to install.\n\nThe `:latest` tag is optional, and is used as the default if omitted.\n",
"in": "query",
"name": "remote",
"required": true,
"type": "string"
},
{
"description": "Local name for the pulled plugin.\n\nThe `:latest` tag is optional, and is used as the default if omitted.\n",
"in": "query",
"name": "name",
"required": false,
"type": "string"
},
{
"description": "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"type": "string"
},
{
"in": "body",
"name": "body",
"schema": {
"example": [
{ "Description": "", "Name": "network", "Value": ["host"] },
{ "Description": "", "Name": "mount", "Value": ["/data"] },
{
"Description": "",
"Name": "device",
"Value": ["/dev/cpu_dma_latency"]
}
],
"items": {
"description": "Describes a permission accepted by the user upon installing the plugin.",
"properties": {
"Description": { "type": "string" },
"Name": { "type": "string" },
"Value": { "items": { "type": "string" }, "type": "array" }
},
"type": "object"
},
"type": "array"
}
}
],
"produces": ["application/json"],
"responses": {
"204": { "description": "no error" },
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Install a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}": {
"delete": {
"operationId": "PluginDelete",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Disable the plugin before removing. This may result in issues if the plugin is in use by a container.",
"in": "query",
"name": "force",
"type": "boolean"
}
],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Plugin" }
},
"404": {
"description": "plugin is not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Remove a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/disable": {
"post": {
"operationId": "PluginDisable",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "plugin is not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Disable a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/enable": {
"post": {
"operationId": "PluginEnable",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"default": 0,
"description": "Set the HTTP client timeout (in seconds)",
"in": "query",
"name": "timeout",
"type": "integer"
}
],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "plugin is not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Enable a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/json": {
"get": {
"operationId": "PluginInspect",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Plugin" }
},
"404": {
"description": "plugin is not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/push": {
"post": {
"description": "Push a plugin to the registry.\n",
"operationId": "PluginPush",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "plugin not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Push a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/set": {
"post": {
"consumes": ["application/json"],
"operationId": "PluginSet",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"schema": {
"example": ["DEBUG=1"],
"items": { "type": "string" },
"type": "array"
}
}
],
"responses": {
"204": { "description": "No error" },
"404": {
"description": "Plugin not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Configure a plugin",
"tags": ["Plugin"]
}
},
"/plugins/{name}/upgrade": {
"post": {
"operationId": "PluginUpgrade",
"parameters": [
{
"description": "The name of the plugin. The `:latest` tag is optional, and is the default if omitted.",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"description": "Remote reference to upgrade to.\n\nThe `:latest` tag is optional, and is used as the default if omitted.\n",
"in": "query",
"name": "remote",
"required": true,
"type": "string"
},
{
"description": "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"type": "string"
},
{
"in": "body",
"name": "body",
"schema": {
"example": [
{ "Description": "", "Name": "network", "Value": ["host"] },
{ "Description": "", "Name": "mount", "Value": ["/data"] },
{
"Description": "",
"Name": "device",
"Value": ["/dev/cpu_dma_latency"]
}
],
"items": {
"description": "Describes a permission accepted by the user upon installing the plugin.",
"properties": {
"Description": { "type": "string" },
"Name": { "type": "string" },
"Value": { "items": { "type": "string" }, "type": "array" }
},
"type": "object"
},
"type": "array"
}
}
],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "plugin not installed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Upgrade a plugin",
"tags": ["Plugin"]
}
},
"/secrets": {
"get": {
"operationId": "SecretList",
"parameters": [
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters:\n\n- `id=<secret id>`\n- `label=<key> or label=<key>=value`\n- `name=<secret name>`\n- `names=<secret name>`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"schema": {
"example": [
{
"CreatedAt": "2017-07-20T13:55:28.678958722Z",
"ID": "blt1owaxmitz71s9v5zh81zun",
"Spec": {
"Driver": {
"Name": "secret-bucket",
"Options": {
"OptionA": "value for driver option A",
"OptionB": "value for driver option B"
}
},
"Labels": { "some.label": "some.value" },
"Name": "mysql-passwd"
},
"UpdatedAt": "2017-07-20T13:55:28.678958722Z",
"Version": { "Index": 85 }
},
{
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": { "Labels": { "foo": "bar" }, "Name": "app-dev.crt" },
"UpdatedAt": "2016-11-05T01:20:17.327670065Z",
"Version": { "Index": 11 }
}
],
"items": { "$ref": "#/definitions/Secret" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List secrets",
"tags": ["Secret"]
}
},
"/secrets/create": {
"post": {
"consumes": ["application/json"],
"operationId": "SecretCreate",
"parameters": [
{
"in": "body",
"name": "body",
"schema": {
"allOf": [
{ "$ref": "#/definitions/SecretSpec" },
{
"example": {
"Data": "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==",
"Driver": {
"Name": "secret-bucket",
"Options": {
"OptionA": "value for driver option A",
"OptionB": "value for driver option B"
}
},
"Labels": { "foo": "bar" },
"Name": "app-key.crt"
},
"type": "object"
}
]
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "no error",
"schema": { "$ref": "#/definitions/IdResponse" }
},
"409": {
"description": "name conflicts with an existing object",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a secret",
"tags": ["Secret"]
}
},
"/secrets/{id}": {
"delete": {
"operationId": "SecretDelete",
"parameters": [
{
"description": "ID of the secret",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"204": { "description": "no error" },
"404": {
"description": "secret not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete a secret",
"tags": ["Secret"]
},
"get": {
"operationId": "SecretInspect",
"parameters": [
{
"description": "ID of the secret",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": {
"Driver": {
"Name": "secret-bucket",
"Options": {
"OptionA": "value for driver option A",
"OptionB": "value for driver option B"
}
},
"Labels": { "foo": "bar" },
"Name": "app-dev.crt"
},
"UpdatedAt": "2016-11-05T01:20:17.327670065Z",
"Version": { "Index": 11 }
}
},
"schema": { "$ref": "#/definitions/Secret" }
},
"404": {
"description": "secret not found",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a secret",
"tags": ["Secret"]
}
},
"/secrets/{id}/update": {
"post": {
"operationId": "SecretUpdate",
"parameters": [
{
"description": "The ID or name of the secret",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"description": "The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values.",
"in": "body",
"name": "body",
"schema": { "$ref": "#/definitions/SecretSpec" }
},
{
"description": "The version number of the secret object being updated. This is required to avoid conflicting writes.",
"format": "int64",
"in": "query",
"name": "version",
"required": true,
"type": "integer"
}
],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such secret",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a Secret",
"tags": ["Secret"]
}
},
"/services": {
"get": {
"operationId": "ServiceList",
"parameters": [
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:\n\n- `id=<service id>`\n- `label=<service label>`\n- `mode=[\"replicated\"|\"global\"]`\n- `name=<service name>`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"responses": {
"200": {
"description": "no error",
"schema": {
"items": { "$ref": "#/definitions/Service" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List services",
"tags": ["Service"]
}
},
"/services/create": {
"post": {
"consumes": ["application/json"],
"operationId": "ServiceCreate",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"allOf": [
{ "$ref": "#/definitions/ServiceSpec" },
{
"example": {
"EndpointSpec": {
"Ports": [
{
"Protocol": "tcp",
"PublishedPort": 8080,
"TargetPort": 80
}
]
},
"Labels": { "foo": "bar" },
"Mode": { "Replicated": { "Replicas": 4 } },
"Name": "web",
"RollbackConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 1
},
"TaskTemplate": {
"ContainerSpec": {
"DNSConfig": {
"Nameservers": ["8.8.8.8"],
"Options": ["timeout:3"],
"Search": ["example.org"]
},
"Hosts": [
"10.10.10.10 host1",
"ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"
],
"Image": "nginx:alpine",
"Mounts": [
{
"ReadOnly": true,
"Source": "web-data",
"Target": "/usr/share/nginx/html",
"Type": "volume",
"VolumeOptions": {
"DriverConfig": {},
"Labels": {
"com.example.something": "something-value"
}
}
}
],
"Secrets": [
{
"File": {
"GID": "33",
"Mode": 384,
"Name": "www.example.org.key",
"UID": "33"
},
"SecretID": "fpjqlhnwb19zds35k8wn80lq9",
"SecretName": "example_org_domain_key"
}
],
"User": "33"
},
"LogDriver": {
"Name": "json-file",
"Options": { "max-file": "3", "max-size": "10M" }
},
"Placement": {},
"Resources": {
"Limits": { "MemoryBytes": 104857600 },
"Reservations": {}
},
"RestartPolicy": {
"Condition": "on-failure",
"Delay": 10000000000,
"MaxAttempts": 10
}
},
"UpdateConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 2
}
},
"type": "object"
}
]
}
},
{
"description": "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "no error",
"schema": {
"example": {
"ID": "ak7w3gjqoa3kuz8xcpnyy0pvl",
"Warning": "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
},
"properties": {
"ID": {
"description": "The ID of the created service.",
"type": "string"
},
"Warning": {
"description": "Optional warning message",
"type": "string"
}
},
"title": "ServiceCreateResponse",
"type": "object"
}
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"403": {
"description": "network is not eligible for services",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "name conflicts with an existing service",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a service",
"tags": ["Service"]
}
},
"/services/{id}": {
"delete": {
"operationId": "ServiceDelete",
"parameters": [
{
"description": "ID or name of service.",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"200": { "description": "no error" },
"404": {
"description": "no such service",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete a service",
"tags": ["Service"]
},
"get": {
"operationId": "ServiceInspect",
"parameters": [
{
"description": "ID or name of service.",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Fill empty fields with default values.",
"in": "query",
"name": "insertDefaults",
"type": "boolean"
}
],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Service" }
},
"404": {
"description": "no such service",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a service",
"tags": ["Service"]
}
},
"/services/{id}/logs": {
"get": {
"description": "Get `stdout` and `stderr` logs from a service. See also [`/containers/{id}/logs`](#operation/ContainerLogs).\n\n**Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers.\n",
"operationId": "ServiceLogs",
"parameters": [
{
"description": "ID or name of the service",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Show service context and extra details provided to logs.",
"in": "query",
"name": "details",
"type": "boolean"
},
{
"default": false,
"description": "Keep connection after returning logs.",
"in": "query",
"name": "follow",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stdout`",
"in": "query",
"name": "stdout",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stderr`",
"in": "query",
"name": "stderr",
"type": "boolean"
},
{
"default": 0,
"description": "Only return logs since this time, as a UNIX timestamp",
"in": "query",
"name": "since",
"type": "integer"
},
{
"default": false,
"description": "Add timestamps to every log line",
"in": "query",
"name": "timestamps",
"type": "boolean"
},
{
"default": "all",
"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.",
"in": "query",
"name": "tail",
"type": "string"
}
],
"responses": {
"200": {
"description": "logs returned as a stream in response body",
"schema": { "format": "binary", "type": "string" }
},
"404": {
"description": "no such service",
"examples": {
"application/json": { "message": "No such service: c2ada9df5af8" }
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get service logs",
"tags": ["Service"]
}
},
"/services/{id}/update": {
"post": {
"consumes": ["application/json"],
"operationId": "ServiceUpdate",
"parameters": [
{
"description": "ID or name of service.",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"allOf": [
{ "$ref": "#/definitions/ServiceSpec" },
{
"example": {
"EndpointSpec": { "Mode": "vip" },
"Mode": { "Replicated": { "Replicas": 1 } },
"Name": "top",
"RollbackConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 1
},
"TaskTemplate": {
"ContainerSpec": { "Args": ["top"], "Image": "busybox" },
"ForceUpdate": 0,
"Placement": {},
"Resources": { "Limits": {}, "Reservations": {} },
"RestartPolicy": { "Condition": "any", "MaxAttempts": 0 }
},
"UpdateConfig": {
"Delay": 1000000000,
"FailureAction": "pause",
"MaxFailureRatio": 0.15,
"Monitor": 15000000000,
"Parallelism": 2
}
},
"type": "object"
}
]
}
},
{
"description": "The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service *before* the update. You can find the current version by calling `GET /services/{id}`",
"in": "query",
"name": "version",
"required": true,
"type": "integer"
},
{
"default": "spec",
"description": "If the `X-Registry-Auth` header is not specified, this parameter\nindicates where to find registry authorization credentials.\n",
"enum": ["spec", "previous-spec"],
"in": "query",
"name": "registryAuthFrom",
"type": "string"
},
{
"description": "Set to this parameter to `previous` to cause a server-side rollback\nto the previous service spec. The supplied spec will be ignored in\nthis case.\n",
"in": "query",
"name": "rollback",
"type": "string"
},
{
"description": "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)",
"in": "header",
"name": "X-Registry-Auth",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/ServiceUpdateResponse" }
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"404": {
"description": "no such service",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a service",
"tags": ["Service"]
}
},
"/session": {
"post": {
"description": "Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities.\n\n### Hijacking\n\nThis endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection.\n\nFor example, the client sends this request to upgrade the connection:\n\n```\nPOST /session HTTP/1.1\nUpgrade: h2c\nConnection: Upgrade\n```\n\nThe Docker daemon will respond with a `101 UPGRADED` response follow with the raw stream:\n\n```\nHTTP/1.1 101 UPGRADED\nConnection: Upgrade\nUpgrade: h2c\n```\n",
"operationId": "Session",
"produces": ["application/vnd.docker.raw-stream"],
"responses": {
"101": { "description": "no error, hijacking successful" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Initialize interactive session",
"tags": ["Session"]
}
},
"/swarm": {
"get": {
"operationId": "SwarmInspect",
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Swarm" }
},
"404": {
"description": "no such swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect swarm",
"tags": ["Swarm"]
}
},
"/swarm/init": {
"post": {
"operationId": "SwarmInit",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"example": {
"AdvertiseAddr": "192.168.1.1:2377",
"DataPathPort": 4789,
"DefaultAddrPool": ["10.10.0.0/8", "20.20.0.0/8"],
"ForceNewCluster": false,
"ListenAddr": "0.0.0.0:2377",
"Spec": {
"CAConfig": {},
"Dispatcher": {},
"EncryptionConfig": { "AutoLockManagers": false },
"Orchestration": {},
"Raft": {}
},
"SubnetSize": 24
},
"properties": {
"AdvertiseAddr": {
"description": "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible.",
"type": "string"
},
"DataPathAddr": {
"description": "Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`,\nor an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`\nis used.\n\nThe `DataPathAddr` specifies the address that global scope network drivers will publish towards other\nnodes in order to reach the containers running on this node. Using this parameter it is possible to\nseparate the container data traffic from the management traffic of the cluster.\n",
"type": "string"
},
"DataPathPort": {
"description": "DataPathPort specifies the data path port number for data traffic.\nAcceptable port range is 1024 to 49151.\nif no port is set or is set to 0, default port 4789 will be used.\n",
"format": "uint32",
"type": "integer"
},
"DefaultAddrPool": {
"description": "Default Address Pool specifies default subnet pools for global scope networks.\n",
"items": {
"example": ["10.10.0.0/16", "20.20.0.0/16"],
"type": "string"
},
"type": "array"
},
"ForceNewCluster": {
"description": "Force creation of a new swarm.",
"type": "boolean"
},
"ListenAddr": {
"description": "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used.",
"type": "string"
},
"Spec": { "$ref": "#/definitions/SwarmSpec" },
"SubnetSize": {
"description": "SubnetSize specifies the subnet size of the networks created from the default subnet pool\n",
"format": "uint32",
"type": "integer"
}
},
"type": "object"
}
}
],
"produces": ["application/json", "text/plain"],
"responses": {
"200": {
"description": "no error",
"schema": {
"description": "The node ID",
"example": "7v2t30z9blmxuhnyo6s4cpenp",
"type": "string"
}
},
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is already part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Initialize a new swarm",
"tags": ["Swarm"]
}
},
"/swarm/join": {
"post": {
"operationId": "SwarmJoin",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"example": {
"AdvertiseAddr": "192.168.1.1:2377",
"JoinToken": "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2",
"ListenAddr": "0.0.0.0:2377",
"RemoteAddrs": ["node1:2377"]
},
"properties": {
"AdvertiseAddr": {
"description": "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible.",
"type": "string"
},
"DataPathAddr": {
"description": "Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`,\nor an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr`\nis used.\n\nThe `DataPathAddr` specifies the address that global scope network drivers will publish towards other\nnodes in order to reach the containers running on this node. Using this parameter it is possible to\nseparate the container data traffic from the management traffic of the cluster.\n",
"type": "string"
},
"JoinToken": {
"description": "Secret token for joining this swarm.",
"type": "string"
},
"ListenAddr": {
"description": "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP).",
"type": "string"
},
"RemoteAddrs": {
"description": "Addresses of manager nodes already participating in the swarm.",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
}
}
],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is already part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Join an existing swarm",
"tags": ["Swarm"]
}
},
"/swarm/leave": {
"post": {
"operationId": "SwarmLeave",
"parameters": [
{
"default": false,
"description": "Force leave swarm, even if this is the last manager or that it will break the cluster.",
"in": "query",
"name": "force",
"type": "boolean"
}
],
"responses": {
"200": { "description": "no error" },
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Leave a swarm",
"tags": ["Swarm"]
}
},
"/swarm/unlock": {
"post": {
"consumes": ["application/json"],
"operationId": "SwarmUnlock",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"example": {
"UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
},
"properties": {
"UnlockKey": {
"description": "The swarm's unlock key.",
"type": "string"
}
},
"type": "object"
}
}
],
"produces": ["application/json"],
"responses": {
"200": { "description": "no error" },
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Unlock a locked manager",
"tags": ["Swarm"]
}
},
"/swarm/unlockkey": {
"get": {
"consumes": ["application/json"],
"operationId": "SwarmUnlockkey",
"responses": {
"200": {
"description": "no error",
"schema": {
"example": {
"UnlockKey": "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
},
"properties": {
"UnlockKey": {
"description": "The swarm's unlock key.",
"type": "string"
}
},
"title": "UnlockKeyResponse",
"type": "object"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get the unlock key",
"tags": ["Swarm"]
}
},
"/swarm/update": {
"post": {
"operationId": "SwarmUpdate",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": { "$ref": "#/definitions/SwarmSpec" }
},
{
"description": "The version number of the swarm object being updated. This is required to avoid conflicting writes.",
"format": "int64",
"in": "query",
"name": "version",
"required": true,
"type": "integer"
},
{
"default": false,
"description": "Rotate the worker join token.",
"in": "query",
"name": "rotateWorkerToken",
"type": "boolean"
},
{
"default": false,
"description": "Rotate the manager join token.",
"in": "query",
"name": "rotateManagerToken",
"type": "boolean"
},
{
"default": false,
"description": "Rotate the manager unlock key.",
"in": "query",
"name": "rotateManagerUnlockKey",
"type": "boolean"
}
],
"responses": {
"200": { "description": "no error" },
"400": {
"description": "bad parameter",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Update a swarm",
"tags": ["Swarm"]
}
},
"/system/df": {
"get": {
"operationId": "SystemDataUsage",
"responses": {
"200": {
"description": "no error",
"schema": {
"example": {
"Containers": [
{
"Command": "top",
"Created": 1472592424,
"HostConfig": { "NetworkMode": "default" },
"Id": "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148",
"Image": "busybox",
"ImageID": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749",
"Labels": {},
"Mounts": [],
"Names": ["/top"],
"NetworkSettings": {
"Networks": {
"bridge": {
"Aliases": null,
"EndpointID": "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a",
"Gateway": "172.18.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAMConfig": null,
"IPAddress": "172.18.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"Links": null,
"MacAddress": "02:42:ac:12:00:02",
"NetworkID": "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
}
}
},
"Ports": [],
"SizeRootFs": 1092588,
"State": "exited",
"Status": "Exited (0) 56 minutes ago"
}
],
"Images": [
{
"Containers": 1,
"Created": 1466724217,
"Id": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749",
"Labels": {},
"ParentId": "",
"RepoDigests": [
"busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
],
"RepoTags": ["busybox:latest"],
"SharedSize": 0,
"Size": 1092588,
"VirtualSize": 1092588
}
],
"LayersSize": 1092588,
"Volumes": [
{
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/my-volume/_data",
"Name": "my-volume",
"Options": null,
"Scope": "local",
"UsageData": { "RefCount": 2, "Size": 10920104 }
}
]
},
"properties": {
"BuildCache": {
"items": { "$ref": "#/definitions/BuildCache" },
"type": "array"
},
"Containers": {
"items": { "$ref": "#/definitions/ContainerSummary" },
"type": "array"
},
"Images": {
"items": { "$ref": "#/definitions/ImageSummary" },
"type": "array"
},
"LayersSize": { "format": "int64", "type": "integer" },
"Volumes": {
"items": { "$ref": "#/definitions/Volume" },
"type": "array"
}
},
"title": "SystemDataUsageResponse",
"type": "object"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get data usage information",
"tags": ["System"]
}
},
"/tasks": {
"get": {
"operationId": "TaskList",
"parameters": [
{
"description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:\n\n- `desired-state=(running | shutdown | accepted)`\n- `id=<task id>`\n- `label=key` or `label=\"key=value\"`\n- `name=<task name>`\n- `node=<node id or name>`\n- `service=<service name>`\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"schema": {
"example": [
{
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
"DesiredState": "running",
"ID": "0kzzo1i0y4jz6027t0k7aezc7",
"NetworksAttachments": [
{
"Addresses": ["10.255.0.10/16"],
"Network": {
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"IPAMOptions": {
"Configs": [
{
"Gateway": "10.255.0.1",
"Subnet": "10.255.0.0/16"
}
],
"Driver": { "Name": "default" }
},
"Spec": {
"DriverConfiguration": {},
"IPAMOptions": {
"Configs": [
{
"Gateway": "10.255.0.1",
"Subnet": "10.255.0.0/16"
}
],
"Driver": {}
},
"Labels": { "com.docker.swarm.internal": "true" },
"Name": "ingress"
},
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"Version": { "Index": 18 }
}
}
],
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"Slot": 1,
"Spec": {
"ContainerSpec": { "Image": "redis" },
"Placement": {},
"Resources": { "Limits": {}, "Reservations": {} },
"RestartPolicy": { "Condition": "any", "MaxAttempts": 0 }
},
"Status": {
"ContainerStatus": {
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
"PID": 677
},
"Message": "started",
"State": "running",
"Timestamp": "2016-06-07T21:07:31.290032978Z"
},
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
"Version": { "Index": 71 }
},
{
"CreatedAt": "2016-06-07T21:07:30.019104782Z",
"DesiredState": "shutdown",
"ID": "1yljwbmlr8er2waf8orvqpwms",
"Name": "hopeful_cori",
"NetworksAttachments": [
{
"Addresses": ["10.255.0.5/16"],
"Network": {
"CreatedAt": "2016-06-07T20:31:11.912919752Z",
"DriverState": {
"Name": "overlay",
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "256"
}
},
"ID": "4qvuz4ko70xaltuqbt8956gd1",
"IPAMOptions": {
"Configs": [
{
"Gateway": "10.255.0.1",
"Subnet": "10.255.0.0/16"
}
],
"Driver": { "Name": "default" }
},
"Spec": {
"DriverConfiguration": {},
"IPAMOptions": {
"Configs": [
{
"Gateway": "10.255.0.1",
"Subnet": "10.255.0.0/16"
}
],
"Driver": {}
},
"Labels": { "com.docker.swarm.internal": "true" },
"Name": "ingress"
},
"UpdatedAt": "2016-06-07T21:07:29.955277358Z",
"Version": { "Index": 18 }
}
}
],
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
"Slot": 1,
"Spec": {
"ContainerSpec": { "Image": "redis" },
"Placement": {},
"Resources": { "Limits": {}, "Reservations": {} },
"RestartPolicy": { "Condition": "any", "MaxAttempts": 0 }
},
"Status": {
"ContainerStatus": {
"ContainerID": "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
},
"Message": "shutdown",
"State": "shutdown",
"Timestamp": "2016-06-07T21:07:30.202183143Z"
},
"UpdatedAt": "2016-06-07T21:07:30.231958098Z",
"Version": { "Index": 30 }
}
],
"items": { "$ref": "#/definitions/Task" },
"type": "array"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List tasks",
"tags": ["Task"]
}
},
"/tasks/{id}": {
"get": {
"operationId": "TaskInspect",
"parameters": [
{
"description": "ID of the task",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"schema": { "$ref": "#/definitions/Task" }
},
"404": {
"description": "no such task",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a task",
"tags": ["Task"]
}
},
"/tasks/{id}/logs": {
"get": {
"description": "Get `stdout` and `stderr` logs from a task. See also [`/containers/{id}/logs`](#operation/ContainerLogs).\n\n**Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers.\n",
"operationId": "TaskLogs",
"parameters": [
{
"description": "ID of the task",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Show task context and extra details provided to logs.",
"in": "query",
"name": "details",
"type": "boolean"
},
{
"default": false,
"description": "Keep connection after returning logs.",
"in": "query",
"name": "follow",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stdout`",
"in": "query",
"name": "stdout",
"type": "boolean"
},
{
"default": false,
"description": "Return logs from `stderr`",
"in": "query",
"name": "stderr",
"type": "boolean"
},
{
"default": 0,
"description": "Only return logs since this time, as a UNIX timestamp",
"in": "query",
"name": "since",
"type": "integer"
},
{
"default": false,
"description": "Add timestamps to every log line",
"in": "query",
"name": "timestamps",
"type": "boolean"
},
{
"default": "all",
"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.",
"in": "query",
"name": "tail",
"type": "string"
}
],
"responses": {
"200": {
"description": "logs returned as a stream in response body",
"schema": { "format": "binary", "type": "string" }
},
"404": {
"description": "no such task",
"examples": {
"application/json": { "message": "No such task: c2ada9df5af8" }
},
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"503": {
"description": "node is not part of a swarm",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get task logs",
"tags": ["Task"]
}
},
"/version": {
"get": {
"description": "Returns the version of Docker that is running and various information about the system that Docker is running on.",
"operationId": "SystemVersion",
"produces": ["application/json"],
"responses": {
"200": {
"description": "no error",
"examples": {
"application/json": {
"ApiVersion": "1.27",
"Arch": "amd64",
"BuildTime": "2016-06-14T07:09:13.444803460+00:00",
"Experimental": true,
"GitCommit": "deadbee",
"GoVersion": "go1.7.5",
"KernelVersion": "3.19.0-23-generic",
"MinAPIVersion": "1.12",
"Os": "linux",
"Version": "17.04.0"
}
},
"schema": {
"properties": {
"ApiVersion": { "type": "string" },
"Arch": { "type": "string" },
"BuildTime": { "type": "string" },
"Components": {
"items": {
"properties": {
"Details": { "type": "object", "x-nullable": true },
"Name": { "type": "string" },
"Version": { "type": "string", "x-nullable": false }
},
"required": ["Name", "Version"],
"type": "object",
"x-go-name": "ComponentVersion"
},
"type": "array"
},
"Experimental": { "type": "boolean" },
"GitCommit": { "type": "string" },
"GoVersion": { "type": "string" },
"KernelVersion": { "type": "string" },
"MinAPIVersion": { "type": "string" },
"Os": { "type": "string" },
"Platform": {
"properties": { "Name": { "type": "string" } },
"required": ["Name"],
"type": "object"
},
"Version": { "type": "string" }
},
"title": "SystemVersionResponse",
"type": "object"
}
},
"500": {
"description": "server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Get version",
"tags": ["System"]
}
},
"/volumes": {
"get": {
"operationId": "VolumeList",
"parameters": [
{
"description": "JSON encoded value of the filters (a `map[string][]string`) to\nprocess on the volumes list. Available filters:\n\n- `dangling=<boolean>` When set to `true` (or `1`), returns all\n volumes that are not in use by a container. When set to `false`\n (or `0`), only volumes that are in use by one or more\n containers are returned.\n- `driver=<volume-driver-name>` Matches volumes based on their driver.\n- `label=<key>` or `label=<key>:<value>` Matches volumes based on\n the presence of a `label` alone or a `label` and a value.\n- `name=<volume-name>` Matches all or part of a volume name.\n",
"format": "json",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Summary volume data that matches the query",
"examples": {
"application/json": {
"Volumes": [
{
"CreatedAt": "2017-07-19T12:00:26Z",
"Driver": "local",
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Mountpoint": "/var/lib/docker/volumes/tardis",
"Name": "tardis",
"Options": {
"device": "tmpfs",
"o": "size=100m,uid=1000",
"type": "tmpfs"
},
"Scope": "local"
}
],
"Warnings": []
}
},
"schema": {
"description": "Volume list response",
"properties": {
"Volumes": {
"description": "List of volumes",
"items": { "$ref": "#/definitions/Volume" },
"type": "array",
"x-nullable": false
},
"Warnings": {
"description": "Warnings that occurred when fetching the list of volumes",
"items": { "type": "string" },
"type": "array",
"x-nullable": false
}
},
"required": ["Volumes", "Warnings"],
"title": "VolumeListResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "List volumes",
"tags": ["Volume"]
}
},
"/volumes/create": {
"post": {
"consumes": ["application/json"],
"operationId": "VolumeCreate",
"parameters": [
{
"description": "Volume configuration",
"in": "body",
"name": "volumeConfig",
"required": true,
"schema": {
"description": "Volume configuration",
"example": {
"Driver": "custom",
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"Name": "tardis"
},
"properties": {
"Driver": {
"default": "local",
"description": "Name of the volume driver to use.",
"type": "string",
"x-nullable": false
},
"DriverOpts": {
"additionalProperties": { "type": "string" },
"description": "A mapping of driver options and values. These options are passed directly to the driver and are driver specific.",
"type": "object"
},
"Labels": {
"additionalProperties": { "type": "string" },
"description": "User-defined key/value metadata.",
"type": "object"
},
"Name": {
"description": "The new volume's name. If not specified, Docker generates a name.",
"type": "string",
"x-nullable": false
}
},
"title": "VolumeConfig",
"type": "object"
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "The volume was created successfully",
"schema": { "$ref": "#/definitions/Volume" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Create a volume",
"tags": ["Volume"]
}
},
"/volumes/prune": {
"post": {
"operationId": "VolumePrune",
"parameters": [
{
"description": "Filters to process on the prune list, encoded as JSON (a `map[string][]string`).\n\nAvailable filters:\n- `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels.\n",
"in": "query",
"name": "filters",
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": {
"properties": {
"SpaceReclaimed": {
"description": "Disk space reclaimed in bytes",
"format": "int64",
"type": "integer"
},
"VolumesDeleted": {
"description": "Volumes that were deleted",
"items": { "type": "string" },
"type": "array"
}
},
"title": "VolumePruneResponse",
"type": "object"
}
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Delete unused volumes",
"tags": ["Volume"]
}
},
"/volumes/{name}": {
"delete": {
"description": "Instruct the driver to remove the volume.",
"operationId": "VolumeDelete",
"parameters": [
{
"description": "Volume name or ID",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"default": false,
"description": "Force the removal of the volume",
"in": "query",
"name": "force",
"type": "boolean"
}
],
"responses": {
"204": { "description": "The volume was removed" },
"404": {
"description": "No such volume or volume driver",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"409": {
"description": "Volume is in use and cannot be removed",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Remove a volume",
"tags": ["Volume"]
},
"get": {
"operationId": "VolumeInspect",
"parameters": [
{
"description": "Volume name or ID",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "No error",
"schema": { "$ref": "#/definitions/Volume" }
},
"404": {
"description": "No such volume",
"schema": { "$ref": "#/definitions/ErrorResponse" }
},
"500": {
"description": "Server error",
"schema": { "$ref": "#/definitions/ErrorResponse" }
}
},
"summary": "Inspect a volume",
"tags": ["Volume"]
}
}
},
"produces": ["application/json", "text/plain"],
"schemes": ["http", "https"],
"swagger": "2.0",
"tags": [
{
"description": "Create and manage containers.\n",
"name": "Container",
"x-displayName": "Containers"
},
{ "name": "Image", "x-displayName": "Images" },
{
"description": "Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/engine/userguide/networking/) for more information.\n",
"name": "Network",
"x-displayName": "Networks"
},
{
"description": "Create and manage persistent storage that can be attached to containers.\n",
"name": "Volume",
"x-displayName": "Volumes"
},
{
"description": "Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information.\n\nTo exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`.\n",
"name": "Exec",
"x-displayName": "Exec"
},
{
"description": "Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information.\n",
"name": "Swarm",
"x-displayName": "Swarm"
},
{
"description": "Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work.\n",
"name": "Node",
"x-displayName": "Nodes"
},
{
"description": "Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work.\n",
"name": "Service",
"x-displayName": "Services"
},
{
"description": "A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work.\n",
"name": "Task",
"x-displayName": "Tasks"
},
{
"description": "Secrets are sensitive data that can be used by services. Swarm mode must be enabled for these endpoints to work.\n",
"name": "Secret",
"x-displayName": "Secrets"
},
{
"description": "Configs are application configurations that can be used by services. Swarm mode must be enabled for these endpoints to work.\n",
"name": "Config",
"x-displayName": "Configs"
},
{ "name": "Plugin", "x-displayName": "Plugins" },
{ "name": "System", "x-displayName": "System" }
]
}
@notpushkin
Copy link
Author

http https://docs.docker.com/engine/api/v1.40.yaml | yaml2json | xclip -sel clip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment