Format of curl examples
The curl examples will use this format:
curl -s \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <token>' \ 'http://<unimus-address>:8085/api/v1/<API-path>' | json_pp
Explanation:
-s : makes curl run silent - not show request processing, etc.
-H : adds HTTP headers needed to communicate with Unimus API
We will then pass the output to json_pp which will format the JSON received from the Unimus API.
The above curl command is the same as if written on one line (without the use of json_pp here):
curl -H "Accept: application/json" -H "Authorization: Bearer <token>" "http://<unimus-address>:8085/api/v1/<API-path>"
You will need to substitute the values inside <...> for your actual values:
<token> : change this for your Unimus API token
<unimus-address> : change this for the actual address of your Unimus server
<API-path> : change this for the API path you wish to call
Examples
Get current status of your Unimus server
curl call:
curl -s \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <token>' \ 'http://<unimus-address>:8085/api/v1/health' | json_pp
Output:
{ "data" : { "status" : "OK" } }