updated search api docs to include pagination changes
| ... | ... |
@@ -19,6 +19,8 @@ of images returned displays the name, description (truncated by default), |
| 19 | 19 |
number of stars awarded, whether the image is official, and whether it |
| 20 | 20 |
is automated. |
| 21 | 21 |
|
| 22 |
+*Note* - Search queries will only return up to 25 results |
|
| 23 |
+ |
|
| 22 | 24 |
# OPTIONS |
| 23 | 25 |
**--automated**=*true*|*false* |
| 24 | 26 |
Only show automated builds. The default is *false*. |
| ... | ... |
@@ -514,28 +514,41 @@ Search the Index given a search term. It accepts |
| 514 | 514 |
|
| 515 | 515 |
**Example request**: |
| 516 | 516 |
|
| 517 |
- GET /v1/search?q=search_term HTTP/1.1 |
|
| 517 |
+ GET /v1/search?q=search_term&page=1&n=25 HTTP/1.1 |
|
| 518 | 518 |
Host: index.docker.io |
| 519 | 519 |
Accept: application/json |
| 520 | 520 |
|
| 521 |
+Query Parameters: |
|
| 522 |
+ |
|
| 523 |
+- **q** – what you want to search for |
|
| 524 |
+- **n** - number of results you want returned per page (default: 25, min:1, max:100) |
|
| 525 |
+- **page** - page number of results |
|
| 526 |
+ |
|
| 521 | 527 |
**Example response**: |
| 522 | 528 |
|
| 523 | 529 |
HTTP/1.1 200 OK |
| 524 | 530 |
Vary: Accept |
| 525 | 531 |
Content-Type: application/json |
| 526 | 532 |
|
| 527 |
- {"query":"search_term",
|
|
| 533 |
+ {"num_pages": 1,
|
|
| 528 | 534 |
"num_results": 3, |
| 529 | 535 |
"results" : [ |
| 530 | 536 |
{"name": "ubuntu", "description": "An ubuntu image..."},
|
| 531 | 537 |
{"name": "centos", "description": "A centos image..."},
|
| 532 | 538 |
{"name": "fedora", "description": "A fedora image..."}
|
| 533 |
- ] |
|
| 539 |
+ ], |
|
| 540 |
+ "page_size": 25, |
|
| 541 |
+ "query":"search_term", |
|
| 542 |
+ "page": 1 |
|
| 534 | 543 |
} |
| 535 | 544 |
|
| 536 |
-Query Parameters: |
|
| 537 |
- |
|
| 538 |
-- **q** – what you want to search for |
|
| 545 |
+Response Items: |
|
| 546 |
+- **num_pages** - Total number of pages returned by query |
|
| 547 |
+- **num_results** - Total number of results returned by query |
|
| 548 |
+- **results** - List of results for the current page |
|
| 549 |
+- **page_size** - How many results returned per page |
|
| 550 |
+- **query** - Your search term |
|
| 551 |
+- **page** - Current page number |
|
| 539 | 552 |
|
| 540 | 553 |
Status Codes: |
| 541 | 554 |
|
| ... | ... |
@@ -1969,6 +1969,9 @@ See [*Find Public Images on Docker Hub*]( |
| 1969 | 1969 |
/userguide/dockerrepos/#searching-for-images) for |
| 1970 | 1970 |
more details on finding shared images from the command line. |
| 1971 | 1971 |
|
| 1972 |
+> **Note:** |
|
| 1973 |
+> Search queries will only return up to 25 results |
|
| 1974 |
+ |
|
| 1972 | 1975 |
## start |
| 1973 | 1976 |
|
| 1974 | 1977 |
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] |