API Tokens
You need API Tokens to be able to connect to the API so that the API
knows who you are and thus what permissions you have.
Using any valid API Token with your API calls means a much higher rate limit.
Your Generated Tokens
Generated
{{ token.key[:12] }}{{ token.key[12:] }}...
Token has expired and will not work any more.
{% endif %}| Permissions: |
|
|---|---|
| Expired: | {{ token.expires.strftime('%Y-%m-%d %H:%M:%S%Z') }} () |
| Expires: | {{ token.expires.strftime('%Y-%m-%d %H:%M:%S%Z') }} ( from now) |
| Notes: | {% if token.notes %} {{ token.notes | nl2br }} {% else %} no notes {% endif %} |
You currently have no tokens generated
{% endfor %}Generate a New Token
You currently do not have any permissions to generate tokens for.
{% endif %}How To Use These
When using the API you must supply these tokens as a header called Token.
Here's an example:
curl -H "Auth-Token: 58af2acef8a74dbca9580e2bb8ba9c9a" {{ absolute_base_url }}{{ url('api:model_wrapper', 'GCCrashes') }}
Or, if you prefer Python:
import requests
headers = {'Auth-Token': '58af2acef8a74dbca9580e2bb8ba9c9x'}
url = '{{ absolute_base_url }}{{ url('api:model_wrapper', 'GCCrashes') }}'
response = requests.get(url, headers=headers)