Merge pull request #2443 from tlunter/fix_remote_api_doc

Container commit doesn't use a query parameter, uses POST body
This commit is contained in:
Andy Rothfusz 2013-10-29 14:04:22 -07:00
commit baf23d3c3e
7 changed files with 133 additions and 98 deletions

View File

@ -970,28 +970,33 @@ Create a new image from a container's changes
**Example request**: **Example request**:
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
**Example response**: {
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
.. sourcecode:: http **Example response**:
HTTP/1.1 201 OK .. sourcecode:: http
Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream
:query container: source container {"Id":"596069db4bf5"}
:query repo: repository
:query tag: tag :query container: source container
:query m: commit message :query repo: repository
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query tag: tag
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]}) :query m: commit message
:statuscode 201: no error :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:statuscode 404: no such container :statuscode 201: no error
:statuscode 500: server error :statuscode 404: no such container
:statuscode 500: server error
3. Going further 3. Going further

View File

@ -977,32 +977,37 @@ Create a new image from a container's changes
.. http:post:: /commit .. http:post:: /commit
Create a new image from a container's changes Create a new image from a container's changes
**Example request**: **Example request**:
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
**Example response**: {
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
.. sourcecode:: http **Example response**:
HTTP/1.1 201 OK .. sourcecode:: http
Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream
:query container: source container {"Id":"596069db4bf5"}
:query repo: repository
:query tag: tag :query container: source container
:query m: commit message :query repo: repository
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query tag: tag
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]}) :query m: commit message
:statuscode 201: no error :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:statuscode 404: no such container :statuscode 201: no error
:statuscode 500: server error :statuscode 404: no such container
:statuscode 500: server error
3. Going further 3. Going further

View File

@ -985,32 +985,37 @@ Create a new image from a container's changes
.. http:post:: /commit .. http:post:: /commit
Create a new image from a container's changes Create a new image from a container's changes
**Example request**: **Example request**:
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
**Example response**: {
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
.. sourcecode:: http **Example response**:
HTTP/1.1 201 OK .. sourcecode:: http
HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} {"Id":"596069db4bf5"}
:query container: source container :query container: source container
:query repo: repository :query repo: repository
:query tag: tag :query tag: tag
:query m: commit message :query m: commit message
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]}) :statuscode 201: no error
:statuscode 201: no error :statuscode 404: no such container
:statuscode 404: no such container :statuscode 500: server error
:statuscode 500: server error
3. Going further 3. Going further

View File

@ -1034,32 +1034,37 @@ Create a new image from a container's changes
.. http:post:: /commit .. http:post:: /commit
Create a new image from a container's changes Create a new image from a container's changes
**Example request**: **Example request**:
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
**Example response**: {
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
.. sourcecode:: http **Example response**:
HTTP/1.1 201 OK .. sourcecode:: http
HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} {"Id":"596069db4bf5"}
:query container: source container :query container: source container
:query repo: repository :query repo: repository
:query tag: tag :query tag: tag
:query m: commit message :query m: commit message
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]}) :statuscode 201: no error
:statuscode 201: no error :statuscode 404: no such container
:statuscode 404: no such container :statuscode 500: server error
:statuscode 500: server error
Monitor Docker's events Monitor Docker's events

View File

@ -1084,23 +1084,28 @@ Create a new image from a container's changes
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
{
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
**Example response**: **Example response**:
.. sourcecode:: http .. sourcecode:: http
HTTP/1.1 201 OK HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} {"Id":"596069db4bf5"}
:query container: source container :query container: source container
:query repo: repository :query repo: repository
:query tag: tag :query tag: tag
:query m: commit message :query m: commit message
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
:statuscode 201: no error :statuscode 201: no error
:statuscode 404: no such container :statuscode 404: no such container
:statuscode 500: server error :statuscode 500: server error

View File

@ -1050,32 +1050,37 @@ Create a new image from a container's changes
.. http:post:: /commit .. http:post:: /commit
Create a new image from a container's changes Create a new image from a container's changes
**Example request**: **Example request**:
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
**Example response**: {
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
.. sourcecode:: http **Example response**:
HTTP/1.1 201 OK .. sourcecode:: http
Content-Type: application/vnd.docker.raw-stream
{"Id":"596069db4bf5"} HTTP/1.1 201 OK
Content-Type: application/vnd.docker.raw-stream
:query container: source container {"Id":"596069db4bf5"}
:query repo: repository
:query tag: tag :query container: source container
:query m: commit message :query repo: repository
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query tag: tag
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]}) :query m: commit message
:statuscode 201: no error :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:statuscode 404: no such container :statuscode 201: no error
:statuscode 500: server error :statuscode 404: no such container
:statuscode 500: server error
Monitor Docker's events Monitor Docker's events
*********************** ***********************

View File

@ -1136,7 +1136,13 @@ Create a new image from a container's changes
.. sourcecode:: http .. sourcecode:: http
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
Content-Type: application/json
{
"Cmd": ["cat", "/world"],
"PortSpecs":["22"]
}
**Example response**: **Example response**:
@ -1152,7 +1158,6 @@ Create a new image from a container's changes
:query tag: tag :query tag: tag
:query m: commit message :query m: commit message
:query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
:query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
:statuscode 201: no error :statuscode 201: no error
:statuscode 404: no such container :statuscode 404: no such container
:statuscode 500: server error :statuscode 500: server error