mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-12-28 15:58:27 +00:00
add section about bruno, some formatting
This commit is contained in:
parent
8094b65a1e
commit
effd6d0f5d
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user