DEQAR API endpoints manage authentication using API Tokens (through the so-called Bearer Authentication method). Upon registration, an API Token (which is basically a hash) is created for each user. Sending this token in the Authorization header (with type/scheme Bearer) will authenticate the user in place of a regular username and password.

To get your authentication token you can send a POST request to the following URL:

An example of obtaining a token using curl in command line:

curl -s -H "Content-Type: application/json" -XPOST --data '{"username":"testuser","password":"testpassword"}'

Or for those who prefer to use the more user friendly HTTPie client:

http POST 'username=testuser' 'password=testpassword'

You should send this token, preceded by the word Bearer, in the Authorization header with every further request. An example of a submission using curl or HTTPie:

curl -s -H "Content-type: application/json" -H "Authorization: Bearer $DEQAR_TOKEN"

http "Authorization: Bearer $DEQAR_TOKEN"