Browse code

updated docs with information regarding search pagination

Signed-off-by: Nathan Hsieh <hsieh.nathan@gmail.com>

Nathan Hsieh authored on 2015/01/03 09:21:51
Showing 1 changed files
... ...
@@ -518,26 +518,37 @@ Search the Index given a search term. It accepts
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
539
-- **n** - number of results you want returned per page (default: 25)
540
-- **page** - page number of results
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
541 552
 
542 553
 Status Codes:
543 554