[LNT] r306595 - Some initial docs for the REST API
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 13:45:03 PDT 2017
Author: cmatthews
Date: Wed Jun 28 13:45:03 2017
New Revision: 306595
URL: http://llvm.org/viewvc/llvm-project?rev=306595&view=rev
Log:
Some initial docs for the REST API
Added:
lnt/trunk/docs/api.rst
Modified:
lnt/trunk/docs/contents.rst
Added: lnt/trunk/docs/api.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/api.rst?rev=306595&view=auto
==============================================================================
--- lnt/trunk/docs/api.rst (added)
+++ lnt/trunk/docs/api.rst Wed Jun 28 13:45:03 2017
@@ -0,0 +1,40 @@
+.. _api:
+
+Accessing Data outside of LNT: REST API
+=======================================
+
+LNT provides REST APIs to access data stored in the LNT database.
+
+
+Endpoints
+---------
+
+The API endpoints live under the top level api path, and have the same database and test-suite layout. For example::
+
+ http://lnt.llvm.org/db_default/v4/nts/machine/1330
+ Maps to:
+ http://lnt.llvm.org/api/db_default/v4/nts/machines/1330
+
+The machines endpoint allows access to all the machines, and properties and runs collected for them. The runs endpoint
+will fetch run and sample data. The samples endpoint allows for the bulk export of samples from a number of runs at
+once.
+
++---------------------------+------------------------------------------------------------------------------------------+
+| Endpoint | Description |
++---------------------------+------------------------------------------------------------------------------------------+
+| /machines/ | List all the machines in this testsuite. |
++---------------------------+------------------------------------------------------------------------------------------+
+| /machines/`id` | Get all the runs info and machine fields for machine `id`. |
++---------------------------+------------------------------------------------------------------------------------------+
+| /runs/`id` | Get all the run info and sample data for one run `id`. |
++---------------------------+------------------------------------------------------------------------------------------+
+| /orders/`id` | Get all order info for Order `id`. |
++---------------------------+------------------------------------------------------------------------------------------+
+| /samples?runid=1&runid=2 | Retrieve all the sample data for a list of run ids. Run IDs should be pass as args. |
+| | Will return sample data in the samples section, as a list of dicts, with a key for |
+| | each metric type. |
++---------------------------+------------------------------------------------------------------------------------------+
+
+Examples
+--------
+
Modified: lnt/trunk/docs/contents.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/contents.rst?rev=306595&r1=306594&r2=306595&view=diff
==============================================================================
--- lnt/trunk/docs/contents.rst (original)
+++ lnt/trunk/docs/contents.rst Wed Jun 28 13:45:03 2017
@@ -18,6 +18,8 @@ Contents
concepts
+ api
+
importing_data
developer_guide
More information about the llvm-commits
mailing list