UNPKG

@itentialopensource/adapter-docker

Version:

This adapter integrates with system Docker

1,457 lines (1,456 loc) 789 kB
{ "openapi": "3.1.0", "info": { "title": "", "version": "1.0.0" }, "paths": { "/containers/json": { "get": { "tags": [ "Container" ], "operationId": "getContainersjson", "description": "The parameters and request body are for method: getContainersjson. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "Id": { "type": "string" }, "Names": { "type": "array", "items": { "type": "string" } }, "Image": { "type": "string" }, "ImageID": { "type": "string" }, "Command": { "type": "string" }, "Created": { "type": "number" }, "State": { "type": "string" }, "Status": { "type": "string" }, "Ports": { "type": "array", "items": { "type": "object", "properties": { "PrivatePort": { "type": "number" }, "PublicPort": { "type": "number" }, "Type": { "type": "string" } } } }, "Labels": { "type": "object", "properties": { "com.example.vendor": { "type": "string" }, "com.example.license": { "type": "string" }, "com.example.version": { "type": "string" } } }, "SizeRw": { "type": "number" }, "SizeRootFs": { "type": "number" }, "HostConfig": { "type": "object", "properties": { "NetworkMode": { "type": "string" } } }, "NetworkSettings": { "type": "object", "properties": { "Networks": { "type": "object", "properties": { "bridge": { "type": "object", "properties": { "NetworkID": { "type": "string" }, "EndpointID": { "type": "string" }, "Gateway": { "type": "string" }, "IPAddress": { "type": "string" }, "IPPrefixLen": { "type": "number" }, "IPv6Gateway": { "type": "string" }, "GlobalIPv6Address": { "type": "string" }, "GlobalIPv6PrefixLen": { "type": "number" }, "MacAddress": { "type": "string" } } } } } } }, "Mounts": { "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string" }, "Source": { "type": "string" }, "Destination": { "type": "string" }, "Driver": { "type": "string" }, "Mode": { "type": "string" }, "RW": { "type": "boolean" }, "Propagation": { "type": "string" } } } } } } }, "example": [ { "Id": "8dfafdbc3a40", "Names": [ "/boring_feynman" ], "Image": "ubuntu:latest", "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", "Command": "echo 1", "Created": 1367854155, "State": "Exited", "Status": "Exit 0", "Ports": [ { "PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp" } ], "Labels": { "com.example.vendor": "Acme", "com.example.license": "GPL", "com.example.version": "1.0" }, "SizeRw": 12288, "SizeRootFs": 0, "HostConfig": { "NetworkMode": "default" }, "NetworkSettings": { "Networks": { "bridge": { "NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", "EndpointID": "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:02" } } }, "Mounts": [ { "Name": "fac362...80535", "Source": "/data", "Destination": "/data", "Driver": "local", "Mode": "ro,Z", "RW": false, "Propagation": "" } ] }, { "Id": "9cd87474be90", "Names": [ "/coolName" ], "Image": "ubuntu:latest", "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", "Command": "echo 222222", "Created": 1367854155, "State": "Exited", "Status": "Exit 0", "Ports": [], "Labels": {}, "SizeRw": 12288, "SizeRootFs": 0, "HostConfig": { "NetworkMode": "default" }, "NetworkSettings": { "Networks": { "bridge": { "NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", "EndpointID": "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.8", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:08" } } }, "Mounts": [] }, { "Id": "3176a2479c92", "Names": [ "/sleepy_dog" ], "Image": "ubuntu:latest", "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", "Command": "echo 3333333333333333", "Created": 1367854154, "State": "Exited", "Status": "Exit 0", "Ports": [], "Labels": {}, "SizeRw": 12288, "SizeRootFs": 0, "HostConfig": { "NetworkMode": "default" }, "NetworkSettings": { "Networks": { "bridge": { "NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", "EndpointID": "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.6", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:06" } } }, "Mounts": [] }, { "Id": "4cb07b47f9fb", "Names": [ "/running_cat" ], "Image": "ubuntu:latest", "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", "Command": "echo 444444444444444444444444444444444", "Created": 1367854152, "State": "Exited", "Status": "Exit 0", "Ports": [], "Labels": {}, "SizeRw": 12288, "SizeRootFs": 0, "HostConfig": { "NetworkMode": "default" }, "NetworkSettings": { "Networks": { "bridge": { "NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", "EndpointID": "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.5", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:11:00:05" } } }, "Mounts": [] } ] } } } }, "parameters": [ { "name": "all", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "size", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "filters", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/create": { "post": { "tags": [ "Container" ], "operationId": "postContainerscreate", "description": "The parameters and request body are for method: postContainerscreate. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "Id": { "type": "string" }, "Warnings": { "type": "object" } } }, "example": { "Id": "e90e34656806", "Warnings": [] } } } } }, "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "indeterminate body object", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "/containers/{id}/json": { "get": { "tags": [ "Container" ], "operationId": "getContainersidjson", "description": "The parameters and request body are for method: getContainersidjson. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "AppArmorProfile": { "type": "string" }, "Args": { "type": "array", "items": { "type": "string" } }, "Config": { "type": "object", "properties": { "AttachStderr": { "type": "boolean" }, "AttachStdin": { "type": "boolean" }, "AttachStdout": { "type": "boolean" }, "Cmd": { "type": "array", "items": { "type": "string" } }, "Domainname": { "type": "string" }, "Env": { "type": "array", "items": { "type": "string" } }, "Hostname": { "type": "string" }, "Image": { "type": "string" }, "Labels": { "type": "object", "properties": { "com.example.vendor": { "type": "string" }, "com.example.license": { "type": "string" }, "com.example.version": { "type": "string" } } }, "MacAddress": { "type": "string" }, "NetworkDisabled": { "type": "boolean" }, "OpenStdin": { "type": "boolean" }, "StdinOnce": { "type": "boolean" }, "Tty": { "type": "boolean" }, "User": { "type": "string" }, "Volumes": { "type": "object", "properties": { "/volumes/data": { "type": "object" } } }, "WorkingDir": { "type": "string" }, "StopSignal": { "type": "string" }, "StopTimeout": { "type": "number" } } }, "Created": { "type": "string" }, "Driver": { "type": "string" }, "HostConfig": { "type": "object", "properties": { "MaximumIOps": { "type": "number" }, "MaximumIOBps": { "type": "number" }, "BlkioWeight": { "type": "number" }, "BlkioWeightDevice": { "type": "array", "items": { "type": "object" } }, "BlkioDeviceReadBps": { "type": "array", "items": { "type": "object" } }, "BlkioDeviceWriteBps": { "type": "array", "items": { "type": "object" } }, "BlkioDeviceReadIOps": { "type": "array", "items": { "type": "object" } }, "BlkioDeviceWriteIOps": { "type": "array", "items": { "type": "object" } }, "ContainerIDFile": { "type": "string" }, "CpusetCpus": { "type": "string" }, "CpusetMems": { "type": "string" }, "CpuPercent": { "type": "number" }, "CpuShares": { "type": "number" }, "CpuPeriod": { "type": "number" }, "CpuRealtimePeriod": { "type": "number" }, "CpuRealtimeRuntime": { "type": "number" }, "Devices": { "type": "object" }, "IpcMode": { "type": "string" }, "LxcConf": { "type": "object" }, "Memory": { "type": "number" }, "MemorySwap": { "type": "number" }, "MemoryReservation": { "type": "number" }, "KernelMemory": { "type": "number" }, "OomKillDisable": { "type": "boolean" }, "OomScoreAdj": { "type": "number" }, "NetworkMode": { "type": "string" }, "PidMode": { "type": "string" }, "PortBindings": { "type": "object" }, "Privileged": { "type": "boolean" }, "ReadonlyRootfs": { "type": "boolean" }, "PublishAllPorts": { "type": "boolean" }, "RestartPolicy": { "type": "object", "properties": { "MaximumRetryCount": { "type": "number" }, "Name": { "type": "string" } } }, "LogConfig": { "type": "object", "properties": { "Type": { "type": "string" } } }, "Sysctls": { "type": "object", "properties": { "net.ipv4.ip_forward": { "type": "string" } } }, "Ulimits": { "type": "array", "items": { "type": "object" } }, "VolumeDriver": { "type": "string" }, "ShmSize": { "type": "number" } } }, "HostnamePath": { "type": "string" }, "HostsPath": { "type": "string" }, "LogPath": { "type": "string" }, "Id": { "type": "string" }, "Image": { "type": "string" }, "MountLabel": { "type": "string" }, "Name": { "type": "string" }, "NetworkSettings": { "type": "object", "properties": { "Bridge": { "type": "string" }, "SandboxID": { "type": "string" }, "HairpinMode": { "type": "boolean" }, "LinkLocalIPv6Address": { "type": "string" }, "LinkLocalIPv6PrefixLen": { "type": "number" }, "SandboxKey": { "type": "string" }, "SecondaryIPAddresses": { "type": "object" }, "SecondaryIPv6Addresses": { "type": "object" }, "EndpointID": { "type": "string" }, "Gateway": { "type": "string" }, "GlobalIPv6Address": { "type": "string" }, "GlobalIPv6PrefixLen": { "type": "number" }, "IPAddress": { "type": "string" }, "IPPrefixLen": { "type": "number" }, "IPv6Gateway": { "type": "string" }, "MacAddress": { "type": "string" }, "Networks": { "type": "object", "properties": { "bridge": { "type": "object", "properties": { "NetworkID": { "type": "string" }, "EndpointID": { "type": "string" }, "Gateway": { "type": "string" }, "IPAddress": { "type": "string" }, "IPPrefixLen": { "type": "number" }, "IPv6Gateway": { "type": "string" }, "GlobalIPv6Address": { "type": "string" }, "GlobalIPv6PrefixLen": { "type": "number" }, "MacAddress": { "type": "string" } } } } } } }, "Path": { "type": "string" }, "ProcessLabel": { "type": "string" }, "ResolvConfPath": { "type": "string" }, "RestartCount": { "type": "number" }, "State": { "type": "object", "properties": { "Error": { "type": "string" }, "ExitCode": { "type": "number" }, "FinishedAt": { "type": "string" }, "OOMKilled": { "type": "boolean" }, "Dead": { "type": "boolean" }, "Paused": { "type": "boolean" }, "Pid": { "type": "number" }, "Restarting": { "type": "boolean" }, "Running": { "type": "boolean" }, "StartedAt": { "type": "string" }, "Status": { "type": "string" } } }, "Mounts": { "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string" }, "Source": { "type": "string" }, "Destination": { "type": "string" }, "Driver": { "type": "string" }, "Mode": { "type": "string" }, "RW": { "type": "boolean" }, "Propagation": { "type": "string" } } } } } }, "example": { "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" ], "Hostname": "ba033ac44011", "Image": "ubuntu", "Labels": { "com.example.vendor": "Acme", "com.example.license": "GPL", "com.example.version": "1.0" }, "MacAddress": "", "NetworkDisabled": false, "OpenStdin": false, "StdinOnce": false, "Tty": false, "User": "", "Volumes": { "/volumes/data": {} }, "WorkingDir": "", "StopSignal": "SIGTERM", "StopTimeout": 10 }, "Created": "2015-01-06T15:47:31.485331387Z", "Driver": "devicemapper", "HostConfig": { "MaximumIOps": 0, "MaximumIOBps": 0, "BlkioWeight": 0, "BlkioWeightDevice": [ {} ], "BlkioDeviceReadBps": [ {} ], "BlkioDeviceWriteBps": [ {} ], "BlkioDeviceReadIOps": [ {} ], "BlkioDeviceWriteIOps": [ {} ], "ContainerIDFile": "", "CpusetCpus": "", "CpusetMems": "", "CpuPercent": 80, "CpuShares": 0, "CpuPeriod": 100000, "CpuRealtimePeriod": 1000000, "CpuRealtimeRuntime": 10000, "Devices": [], "IpcMode": "", "LxcConf": [], "Memory": 0, "MemorySwap": 0, "MemoryReservation": 0, "KernelMemory": 0, "OomKillDisable": false, "OomScoreAdj": 500, "NetworkMode": "bridge", "PidMode": "", "PortBindings": {}, "Privileged": false, "ReadonlyRootfs": false, "PublishAllPorts": false, "RestartPolicy": { "MaximumRetryCount": 2, "Name": "on-failure" }, "LogConfig": { "Type": "json-file" }, "Sysctls": { "net.ipv4.ip_forward": "1" }, "Ulimits": [ {} ], "VolumeDriver": "", "ShmSize": 67108864 }, "HostnamePath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname", "HostsPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts", "LogPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log", "Id": "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39", "Image": "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2", "MountLabel": "", "Name": "/boring_euclid", "NetworkSettings": { "Bridge": "", "SandboxID": "", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "SandboxKey": "", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "bridge": { "NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", "EndpointID": "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d", "Gateway": "172.17.0.1", "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "02:42:ac:12:00:02" } } }, "Path": "/bin/sh", "ProcessLabel": "", "ResolvConfPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf", "RestartCount": 1, "State": { "Error": "", "ExitCode": 9, "FinishedAt": "2015-01-06T15:47:32.080254511Z", "OOMKilled": false, "Dead": false, "Paused": false, "Pid": 0, "Restarting": false, "Running": true, "StartedAt": "2015-01-06T15:47:32.072697474Z", "Status": "running" }, "Mounts": [ { "Name": "fac362...80535", "Source": "/data", "Destination": "/data", "Driver": "local", "Mode": "ro,Z", "RW": false, "Propagation": "" } ] } } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "title": "id", "type": "string" } }, { "name": "size", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/{id}/top": { "get": { "tags": [ "Container" ], "operationId": "getContainersidtop", "description": "The parameters and request body are for method: getContainersidtop. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "Titles": { "type": "array", "items": { "type": "string" } }, "Processes": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } } }, "example": { "Titles": [ "UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD" ], "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" ] ] } } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "title": "id", "type": "string" } }, { "name": "psArgs", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/{id}/logs": { "get": { "tags": [ "Container" ], "operationId": "getContainersidlogs", "description": "The parameters and request body are for method: getContainersidlogs. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "title": "result", "type": "object" } } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "title": "id", "type": "string" } }, { "name": "follow", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "stdout", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "stderr", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "since", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "timestamps", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "tail", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/{id}/changes": { "get": { "tags": [ "Container" ], "operationId": "getContainersidchanges", "description": "The parameters and request body are for method: getContainersidchanges. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "Path": { "type": "string" }, "Kind": { "type": "number" } } } }, "example": [ { "Path": "/dev", "Kind": 0 }, { "Path": "/dev/kmsg", "Kind": 1 }, { "Path": "/test", "Kind": 1 } ] } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "title": "id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/{id}/export": { "get": { "tags": [ "Container" ], "operationId": "getContainersidexport", "description": "The parameters and request body are for method: getContainersidexport. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "title": "result", "type": "object" } } } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "title": "id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" }, "example": {} } } } } }, "/containers/{id}/stats": { "get": { "tags": [ "Container" ], "operationId": "getContainersidstats", "description": "The parameters and request body are for method: getContainersidstats. Same endpoint also used in methods:", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "type": "object", "properties": { "read": { "type": "string" }, "pids_stats": { "type": "object", "properties": { "current": { "type": "number" } } }, "networks": { "type": "object", "properties": { "eth0": { "type": "object", "properties": { "rx_bytes": { "type": "number" }, "rx_dropped": { "type": "number" }, "rx_errors": { "type": "number" }, "rx_packets": { "type": "number" }, "tx_bytes": { "type": "number" }, "tx_dropped": { "type": "number" }, "tx_errors": { "type": "number" }, "tx_packets": { "type": "number" } } }, "eth5": { "type": "object",