Hereafter some examples using Curl.

Note that our API is accessible using the domain:

  • https://ui.boondmanager.com/api : API on production Infrastructure

When calling our API, each request has to be authenticated. More information here.

GET request

If the user we used for the userToken is a manager we can retrieve the times reports for example:

curl 'https://ui.boondmanager.com/api/dashboard' -X GET
-H 'Accept: application/json'
-H 'x-jwt-app-boondmanager: YOUR_HEADER_VALUE'
-H 'Content-Type: application/json'

PUT request

Given access to the Candidates module and enough rights, we can use a userToken belonging to a manager to modify a candidate:

curl 'https://ui.boondmanager/api/candidates/ID_OF_CANDIDATE/information' -X PUT 
-H 'Accept: application/json'
-H 'x-jwt-app-boondmanager: YOUR_HEADER_VALUE'
-H 'Content-Type: application/json'
--data-binary $'{"data":{"attributes":{"lastName":"NEW_NAME"},"type":"candidate"}}'

 

Using a user's credentials

You can use a user's login and password to test an API but we don't recommend using it for production as the password is not protected.

The ability to use BasicAuth for API calls, has to be activated in your administration console's dashboard, section Security.

curl --user LOGIN:PASSWORD 'https://ui.boondmanager/api/candidates/ID_OF_CANDIDATE/information' -X PUT 
-H 'Accept: application/json'
-H 'Content-Type: application/json'
--data-binary $'{"data":{"attributes":{"lastName":"NEW_NAME"},"type":"candidate"}}'

 

Cet article vous a-t-il été utile ?
Utilisateurs qui ont trouvé cela utile : 1 sur 4

Commentaires

0 commentaire

Cet article n'accepte pas de commentaires.