# HG changeset patch # User Tomas Zubiri # Date 1553029145 0 # Node ID 17f8eda5fccb6d7e8f3c9dc61b0437011b98ba73 # Parent 1af668e84f4d3c7a05a9bfe5078e91c99f901889 Documented some parameter types, expected string formatting and added samples. diff -r 1af668e84f4d -r 17f8eda5fccb Sphinx/source/users/lua.rst --- 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 ^^^^^^^^^^^^^^^^^^^^^^^^^