2013-05-09 17:05:20 -07:00
|
|
|
:title: Docker Index documentation
|
|
|
|
:description: Documentation for docker Index
|
|
|
|
:keywords: docker, index, api
|
|
|
|
|
|
|
|
|
2013-05-02 14:32:38 -04:00
|
|
|
=======================
|
|
|
|
Docker Index Search API
|
|
|
|
=======================
|
|
|
|
|
|
|
|
Search
|
|
|
|
------
|
|
|
|
|
2013-05-06 13:38:51 -04:00
|
|
|
.. http:get:: /v1/search
|
2013-05-02 14:32:38 -04:00
|
|
|
|
2013-05-06 13:38:51 -04:00
|
|
|
Search the Index given a search term. It accepts :http:method:`get` only.
|
2013-05-02 14:32:38 -04:00
|
|
|
|
2013-05-06 13:38:51 -04:00
|
|
|
**Example request**:
|
2013-05-02 14:32:38 -04:00
|
|
|
|
2013-05-06 13:38:51 -04:00
|
|
|
.. sourcecode:: http
|
|
|
|
|
|
|
|
GET /v1/search?q=search_term HTTP/1.1
|
|
|
|
Host: example.com
|
|
|
|
Accept: application/json
|
|
|
|
|
|
|
|
**Example response**:
|
|
|
|
|
|
|
|
.. sourcecode:: http
|
|
|
|
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Vary: Accept
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
|
|
{"query":"search_term",
|
|
|
|
"num_results": 2,
|
|
|
|
"results" : [
|
|
|
|
{"name": "dotcloud/base", "description": "A base ubuntu64 image..."},
|
|
|
|
{"name": "base2", "description": "A base ubuntu64 image..."},
|
|
|
|
]
|
|
|
|
}
|
2013-05-09 17:05:20 -07:00
|
|
|
|
2013-05-06 13:38:51 -04:00
|
|
|
:query q: what you want to search for
|
|
|
|
:statuscode 200: no error
|
|
|
|
:statuscode 500: server error
|