About API

Our API will allow you to get statistics for a simulation via a simple REST API. TO get started, go over to your profile and get your API token.

Endpoints

Endpoints are categorised by category and request type below. All endpoints have a base URL of http://evcalc.app/api/

Share

GET https://evcalc.app/api/share/{hash}

Click the share button on an EVCalc inside your account to get its unique hash which can be sent to this endpoint and will return its statistics.

Authorisation

Requests can be authorised in 2 ways. Use whichever suits your application best:

Query String
Add an api_token parameter to your query string: https://evcalc.app/api/endpoint?api_token=your_token_here
Authorisation Header

Add the following header to your request, replacing your_token_here with the token from your profile

Authorization: 'Token:your_token_here'

Rate Limiting

Requests are rate limited to 60 requests per minute, per API token. Please consider caching statistics on your server to respect this limit and reduce our server load.