dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25796
[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 850: Web api, settings
------------------------------------------------------------
revno: 850
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Mon 2013-10-28 11:20:05 +0100
message:
Web api, settings
modified:
src/docbkx/en/dhis2_user_man_web_api.xml
--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs
Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml 2013-10-22 17:09:35 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml 2013-10-28 10:20:05 +0000
@@ -2843,6 +2843,9 @@
the key and the value are plain text strings. To save or update a system setting you can make
a <emphasis role="italic">POST</emphasis> request to the following URL:</para>
<screen>/api/systemSettings/my-key?value=my-val</screen>
+ <para>Alternatively, you can submit the setting value as the request body, where content type is
+ set to "text/plain". As an example, you can use curl like this:</para>
+ <screen>curl "apps.dhis2.org/demo/api/systemSettings/my-key" -d "My long value" -H "Content-Type: text/plain" -u admin:district -v</screen>
<para>You should replace my-key with your real key and my-val with your real value. To retrieve
the value for a given key in plain text you can make a <emphasis role="italic">GET</emphasis>
request to the following URL:</para>
@@ -2858,6 +2861,9 @@
authenticated for the Web API request. To save or update a user setting you can make a
<emphasis role="italic">POST</emphasis> request to the following URL:</para>
<screen>/api/userSettings/my-key?value=my-val</screen>
+ <para>Alternatively, you can submit the setting value as the request body, where content type is
+ set to "text/plain". As an example, you can use curl like this:</para>
+ <screen>curl "apps.dhis2.org/demo/api/userSettings/my-key" -d "My long value" -H "Content-Type: text/plain" -u admin:district -v</screen>
<para>You should replace my-key with your real key and my-val with your real value. To retrieve
the value for a given key in plain text you can make a <emphasis role="italic">GET</emphasis>
request to the following URL:</para>