diff --git a/doc/README.Restapi.md b/doc/README.Restapi.md index d34aa07b2..2edbfe972 100644 --- a/doc/README.Restapi.md +++ b/doc/README.Restapi.md @@ -6,7 +6,7 @@ session which is stored in a local file named `cookies.txt`. The authentication is done with the user `admin`. You may use any other user as well. -You may as well pass `-H Authorization: ` instead of `-b cookies.txt` +You can pass `-H Authorization: ` instead of `-b cookies.txt` to `curl` after setting the api key in the configuration of your SeedDMS. Of course, in that case you will not need the initial call of the `login` endpoint. @@ -48,8 +48,16 @@ curl --silent -H "Authorization: " -X GET "${BASEURL}restapi/index.php/ ## Notes Make sure to encode the data properly when using restapi functions which uses -put. If you use curl with PHP, then encode the data as the following +`put`. If you use curl with PHP, then encode the data as show in the following +lines of code: - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); +``` +curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); +``` +## Bruno + +[Bruno](https://www.usebruno.com/) is an application for testing and exploring +Rest APIs. This [git repository](https://codeberg.org/SeedDMS/bruno) contains +the configuration for SeedDMS.