Skip to content

Commit e970392

Browse files
committed
DOC: Add documentation for REST API
1 parent 9f528ea commit e970392

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

qiita_pet/support_files/doc/source/dev/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The following is a full list of the available developer tutorials
77
:maxdepth: 2
88

99
plugins
10+
rest
1011

1112
To request documentation on any developer use-cases not addressed here,
1213
please add an issue `here <https://github.com/biocore/qiita/issues>`__.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _plugins:
2+
3+
.. index :: rest
4+
5+
Qiita REST API
6+
==============
7+
8+
The Qiita REST API is currently only for internal use and is composed of the
9+
following endpoints:
10+
11+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
12+
| Action | URI | Description |
13+
+========+===========================================================+==========================================================================================================================================================+
14+
|GET | ``/api/v1/study/<int>`` | Get study details (title, contacts, abstract, description and alias). |
15+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
16+
|GET | ``/api/v1/study/<int>/samples`` | Get samples associated with a study and the available metadata headers for these samples. |
17+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
18+
|GET | ``/api/v1/study/<int>/samples?categories=foo,bar`` | Get metadata categories foo and bar for all samples in the study. |
19+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
20+
|GET | ``/api/v1/study/<int>/status`` | The status of a study (whether or not the study: is public, has sample information, sample information has warnings and a list of existing preparations. |
21+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
22+
|GET | ``/api/v1/person?name=foo&affiliation=bar`` | See if a person exists. |
23+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
24+
|POST | ``/api/v1/study`` | Create a study (mirrors study creation on qiita UI with minimal requirements). |
25+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
26+
|POST | ``/api/v1/person?name=foo&affiliation=bar&email=address`` | Create a study person (ie lab person or PI). |
27+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
28+
|POST | ``/api/v1/study/<int>/preparation`` | Associate a prep with a study. |
29+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
30+
|POST | ``/api/v1/study/<int>/preparation/<int>/artifact`` | Associate filepaths to a preparation, assuming this filepaths are present in the uploads folder. |
31+
+--------+-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)