From 8699805756d25602e2412173aac7364fbe9627c7 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 28 May 2013 15:49:57 +0000 Subject: [PATCH] documentation --- docs/sources/api/docker_remote_api.rst | 57 ++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/docs/sources/api/docker_remote_api.rst b/docs/sources/api/docker_remote_api.rst index 4c8ebe847f..3920aba983 100644 --- a/docs/sources/api/docker_remote_api.rst +++ b/docs/sources/api/docker_remote_api.rst @@ -15,10 +15,17 @@ Docker Remote API - Default port in the docker deamon is 4243 - The API tends to be REST, but for some complex commands, like attach or pull, the HTTP connection is hijacked to transport stdout stdin and stderr -2. Endpoints +2. Version +========== + +The current verson of the API is 1.1 +Calling /images//insert is the same as calling /v1.1/images//insert +You can still call an old version of the api using /v1.0/images//insert + +3. Endpoints ============ -2.1 Containers +3.1 Containers -------------- List containers @@ -459,7 +466,7 @@ Remove a container :statuscode 500: server error -2.2 Images +3.2 Images ---------- List Images @@ -548,7 +555,19 @@ Create an image POST /images/create?fromImage=base HTTP/1.1 - **Example response**: + **Example response v1.1**: + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + {"status":"Pulling..."} + {"progress":"1/? (n/a)"} + {"error":"Invalid..."} + ... + + **Example response v1.0**: .. sourcecode:: http @@ -579,7 +598,19 @@ Insert a file in a image POST /images/test/insert?path=/usr&url=myurl HTTP/1.1 - **Example response**: + **Example response v1.1**: + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + {"status":"Inserting..."} + {"progress":"1/? (n/a)"} + {"error":"Invalid..."} + ... + + **Example response v1.0**: .. sourcecode:: http @@ -694,7 +725,19 @@ Push an image on the registry POST /images/test/push HTTP/1.1 - **Example response**: + **Example response v1.1**: + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + {"status":"Pushing..."} + {"progress":"1/? (n/a)"} + {"error":"Invalid..."} + ... + + **Example response v1.0**: .. sourcecode:: http @@ -800,7 +843,7 @@ Search images :statuscode 500: server error -2.3 Misc +3.3 Misc -------- Build an image from Dockerfile via stdin