Skip to content

Commit

Permalink
Merge pull request moby#9840 from nhsiehgit/searchapidocs
Browse files Browse the repository at this point in the history
updated search api docs to include pagination changes
  • Loading branch information
jamtur01 committed Jan 15, 2015
2 parents 3837c08 + c252d5f commit 25a8602
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/man/docker-search.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Expand Down
25 changes: 19 additions & 6 deletions docs/sources/reference/api/registry_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 3 additions & 0 deletions docs/sources/reference/commandline/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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...]
Expand Down

0 comments on commit 25a8602

Please sign in to comment.