changeset 235:17f8eda5fccb TomasZubiri/documented-some-parameter-types-expected-1553029141048

Documented some parameter types, expected string formatting and added samples.
author Tomas Zubiri <me@tomaszubiri.com>
date Tue, 19 Mar 2019 20:59:05 +0000
parents 1af668e84f4d
children f58c0784453d 40672f1a6308
files Sphinx/source/users/lua.rst
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/users/lua.rst	Thu Mar 07 12:41:10 2019 +0100
+++ b/Sphinx/source/users/lua.rst	Tue Mar 19 20:59:05 2019 +0000
@@ -124,13 +124,17 @@
 * ``RestApiPut(uri, body, builtin)``
 * ``RestApiDelete(uri, builtin)``
 
-The ``uri`` arguments specifies the URI against which to make the
-request, and ``body`` is a string containing the body of POST/PUT
-request.  The ``builtin`` parameter is an optional Boolean that
-specifies whether the request targets only the built-in REST API of
-Orthanc (if set to ``true``), or the full the REST API after being
-tainted by the plugins (if set to ``false``).
+The parameters:
+
+* ``uri`` specifies the resource being accessed, do not include URL schema, hostname or port. (For example:  '/instances' )
+
+* ``body`` is a json-formatted string containing the body of a POST or PUT request. (For example: '{"Keep":"StudyDate"}' )
 
+* ``builtin`` is an optional Boolean that specifies whether the request targets only the built-in REST API of Orthanc (if set to ``true``), or the full the REST API after being tainted by plugins (if set to ``false``).
+
+For example:
+
+ RestApiPost('/instances/5af318ac-78fb-47ff-b0b0-0df18b0588e0/anonymize', '{}')
 
 General-purpose functions
 ^^^^^^^^^^^^^^^^^^^^^^^^^