Authentication
The DataReportive API uses API tokens to securely authenticate your requests. Each administrator account can generate and manage unique API tokens, ensuring secure and personalized access. Any resources created or modified through the API will be directly associated with the user linked to the token used.
To authenticate your API requests, include your API token as a Bearer token in the
HTTP request header:
Authorization: Token [[YOUR_API_TOKEN]]
.
All requests to the DataReportive API must be made over HTTPS to ensure security. Requests sent via unsecured HTTP or without proper authentication will be rejected.
Here's a basic example illustrating how to retrieve a list of active users, demonstrating how authentication headers are used.
Example Request
curl 'https://acmeinc.datareportive.com/api/v1/users/' -X GET -H "Authorization: Token [ TOKEN ]"
Response
{
"status": 200,
"message": "Request successful!",
"data": {
"results": [
{
"first_name": ...,
"last_name": ...,
"url": ...,
"num_reports_receiving": ...,
"user_type_dispaly": ...,
"user_type": ...,
"email": ...,
"date_updated": ...,
"date_created": ...,
"id": ...
},
...
]
}
}