aboutsummaryrefslogtreecommitdiff
path: root/doc/intro.rst
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-08-04 18:25:05 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-08-04 18:25:05 +0200
commitc213d4d2d519c146fe0bbc8dcfe39b78ff93856a (patch)
treeb80274559fdf95ff441fa39a185a4c0df79c5037 /doc/intro.rst
parentcf71db838a66b4effaeba3f2dd4cb650543cc121 (diff)
doc: Add first created files.
Change-Id: I2e0584f0b3b9ca70ebe7863b00391278d39a2747
Diffstat (limited to 'doc/intro.rst')
-rw-r--r--doc/intro.rst68
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/intro.rst b/doc/intro.rst
new file mode 100644
index 0000000..9b6a87c
--- /dev/null
+++ b/doc/intro.rst
@@ -0,0 +1,68 @@
+Overview
+========
+
+Here are described the resources that make up the Kernel CI API.
+If you have any problems or suggestions, please report a bug.
+
+
+Current Version
+---------------
+
+Current version of the API is **v1**.
+
+By default all requests receive the **v1** version. In the future, different
+versions will have to be explicitly requested using the ``Accept`` header: ::
+
+ Accept: application/v1
+
+HTTP Verbs
+----------
+
+Where possible, the API strives to use appropriate HTTP verbs for each action.
+
+Not all the API resources might implement them.
+
++--------+-------------------------------------+
+| Verb | Description |
++========+=====================================+
+| GET | Used to retrieve resources. |
++--------+-------------------------------------+
+| POST | Used to create or update resources. |
++--------+-------------------------------------+
+| DELETE | Used for deleting resources. |
++--------+-------------------------------------+
+
+Authentication
+--------------
+
+The only way to authenticate through the API is via an authentication token.
+Requests that require authentication will return ``403 Forbidden``.
+
+Authentication is performed using the ``X-Linaro-Token`` header.
+
+Basic Authentication
+********************
+
+::
+
+ curl -H 'X-Linaro-Token: token' https://api.backend.linaro.org
+
+Schema
+------
+
+API access is exclusively over HTTPS and accessed via the
+``api.backend.linaro.org`` URL.
+
+Data is sent and received **only** in JSON format.
+
+Time and Date
+*************
+
+Timestamps are returned as milliseconds since ``January 1, 1970, 00:00:00
+UTC`` and are all UTC.
+
+A timestamp will be encoded as follows: ::
+
+ {"created_on": {"$date": 1406788988347}}
+
+Internally, timestamps are stored in `BSON <http://bsonspec.org/>`_ format.