mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove smart quotes. Add the X-Docker-Token header
Also fix the /layer endpoint, which had incorrect information
This commit is contained in:
parent
792403f2dc
commit
34e28ccc88
2 changed files with 89 additions and 92 deletions
|
@ -42,7 +42,7 @@ User Repo
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
X-Docker-Token: true
|
X-Docker-Token: true
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
|
||||||
|
|
||||||
:parameter namespace: the namespace for the repo
|
:parameter namespace: the namespace for the repo
|
||||||
:parameter repo_name: the name for the repo
|
:parameter repo_name: the name for the repo
|
||||||
|
@ -54,7 +54,8 @@ User Repo
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
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]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -92,7 +93,8 @@ User Repo
|
||||||
HTTP/1.1 202
|
HTTP/1.1 202
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
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=write
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -124,7 +126,7 @@ Library Repo
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
X-Docker-Token: true
|
X-Docker-Token: true
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
|
||||||
|
|
||||||
:parameter repo_name: the library name for the repo
|
:parameter repo_name: the library name for the repo
|
||||||
|
|
||||||
|
@ -135,7 +137,8 @@ Library Repo
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
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]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -174,7 +177,8 @@ Library Repo
|
||||||
HTTP/1.1 202
|
HTTP/1.1 202
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
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=write
|
||||||
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
|
||||||
|
|
||||||
""
|
""
|
||||||
|
@ -205,8 +209,8 @@ User Repo Images
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
|
||||||
|
|
||||||
:parameter namespace: the namespace for the repo
|
:parameter namespace: the namespace for the repo
|
||||||
:parameter repo_name: the name for the repo
|
:parameter repo_name: the name for the repo
|
||||||
|
@ -250,10 +254,10 @@ User Repo Images
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
|
||||||
{“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
|
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
|
||||||
“checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
|
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
:statuscode 404: Not found
|
:statuscode 404: Not found
|
||||||
|
@ -275,8 +279,8 @@ Library Repo Images
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Basic akmklmasadalkm==
|
Authorization: Basic akmklmasadalkm==
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
|
||||||
|
|
||||||
:parameter repo_name: the library name for the repo
|
:parameter repo_name: the library name for the repo
|
||||||
|
|
||||||
|
@ -318,10 +322,10 @@ Library Repo Images
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
[{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
|
[{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
|
"checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
|
||||||
{“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
|
{"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
|
||||||
“checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
|
"checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
:statuscode 404: Not found
|
:statuscode 404: Not found
|
||||||
|
|
|
@ -61,7 +61,7 @@ Layer
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Token akmklmasadalkmsdfgsdgdge33
|
Authorization: Token signature=3200f02,repository="namespace/user",access=write'
|
||||||
|
|
||||||
:parameter image_id: the id for the layer you want to get
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
@ -71,40 +71,10 @@ Layer
|
||||||
|
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
|
||||||
X-Docker-Registry-Version: 0.6.0
|
X-Docker-Registry-Version: 0.6.0
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
{
|
{layer binary data stream}
|
||||||
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 200: OK
|
||||||
:statuscode 401: Requires authorization
|
:statuscode 401: Requires authorization
|
||||||
|
@ -121,40 +91,10 @@ Layer
|
||||||
|
|
||||||
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
|
PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
|
||||||
Host: registry-1.docker.io
|
Host: registry-1.docker.io
|
||||||
Accept: application/json
|
Transfer-Encoding: chunked
|
||||||
Content-Type: application/json
|
Authorization: Token signature=3200f02,repository="namespace/user",access=write'
|
||||||
Authorization: Token akmklmasadalkmsdfgsdgdge33
|
|
||||||
|
|
||||||
{
|
{layer binary data stream}
|
||||||
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
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
@ -193,13 +133,38 @@ Image
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
{
|
{
|
||||||
“id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
|
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
||||||
“checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
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
|
:parameter image_id: the id for the layer you want to get
|
||||||
|
|
||||||
|
|
||||||
**Example Response**:
|
**Example Response**:
|
||||||
|
|
||||||
.. sourcecode:: http
|
.. sourcecode:: http
|
||||||
|
@ -238,11 +203,39 @@ Image
|
||||||
Vary: Accept
|
Vary: Accept
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
X-Docker-Registry-Version: 0.6.0
|
X-Docker-Registry-Version: 0.6.0
|
||||||
|
X-Docker-Size: 456789
|
||||||
|
X-Docker-Checksum: b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087
|
||||||
|
|
||||||
{
|
{
|
||||||
“id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
|
id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
|
||||||
“checksum”: “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
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 200: OK
|
||||||
:statuscode 401: Requires authorization
|
:statuscode 401: Requires authorization
|
||||||
|
@ -319,7 +312,7 @@ Ancestry
|
||||||
|
|
||||||
{
|
{
|
||||||
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
"latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
|
||||||
“0.1.1”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
|
"0.1.1": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"
|
||||||
}
|
}
|
||||||
|
|
||||||
:statuscode 200: OK
|
:statuscode 200: OK
|
||||||
|
@ -409,7 +402,7 @@ Ancestry
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Cookie: (Cookie provided by the Registry)
|
Cookie: (Cookie provided by the Registry)
|
||||||
|
|
||||||
“9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”
|
"9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
|
||||||
|
|
||||||
:parameter namespace: namespace for the repo
|
:parameter namespace: namespace for the repo
|
||||||
:parameter repository: name for the repo
|
:parameter repository: name for the repo
|
||||||
|
|
Loading…
Reference in a new issue