aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-09-08 16:32:10 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-09-08 16:32:10 +0200
commit3c919320060bf758c220fb06fdbbcd93e8349864 (patch)
treed2a9d17fb353e8547c9120df33999ccf986eac20 /doc
parent7fb525434582040116bde2ff9defa77eb5a8a8f0 (diff)
doc: Complete collection documents.
* Add references to other docs. Change-Id: I4ce1f489524e510c414077ed8e4279477a15787b
Diffstat (limited to 'doc')
-rw-r--r--doc/boot-collection.rst10
-rw-r--r--doc/defconfig-collection.rst155
-rw-r--r--doc/job-collection.rst9
-rw-r--r--doc/schema-boot.rst1
-rw-r--r--doc/schema-defconfig.rst1
-rw-r--r--doc/schema-job.rst1
6 files changed, 177 insertions, 0 deletions
diff --git a/doc/boot-collection.rst b/doc/boot-collection.rst
index 6016431..fbcf0df 100644
--- a/doc/boot-collection.rst
+++ b/doc/boot-collection.rst
@@ -1,3 +1,5 @@
+.. _collection_boot:
+
boot
----
@@ -200,3 +202,11 @@ DELETE
Accept: */*
Content-Type: application/json
Authorization: token
+
+
+More Info
+*********
+
+* :ref:`Boot schema <schema_boot>`
+* :ref:`API results <intro_schema_results>`
+* :ref:`Schema time and date <intro_schema_time_date>`
diff --git a/doc/defconfig-collection.rst b/doc/defconfig-collection.rst
index 2795f51..e2cb692 100644
--- a/doc/defconfig-collection.rst
+++ b/doc/defconfig-collection.rst
@@ -1,9 +1,131 @@
+.. _collection_defconfig:
+
defconfig
---------
GET
***
+.. http:get:: /defconfig/(string:defconfig_id)
+
+ Get all the available defconfigs built or a single one if ``defconfig_id`` is provided.
+
+ :param defconfig_id: The ID of the defconfig to retrieve. Usually in the form of: ``job``-``kernel``-``defconfig``.
+ :type defconfig_id: string
+
+ :reqheader Authorization: The token necessary to authorize the request.
+ :reqheader Accept-Encoding: Accept the ``gzip`` coding.
+
+ :resheader Content-Type: Will be ``application/json; charset=UTF-8``.
+
+ :query int limit: Number of results to return. Default 0 (all results).
+ :query int skip: Number of results to skip. Default 0 (none).
+ :query string sort: Field to sort the results on. Can be repeated multiple times.
+ :query int 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.
+ :query int date_range: Number of days to consider, starting from today
+ (:ref:`more info <intro_schema_time_date>`). By default consider all results.
+ :query string field: The field that should be returned in the response. Can be
+ repeated multiple times.
+ :query string nfield: The field that should *not* be returned in the response. Can be repeated multiple times.
+ :query string job: The name of a job.
+ :query string job_id: The ID of a job.
+ :query string kernel: The name of a kernel.
+ :query string defconfig: The name of a defconfig.
+ :query string arch: The architecture on which the defconfig has been built.
+ :query string status: The status of the defconfig built.
+ :query int warnings: The number of warnings in the defconfig built.
+ :query int errors: The number of errors in the defconfig built.
+
+ :status 200: Resuslts found.
+ :status 403: Not authorized to perform the operation.
+ :status 404: The provided resource has not been found.
+ :status 500: Internal database error.
+
+ **Example Requests**
+
+ .. sourcecode:: http
+
+ GET /defconfig/ HTTP/1.1
+ Host: api.backend.linaro.org
+ Accept: */*
+ Authorization: token
+
+ .. sourcecode:: http
+
+ GET /defconfig/next-next-20140905-arm-omap2plus_defconfig HTTP/1.1
+ Host: api.backend.linaro.org
+ Accept: */*
+ Authorization: token
+
+ .. sourcecode:: http
+
+ GET /defconfig?job=next&kernel=next-20140905&field=status&field=arch&nfield=_id HTTP/1.1
+ Host: api.backend.linaro.org
+ Accept: */*
+ Authorization: token
+
+ **Examples Responses**
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Vary: Accept-Encoding
+ Date: Mon, 08 Sep 2014 14:16:52 GMT
+ Content-Type: application/json; charset=UTF-8
+
+ {
+ "code": 200,
+ "result": [
+ {
+ "status": "PASS",
+ "kernel": "next-20140905",
+ "dirname": "arm-omap2plus_defconfig",
+ "job_id": "next-next-20140905",
+ "job": "next",
+ "defconfig": "omap2plus_defconfig",
+ "errors": null,
+ "_id": "next-next-20140905-arm-omap2plus_defconfig",
+ "arch": "arm",
+ }
+ ]
+ }
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Vary: Accept-Encoding
+ Date: Mon, 08 Sep 2014 14:20:52 GMT
+ Content-Type: application/json; charset=UTF-8
+
+ {
+ "code": 200,
+ "count": 132,
+ "limit": 0,
+ "result": [
+ {
+ "status": "PASS",
+ "arch": "arm"
+ },
+ {
+ "status": "PASS",
+ "arch": "arm"
+ },
+ {
+ "status": "PASS",
+ "arch": "x86"
+ },
+ {
+ "status": "PASS",
+ "arch": "arm64"
+ }
+ ]
+ }
+
+ .. note::
+ Results shown here do not include the full JSON response.
+
POST
****
@@ -14,3 +136,36 @@ POST
DELETE
******
+.. http:delete:: /defconfig/(string:defconfig_id)
+
+ Delete the job identified by ``defconfig_id``.
+
+ :param defconfig_id: The ID of the defconfig to retrieve. Usually in the form of: ``job``-``kernel``-``defconfig``.
+ :type defconfig_id: string
+
+ :reqheader Authorization: The token necessary to authorize the request.
+ :reqheader Accept-Encoding: Accept the ``gzip`` coding.
+
+ :resheader Content-Type: Will be ``application/json; charset=UTF-8``.
+
+ :status 200: Resource deleted.
+ :status 403: Not authorized to perform the operation.
+ :status 404: The provided resource has not been found.
+ :status 500: Internal database error.
+
+ **Example Requests**
+
+ .. sourcecode:: http
+
+ DELETE /defconfig/next-next-20140905-arm-omap2plus_defconfig HTTP/1.1
+ Host: api.backend.linaro.org
+ Accept: */*
+ Content-Type: application/json
+ Authorization: token
+
+More Info
+*********
+
+* :ref:`Defconfig schema <schema_defconfig>`
+* :ref:`API results <intro_schema_results>`
+* :ref:`Schema time and date <intro_schema_time_date>`
diff --git a/doc/job-collection.rst b/doc/job-collection.rst
index de2196a..8504c81 100644
--- a/doc/job-collection.rst
+++ b/doc/job-collection.rst
@@ -1,3 +1,5 @@
+.. _collection_job:
+
job
---
@@ -193,3 +195,10 @@ DELETE
Accept: */*
Content-Type: application/json
Authorization: token
+
+More Info
+*********
+
+* :ref:`Job schema <schema_job>`
+* :ref:`API results <intro_schema_results>`
+* :ref:`Schema time and date <intro_schema_time_date>`
diff --git a/doc/schema-boot.rst b/doc/schema-boot.rst
index aaeb913..e7e103f 100644
--- a/doc/schema-boot.rst
+++ b/doc/schema-boot.rst
@@ -115,6 +115,7 @@ defconfig.
More Info
*********
+* :ref:`Boot collection <collection_boot>`
* :ref:`Defconfig schema <schema_defconfig>`
* :ref:`API results <intro_schema_results>`
* :ref:`Schema time and date <intro_schema_time_date>`
diff --git a/doc/schema-defconfig.rst b/doc/schema-defconfig.rst
index 4e7daa4..727d64e 100644
--- a/doc/schema-defconfig.rst
+++ b/doc/schema-defconfig.rst
@@ -77,5 +77,6 @@ using a defconfig.
More Info
*********
+* :ref:`Defconfig collection <collection_defconfig>`
* :ref:`API results <intro_schema_results>`
* :ref:`Schema time and date <intro_schema_time_date>`
diff --git a/doc/schema-job.rst b/doc/schema-job.rst
index 96e16a1..70425c8 100644
--- a/doc/schema-job.rst
+++ b/doc/schema-job.rst
@@ -90,5 +90,6 @@ build.
More Info
*********
+* :ref:`Job collection <collection_job>`
* :ref:`API results <intro_schema_results>`
* :ref:`Schema time and date <intro_schema_time_date>`