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:
commit
25a8602cba
3 changed files with 24 additions and 6 deletions
|
@ -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
|
||||
is automated.
|
||||
|
||||
*Note* - Search queries will only return up to 25 results
|
||||
|
||||
# OPTIONS
|
||||
**--automated**=*true*|*false*
|
||||
Only show automated builds. The default is *false*.
|
||||
|
|
|
@ -514,28 +514,41 @@ Search the Index given a search term. It accepts
|
|||
|
||||
**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
|
||||
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**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Vary: Accept
|
||||
Content-Type: application/json
|
||||
|
||||
{"query":"search_term",
|
||||
{"num_pages": 1,
|
||||
"num_results": 3,
|
||||
"results" : [
|
||||
{"name": "ubuntu", "description": "An ubuntu image..."},
|
||||
{"name": "centos", "description": "A centos image..."},
|
||||
{"name": "fedora", "description": "A fedora image..."}
|
||||
]
|
||||
],
|
||||
"page_size": 25,
|
||||
"query":"search_term",
|
||||
"page": 1
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
|
||||
- **q** – what you want to search for
|
||||
Response Items:
|
||||
- **num_pages** - Total number of pages returned by query
|
||||
- **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:
|
||||
|
||||
|
|
|
@ -1969,6 +1969,9 @@ See [*Find Public Images on Docker Hub*](
|
|||
/userguide/dockerrepos/#searching-for-images) for
|
||||
more details on finding shared images from the command line.
|
||||
|
||||
> **Note:**
|
||||
> Search queries will only return up to 25 results
|
||||
|
||||
## start
|
||||
|
||||
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
|
Loading…
Reference in a new issue