add section about bruno, some formatting

This commit is contained in:
Uwe Steinmann 2025-10-23 16:14:14 +02:00
parent 8094b65a1e
commit effd6d0f5d

View File

@ -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: <api key>` instead of `-b cookies.txt`
You can pass `-H Authorization: <api key>` 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: <api key>" -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.