diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-08-06 16:45:17 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-08-06 16:45:17 +0200 |
commit | 8e3dbc0a7dee9fae099ac45023e0222494710494 (patch) | |
tree | 4f7d04d19cf49550a73ea6fdb38f14955759e54a /doc | |
parent | 8fb5b5901c4ccb3c279e84c2128715778497536d (diff) |
doc: Add collections docs.
Change-Id: I8e5c83e135338ba51d15df0585a293611c4270f5
Diffstat (limited to 'doc')
-rw-r--r-- | doc/boot-collection.rst | 15 | ||||
-rw-r--r-- | doc/collections.rst | 10 | ||||
-rw-r--r-- | doc/count-collection.rst | 112 | ||||
-rw-r--r-- | doc/defconfig-collection.rst | 16 | ||||
-rw-r--r-- | doc/index.rst | 1 | ||||
-rw-r--r-- | doc/job-collection.rst | 11 |
6 files changed, 165 insertions, 0 deletions
diff --git a/doc/boot-collection.rst b/doc/boot-collection.rst new file mode 100644 index 0000000..9bc1dc6 --- /dev/null +++ b/doc/boot-collection.rst @@ -0,0 +1,15 @@ +boot +---- + +GET +*** + +POST +**** + +DELETE +****** + +.. caution:: + Not implemented. Will return a :ref:`status code <http_status_code>` + of ``501``.
\ No newline at end of file diff --git a/doc/collections.rst b/doc/collections.rst new file mode 100644 index 0000000..6b4e996 --- /dev/null +++ b/doc/collections.rst @@ -0,0 +1,10 @@ +Collections +=========== + +.. toctree:: + :maxdepth: 2 + + count-collection + job-collection + defconfig-collection + boot-collection diff --git a/doc/count-collection.rst b/doc/count-collection.rst new file mode 100644 index 0000000..dbd9e09 --- /dev/null +++ b/doc/count-collection.rst @@ -0,0 +1,112 @@ +count +----- + +GET +*** + +.. http:get:: /count/(string:collection) + + Count the elements in all collections or in the provided ``collection``. + + :param collection: The collection name to get the count of. Can be one of + ``job``, ``defconfig``, ``boot``. + + :reqheader X-Linaro-Token: The token necessary to authorize the request. + + :query limit: Number of results to return. Default 0 (all results). + :type limit: int + :query skip: Number of results to skip. Default 0 (none). + :type skip: int + :query sort: Field to sort the results on. Can be repeated multiple times. + :query sort_order: The sort order of the results: -1 (descending), 1 + (ascending). This will be applied only to the first ``sort`` + parameter passed. Default -1. + :type sort_order: int + :query created_on: Number of days to consider, starting from today. By default + consider all results. + :type created_on: int + :query architecture: The computer architetcture of the result. + :type architecture: string + :query board: The name of a board. + :type board: string + :query defconfig: A defconfig name. + :type defconfig: string + :query job: A job name. + :type job: string + :query kernel: A kernel name. + :type kernel: string + + **Example Requests** + + .. sourcecode:: http + + GET /count/ HTTP/1.1 + Host: api.backend.linaro.org + Accept: */* + X-Linaro-Token: token + + .. sourcecode:: http + + GET /count/job/ HTTP/1.1 + Host: api.backend.linaro.org + Accept: */* + X-Linaro-Token: token + + **Example Responses** + + .. sourcecode:: http + + HTTP/1.1 200 OK + Vary: Accept-Encoding + Date: Wed, 06 Aug 2014 13:08:12 GMT + Content-Type: application/json; charset=UTF-8 + + { + "code": 200, + "result": [ + { + "count": 260, + "collection": "job" + }, + { + "count": 32810, + "collection": "defconfig" + }, + { + "count": 10746, + "collection": "boot" + } + ] + } + + .. sourcecode:: http + + HTTP/1.1 200 OK + Vary: Accept-Encoding + Date: Wed, 06 Aug 2014 13:23:42 GMT + + { + "code": 200, + "result": + [ + { + "count": 260, + "collection": "job" + } + ] + } + +POST +**** + +.. caution:: + Not implemented. Will return a :ref:`status code <http_status_code>` + of ``501``. + + +DELETE +****** + +.. caution:: + Not implemented. Will return a :ref:`status code <http_status_code>` + of ``501``. diff --git a/doc/defconfig-collection.rst b/doc/defconfig-collection.rst new file mode 100644 index 0000000..2795f51 --- /dev/null +++ b/doc/defconfig-collection.rst @@ -0,0 +1,16 @@ +defconfig +--------- + +GET +*** + +POST +**** + +.. caution:: + Not implemented. Will return a :ref:`status code <http_status_code>` + of ``501``. + +DELETE +****** + diff --git a/doc/index.rst b/doc/index.rst index 6c58523..4f6bbf7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -5,6 +5,7 @@ API Documentation :maxdepth: 2 intro + collections Indices and tables diff --git a/doc/job-collection.rst b/doc/job-collection.rst new file mode 100644 index 0000000..ef14642 --- /dev/null +++ b/doc/job-collection.rst @@ -0,0 +1,11 @@ +job +--- + +GET +*** + +POST +**** + +DELETE +****** |