diff --git a/docs/sources/api/index_api.rst b/docs/sources/api/index_api.rst index c4b961aff2..f89a3f075d 100644 --- a/docs/sources/api/index_api.rst +++ b/docs/sources/api/index_api.rst @@ -42,7 +42,7 @@ User Repo Authorization: Basic akmklmasadalkm== X-Docker-Token: true - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}] :parameter namespace: the namespace for the repo :parameter repo_name: the name for the repo @@ -54,7 +54,8 @@ User Repo HTTP/1.1 200 Vary: Accept Content-Type: application/json - WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=write + WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=write + X-Docker-Token: signature=123abc,repository="foo/bar",access=write X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io] "" @@ -92,7 +93,8 @@ User Repo HTTP/1.1 202 Vary: Accept Content-Type: application/json - WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=delete + WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=delete + X-Docker-Token: signature=123abc,repository="foo/bar",access=delete X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io] "" @@ -124,7 +126,7 @@ Library Repo Authorization: Basic akmklmasadalkm== X-Docker-Token: true - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}] :parameter repo_name: the library name for the repo @@ -135,7 +137,8 @@ Library Repo HTTP/1.1 200 Vary: Accept Content-Type: application/json - WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=write + WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=write + X-Docker-Token: signature=123abc,repository="foo/bar",access=write X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io] "" @@ -174,7 +177,8 @@ Library Repo HTTP/1.1 202 Vary: Accept Content-Type: application/json - WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=delete + WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=delete + X-Docker-Token: signature=123abc,repository="foo/bar",access=delete X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io] "" @@ -205,8 +209,8 @@ User Repo Images Content-Type: application/json Authorization: Basic akmklmasadalkm== - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, - “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f", + "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}] :parameter namespace: the namespace for the repo :parameter repo_name: the name for the repo @@ -250,10 +254,10 @@ User Repo Images Vary: Accept Content-Type: application/json - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, - “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}, - {“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”, - “checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f", + "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}, + {"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds", + "checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}] :statuscode 200: OK :statuscode 404: Not found @@ -275,8 +279,8 @@ Library Repo Images Content-Type: application/json Authorization: Basic akmklmasadalkm== - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, - “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f", + "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}] :parameter repo_name: the library name for the repo @@ -318,10 +322,10 @@ Library Repo Images Vary: Accept Content-Type: application/json - [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”, - “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}, - {“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”, - “checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}] + [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f", + "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}, + {"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds", + "checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}] :statuscode 200: OK :statuscode 404: Not found diff --git a/docs/sources/api/registry_api.rst b/docs/sources/api/registry_api.rst index 58c8ff3bd4..ad5c9db133 100644 --- a/docs/sources/api/registry_api.rst +++ b/docs/sources/api/registry_api.rst @@ -61,7 +61,7 @@ Layer Host: registry-1.docker.io Accept: application/json Content-Type: application/json - Authorization: Token akmklmasadalkmsdfgsdgdge33 + Authorization: Token signature=123abc,repository="foo/bar",access=read :parameter image_id: the id for the layer you want to get @@ -71,39 +71,10 @@ Layer HTTP/1.1 200 Vary: Accept - Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 Cookie: (Cookie provided by the Registry) - { - id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c", - parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f", - created: "2013-04-30T17:46:10.843673+03:00", - container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7", - container_config: { - Hostname: "host-test", - User: "", - Memory: 0, - MemorySwap: 0, - AttachStdin: false, - AttachStdout: false, - AttachStderr: false, - PortSpecs: null, - Tty: false, - OpenStdin: false, - StdinOnce: false, - Env: null, - Cmd: [ - "/bin/bash", - "-c", - "apt-get -q -yy -f install libevent-dev" - ], - Dns: null, - Image: "imagename/blah", - Volumes: { }, - VolumesFrom: "" - }, - docker_version: "0.1.7" - } + {layer binary data stream} :statuscode 200: OK :statuscode 401: Requires authorization @@ -120,40 +91,10 @@ Layer PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1 Host: registry-1.docker.io - Accept: application/json - Content-Type: application/json - Authorization: Token akmklmasadalkmsdfgsdgdge33 + Transfer-Encoding: chunked + Authorization: Token signature=123abc,repository="foo/bar",access=write - { - id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c", - parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f", - created: "2013-04-30T17:46:10.843673+03:00", - container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7", - container_config: { - Hostname: "host-test", - User: "", - Memory: 0, - MemorySwap: 0, - AttachStdin: false, - AttachStdout: false, - AttachStderr: false, - PortSpecs: null, - Tty: false, - OpenStdin: false, - StdinOnce: false, - Env: null, - Cmd: [ - "/bin/bash", - "-c", - "apt-get -q -yy -f install libevent-dev" - ], - Dns: null, - Image: "imagename/blah", - Volumes: { }, - VolumesFrom: "" - }, - docker_version: "0.1.7" - } + {layer binary data stream} :parameter image_id: the id for the layer you want to get @@ -165,6 +106,7 @@ Layer HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "" @@ -191,13 +133,38 @@ Image Cookie: (Cookie provided by the Registry) { - “id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”, - “checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087” - } + id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c", + parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f", + created: "2013-04-30T17:46:10.843673+03:00", + container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7", + container_config: { + Hostname: "host-test", + User: "", + Memory: 0, + MemorySwap: 0, + AttachStdin: false, + AttachStdout: false, + AttachStderr: false, + PortSpecs: null, + Tty: false, + OpenStdin: false, + StdinOnce: false, + Env: null, + Cmd: [ + "/bin/bash", + "-c", + "apt-get -q -yy -f install libevent-dev" + ], + Dns: null, + Image: "imagename/blah", + Volumes: { }, + VolumesFrom: "" + }, + docker_version: "0.1.7" + } :parameter image_id: the id for the layer you want to get - **Example Response**: .. sourcecode:: http @@ -205,6 +172,7 @@ Image HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "" @@ -234,11 +202,40 @@ Image HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 + X-Docker-Size: 456789 + X-Docker-Checksum: b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087 { - “id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”, - “checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087” - } + id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c", + parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f", + created: "2013-04-30T17:46:10.843673+03:00", + container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7", + container_config: { + Hostname: "host-test", + User: "", + Memory: 0, + MemorySwap: 0, + AttachStdin: false, + AttachStdout: false, + AttachStderr: false, + PortSpecs: null, + Tty: false, + OpenStdin: false, + StdinOnce: false, + Env: null, + Cmd: [ + "/bin/bash", + "-c", + "apt-get -q -yy -f install libevent-dev" + ], + Dns: null, + Image: "imagename/blah", + Volumes: { }, + VolumesFrom: "" + }, + docker_version: "0.1.7" + } :statuscode 200: OK :statuscode 401: Requires authorization @@ -271,6 +268,7 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 ["088b4502f51920fbd9b7c503e87c7a2c05aa3adc3d35e79c031fa126b403200f", "aeee63968d87c7da4a5cf5d2be6bee4e21bc226fd62273d180a49c96c62e4543", @@ -297,6 +295,7 @@ Ancestry Host: registry-1.docker.io Accept: application/json Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 Cookie: (Cookie provided by the Registry) :parameter namespace: namespace for the repo @@ -309,10 +308,11 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 { "latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f", - “0.1.1”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087” + "0.1.1": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087" } :statuscode 200: OK @@ -332,6 +332,7 @@ Ancestry Host: registry-1.docker.io Accept: application/json Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 Cookie: (Cookie provided by the Registry) :parameter namespace: namespace for the repo @@ -345,6 +346,7 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f" @@ -377,6 +379,7 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "" @@ -399,7 +402,7 @@ Ancestry Content-Type: application/json Cookie: (Cookie provided by the Registry) - “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f” + "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f" :parameter namespace: namespace for the repo :parameter repository: name for the repo @@ -412,6 +415,7 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "" @@ -449,6 +453,7 @@ Ancestry HTTP/1.1 200 Vary: Accept Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 "" @@ -456,6 +461,42 @@ Ancestry :statuscode 401: Requires authorization :statuscode 404: Repository not found +2.4 Status +---------- + +.. http:get /v1/_ping + + Check status of the registry. This endpoint is also used to determine if + the registry supports SSL. + + **Example Request**: + + .. sourcecode:: http + + GET /v1/_ping HTTP/1.1 + Host: registry-1.docker.io + Accept: application/json + Content-Type: application/json + + "" + + :parameter namespace: namespace for the repo + :parameter repository: name for the repo + + **Example Response**: + + .. sourcecode:: http + + HTTP/1.1 200 + Vary: Accept + Content-Type: application/json + X-Docker-Registry-Version: 0.6.0 + + "" + + :statuscode 200: OK + + 3.0 Authorization ================= This is where we describe the authorization process, including the tokens and cookies.