GitHub PullRequestReviewCommentEvent at 2014-04-10 02:43:33
Repository: docker
Actor: ostezer
Payload: {"comment":{"url":"https://api.github.com/repos/dotcloud/docker/pulls/comments/11468005","id":11468005,"diff_hunk":"@@ -0,0 +1,1286 @@\n+:title: Remote API v1.11\n+:description: API Documentation for Docker\n+:keywords: API, Docker, rcli, REST, documentation\n+\n+:orphan:\n+\n+=======================\n+Docker Remote API v1.11\n+=======================\n+\n+.. contents:: Table of Contents\n+\n+1. Brief introduction\n+=====================\n+\n+- The Remote API has replaced rcli\n+- The daemon listens on ``unix:///var/run/docker.sock``, but you can\n+  :ref:`bind_docker`.\n+- The API tends to be REST, but for some complex commands, like\n+  ``attach`` or ``pull``, the HTTP connection is hijacked to transport\n+  ``stdout, stdin`` and ``stderr``\n+\n+2. Endpoints\n+============\n+\n+2.1 Containers\n+--------------\n+\n+List containers\n+***************\n+\n+.. http:get:: /containers/json\n+\n+        List containers\n+\n+        **Example request**:\n+\n+        .. sourcecode:: http\n+\n+           GET /containers/json?all=1&before=8dfafdbc3a40&size=1 HTTP/1.1\n+\n+        **Example response**:\n+\n+        .. sourcecode:: http\n+\n+           HTTP/1.1 200 OK\n+           Content-Type: application/json\n+\n+           [\n+                {\n+                        \"Id\": \"8dfafdbc3a40\",\n+                        \"Image\": \"base:latest\",\n+                        \"Command\": \"echo 1\",\n+                        \"Created\": 1367854155,\n+                        \"Status\": \"Exit 0\",\n+                        \"Ports\":[{\"PrivatePort\": 2222, \"PublicPort\": 3333, \"Type\": \"tcp\"}],\n+                        \"SizeRw\":12288,\n+                        \"SizeRootFs\":0\n+                },\n+                {\n+                        \"Id\": \"9cd87474be90\",\n+                        \"Image\": \"base:latest\",\n+                        \"Command\": \"echo 222222\",\n+                        \"Created\": 1367854155,\n+                        \"Status\": \"Exit 0\",\n+                        \"Ports\":[],\n+                        \"SizeRw\":12288,\n+                        \"SizeRootFs\":0\n+                },\n+                {\n+                        \"Id\": \"3176a2479c92\",\n+                        \"Image\": \"base:latest\",\n+                        \"Command\": \"echo 3333333333333333\",\n+                        \"Created\": 1367854154,\n+                        \"Status\": \"Exit 0\",\n+                        \"Ports\":[],\n+                        \"SizeRw\":12288,\n+                        \"SizeRootFs\":0\n+                },\n+                {\n+                        \"Id\": \"4cb07b47f9fb\",\n+                        \"Image\": \"base:latest\",\n+                        \"Command\": \"echo 444444444444444444444444444444444\",\n+                        \"Created\": 1367854152,\n+                        \"Status\": \"Exit 0\",\n+                        \"Ports\":[],\n+                        \"SizeRw\":12288,\n+                        \"SizeRootFs\":0\n+                }\n+           ]\n+\n+        :query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default\n+        :query limit: Show ``limit`` last created containers, include non-running ones.\n+        :query since: Show only containers created since Id, include non-running ones.\n+        :query before: Show only containers created before Id, include non-running ones.\n+        :query size: 1/True/true or 0/False/false, Show the containers sizes\n+        :statuscode 200: no error\n+        :statuscode 400: bad parameter\n+        :statuscode 500: server error\n+\n+\n+Create a container\n+******************\n+\n+.. http:post:: /containers/create\n+\n+        Create a container\n+\n+        **Example request**:\n+\n+        .. sourcecode:: http\n+\n+           POST /containers/create HTTP/1.1\n+           Content-Type: application/json\n+\n+           {\n+                \"Hostname\":\"\",\n+                \"User\":\"\",\n+                \"Memory\":0,\n+                \"MemorySwap\":0,\n+                \"AttachStdin\":false,\n+                \"AttachStdout\":true,\n+                \"AttachStderr\":true,\n+                \"PortSpecs\":null,\n+                \"Tty\":false,\n+                \"OpenStdin\":false,\n+                \"StdinOnce\":false,\n+                \"Env\":null,\n+                \"Cmd\":[\n+                        \"date\"\n+                ],\n+                \"Dns\":null,\n+                \"Image\":\"base\",\n+                \"Volumes\":{\n+                        \"/tmp\": {}\n+                },\n+                \"VolumesFrom\":\"\",\n+                \"WorkingDir\":\"\",\n+                \"DisableNetwork\": false,\n+                \"ExposedPorts\":{\n+                        \"22/tcp\": {}\n+                }\n+           }\n+\n+        **Example response**:\n+\n+        .. sourcecode:: http\n+\n+           HTTP/1.1 201 OK\n+           Content-Type: application/json\n+\n+           {\n+                \"Id\":\"e90e34656806\"\n+                \"Warnings\":[]\n+           }\n+\n+        :jsonparam config: the container's configuration\n+        :query name: Assign the specified name to the container. Must match ``/?[a-zA-Z0-9_-]+``.\n+        :statuscode 201: no error\n+        :statuscode 404: no such container\n+        :statuscode 406: impossible to attach (container not running)\n+        :statuscode 500: server error\n+\n+\n+Inspect a container\n+*******************\n+\n+.. http:get:: /containers/(id)/json\n+\n+        Return low-level information on the container ``id``\n+\n+        **Example request**:\n+\n+        .. sourcecode:: http\n+\n+           GET /containers/4fa6e0f0c678/json HTTP/1.1\n+\n+        **Example response**:\n+\n+        .. sourcecode:: http\n+\n+           HTTP/1.1 200 OK\n+           Content-Type: application/json\n+\n+           {\n+                        \"Id\": \"4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2\",\n+                        \"Created\": \"2013-05-07T14:51:42.041847+02:00\",\n+                        \"Path\": \"date\",\n+                        \"Args\": [],\n+                        \"Config\": {\n+                                \"Hostname\": \"4fa6e0f0c678\",\n+                                \"User\": \"\",\n+                                \"Memory\": 0,\n+                                \"MemorySwap\": 0,\n+                                \"AttachStdin\": false,\n+                                \"AttachStdout\": true,\n+                                \"AttachStderr\": true,\n+                                \"PortSpecs\": null,\n+                                \"Tty\": false,\n+                                \"OpenStdin\": false,\n+                                \"StdinOnce\": false,\n+                                \"Env\": null,\n+                                \"Cmd\": [\n+                                        \"date\"\n+                                ],\n+                                \"Dns\": null,\n+                                \"Image\": \"base\",\n+                                \"Volumes\": {},\n+                                \"VolumesFrom\": \"\",\n+                                \"WorkingDir\":\"\"\n+\n+                        },\n+                        \"State\": {\n+                                \"Running\": false,\n+                                \"Pid\": 0,\n+                                \"ExitCode\": 0,\n+                                \"StartedAt\": \"2013-05-07T14:51:42.087658+02:01360\",\n+                                \"Ghost\": false\n+                        },\n+                        \"Image\": \"b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc\",\n+                        \"NetworkSettings\": {\n+                                \"IpAddress\": \"\",\n+                                \"IpPrefixLen\": 0,\n+                                \"Gateway\": \"\",\n+                                \"Bridge\": \"\",\n+                                \"PortMapping\": null\n+                        },\n+                        \"SysInitPath\": \"/home/kitty/go/src/github.com/dotcloud/docker/bin/docker\",\n+                        \"ResolvConfPath\": \"/etc/resolv.conf\",\n+                        \"Volumes\": {},\n+                        \"HostConfig\": {\n+                            \"Binds\": null,\n+                            \"ContainerIDFile\": \"\",\n+                            \"LxcConf\": [],\n+                            \"Privileged\": false,\n+                            \"PortBindings\": {\n+                               \"80/tcp\": [\n+                                   {\n+                                       \"HostIp\": \"0.0.0.0\",\n+                                       \"HostPort\": \"49153\"\n+                                   }\n+                               ]\n+                            },\n+                            \"Links\": null,\n+                            \"PublishAllPorts\": false\n+                        }\n+           }\n+\n+        :statuscode 200: no error\n+        :statuscode 404: no such container\n+        :statuscode 500: server error\n+\n+\n+List processes running inside a container\n+*****************************************\n+\n+.. http:get:: /containers/(id)/top\n+\n+        List processes running inside the container ``id``\n+\n+        **Example request**:\n+\n+        .. sourcecode:: http\n+\n+           GET /containers/4fa6e0f0c678/top HTTP/1.1\n+\n+        **Example response**:\n+\n+        .. sourcecode:: http\n+\n+           HTTP/1.1 200 OK\n+           Content-Type: application/json\n+\n+           {\n+                \"Titles\":[\n+                        \"USER\",\n+                        \"PID\",\n+                        \"%CPU\",\n+                        \"%MEM\",\n+                        \"VSZ\",\n+                        \"RSS\",\n+                        \"TTY\",\n+                        \"STAT\",\n+                        \"START\",\n+                        \"TIME\",\n+                        \"COMMAND\"\n+                        ],\n+                \"Processes\":[\n+                        [\"root\",\"20147\",\"0.0\",\"0.1\",\"18060\",\"1864\",\"pts/4\",\"S\",\"10:06\",\"0:00\",\"bash\"],\n+                        [\"root\",\"20271\",\"0.0\",\"0.0\",\"4312\",\"352\",\"pts/4\",\"S+\",\"10:07\",\"0:00\",\"sleep\",\"10\"]\n+                ]\n+           }\n+\n+        :query ps_args: ps arguments to use (eg. aux)\n+        :statuscode 200: no error\n+        :statuscode 404: no such container\n+        :statuscode 500: server error\n+\n+\n+Inspect changes on a container's filesystem\n+*******************************************\n+\n+.. http:get:: /containers/(id)/changes\n+\n+        Inspect changes on container ``id`` 's filesystem","path":"docs/sources/reference/api/docker_remote_api_v1.11.rst","position":305,"original_position":305,"commit_id":"37cd3e74aaf820df49c1b4e908a843a0c79381b1","original_commit_id":"37cd3e74aaf820df49c1b4e908a843a0c79381b1","user":{"login":"ostezer","id":6561122,"avatar_url":"https://avatars.githubusercontent.com/u/6561122?","gravatar_id":"26dc2b32b9e753823aef55e89687a9fc","url":"https://api.github.com/users/ostezer","html_url":"https://github.com/ostezer","followers_url":"https://api.github.com/users/ostezer/followers","following_url":"https://api.github.com/users/ostezer/following{/other_user}","gists_url":"https://api.github.com/users/ostezer/gists{/gist_id}","starred_url":"https://api.github.com/users/ostezer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostezer/subscriptions","organizations_url":"https://api.github.com/users/ostezer/orgs","repos_url":"https://api.github.com/users/ostezer/repos","events_url":"https://api.github.com/users/ostezer/events{/privacy}","received_events_url":"https://api.github.com/users/ostezer/received_events","type":"User","site_admin":false},"body":"Inspecting the filesystem changes of container: ``id``","created_at":"2014-04-10T02:43:33Z","updated_at":"2014-04-10T02:43:33Z","html_url":"https://github.com/dotcloud/docker/pull/4821#discussion_r11468005","pull_request_url":"https://api.github.com/repos/dotcloud/docker/pulls/4821","_links":{"self":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/comments/11468005"},"html":{"href":"https://github.com/dotcloud/docker/pull/4821#discussion_r11468005"},"pull_request":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/4821"}}}}