Mercurial > hg > orthanc-book
changeset 236:f58c0784453d
Merged in TomasZubiri/orthanc-book/TomasZubiri/documented-some-parameter-types-expected-1553029141048 (pull request #8)
Documented some parameter types, expected string formatting and added samples.
author | Sébastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Apr 2019 14:19:16 +0000 |
parents | 4ee39154c570 (current diff) 17f8eda5fccb (diff) |
children | 1a701dfdfcad |
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 Apr 04 14:17:21 2019 +0000 +++ b/Sphinx/source/users/lua.rst Thu Apr 04 14:19:16 2019 +0000 @@ -134,13 +134,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 ^^^^^^^^^^^^^^^^^^^^^^^^^