This endpoint deals with authentication. It can be used to create a token that will grant access to the rest of the API, and to invalidate a token that is no longer desired.

POST

To create a new auth token, send your auth details with a POST request:

http POST https://apps.dataplicity.com/auth/ <<< '{ "email": "your_email", "password": "your_password" }'
curl --header "Content-Type: application/json" --request POST --data '{ "email": "your_email", "password": "your_password" }' https://apps.dataplicity.com/auth/

The values your_email and your_password are the e-mail and password for your account that is used to log into dataplicity.com

On success, you will get a token with a response code of 201 (created):

{
        "token": "123456789abcdefghijklmnopqrstuvwxyzqwer"
    }

This token can be used to authenticate subsequent requests as described in Authentication.

📘

Do I need to generate a token each time I access the API?

A token only needs to be generated once per API user. It does not expire unless it is deleted manually.

DELETE

To invalidate a token, make an authenticated DELETE request to /auth/.

http DELETE https://apps.dataplicity.com/auth/ 'Authorization: Token 123456789abcdefghijklmnopqrstuvwxyzqwer'
curl --header "Content-Type: application/json" -H "Authorization: Token 123456789abcdefghijklmnopqrstuvwxyzqwer" --request DELETE https://apps.dataplicity.com/auth/

On success, you will get a response with code 204 (no content).