From bd59b5aabd901c63b7553711bb539487b70b2eb0 Mon Sep 17 00:00:00 2001 From: FrankApiyo Date: Mon, 30 Nov 2020 13:45:29 +0300 Subject: [PATCH] Add documentation for formList endpoints --- docs/formlist.rst | 60 +++++++++++++++++++++++++++++++++++++++++++++++ docs/forms.rst | 3 +-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 docs/formlist.rst diff --git a/docs/formlist.rst b/docs/formlist.rst new file mode 100644 index 0000000000..8b8d8861b9 --- /dev/null +++ b/docs/formlist.rst @@ -0,0 +1,60 @@ +FormList endpoints +************************* + +Implements OpenRosa API |FormListAPI| + +.. |FormListAPI| raw:: html + + here + +Discovery Request +----------------- + +.. raw:: html +
+    POST /formList
+ +Example +^^^^^^^ +:: + + curl https://api.ona.io/formList + +Here is an example response from the formlist endpoint +:: + + + + form_id + name + 202006121145 + md5:965fad0dbad4bb708d18abe77fcfe358 + + https://api.ona.io/username/forms/pk/form.xml + + + testerform + testerform + 201904231241 + md5:a023b3535b7b593de1e9ad075e9e21e6 + + https://api.ona.io/username/forms/pk/form.xml + https://api.ona.io/username/xformsManifest/1620 + + + + + +Get a single form using form's pk +--------------------------------- + +You can get a single form by specifying the form's `pk` in the following ways: +Example +^^^^^^^ +:: + + curl https://stage-api.ona.io/enketo//formList + curl https://stage-api.ona.io/enketo-preview//formList + curl https://stage-api.ona.io///formList + diff --git a/docs/forms.rst b/docs/forms.rst index c71ff44196..3704069b8b 100644 --- a/docs/forms.rst +++ b/docs/forms.rst @@ -217,8 +217,7 @@ Set Form Information -------------------- You can use ``PUT`` or ``PATCH`` http methods to update or set form data elements. -If you are using ``PUT``, you have to provide the `uuid, description, -downloadable, owner, public, public_data, title` fields. With ``PATCH`` you only need to provide at least one of the fields. +If you are using ``PUT``, you have to provide the `uuid, description, downloadable, owner, public, public_data, title` fields. With ``PATCH`` you only need to provide at least one of the fields. Replacing a Form ----------------