1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #9840 from nhsiehgit/searchapidocs

updated search api docs to include pagination changes
This commit is contained in:
James Turnbull 2015-01-15 17:40:04 -05:00
commit 25a8602cba
3 changed files with 24 additions and 6 deletions

View file

@ -19,6 +19,8 @@ of images returned displays the name, description (truncated by default),
number of stars awarded, whether the image is official, and whether it number of stars awarded, whether the image is official, and whether it
is automated. is automated.
*Note* - Search queries will only return up to 25 results
# OPTIONS # OPTIONS
**--automated**=*true*|*false* **--automated**=*true*|*false*
Only show automated builds. The default is *false*. Only show automated builds. The default is *false*.

View file

@ -514,28 +514,41 @@ Search the Index given a search term. It accepts
**Example request**: **Example request**:
GET /v1/search?q=search_term HTTP/1.1 GET /v1/search?q=search_term&page=1&n=25 HTTP/1.1
Host: index.docker.io Host: index.docker.io
Accept: application/json Accept: application/json
Query Parameters:
- **q** what you want to search for
- **n** - number of results you want returned per page (default: 25, min:1, max:100)
- **page** - page number of results
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Vary: Accept Vary: Accept
Content-Type: application/json Content-Type: application/json
{"query":"search_term", {"num_pages": 1,
"num_results": 3, "num_results": 3,
"results" : [ "results" : [
{"name": "ubuntu", "description": "An ubuntu image..."}, {"name": "ubuntu", "description": "An ubuntu image..."},
{"name": "centos", "description": "A centos image..."}, {"name": "centos", "description": "A centos image..."},
{"name": "fedora", "description": "A fedora image..."} {"name": "fedora", "description": "A fedora image..."}
] ],
"page_size": 25,
"query":"search_term",
"page": 1
} }
Query Parameters: Response Items:
- **num_pages** - Total number of pages returned by query
- **q** what you want to search for - **num_results** - Total number of results returned by query
- **results** - List of results for the current page
- **page_size** - How many results returned per page
- **query** - Your search term
- **page** - Current page number
Status Codes: Status Codes:

View file

@ -1969,6 +1969,9 @@ See [*Find Public Images on Docker Hub*](
/userguide/dockerrepos/#searching-for-images) for /userguide/dockerrepos/#searching-for-images) for
more details on finding shared images from the command line. more details on finding shared images from the command line.
> **Note:**
> Search queries will only return up to 25 results
## start ## start
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]