Head over to our API Docs

Step 1 - head to our admin console to generate an API key

Step 2 - Open a new jupyter notebook  to use with Python 3 

Step 3 - replace token=XXXX... with generated API key

Example for calls that require no parameters

GET /api/v3/circuits/

import requests

headers = {'Authorization': 'Token token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}

url = 'https://app.verdigris.co/api/v3/circuits/'
response = requests.get(url,headers = headers)

response.json()

Example for calls that require parameters

GET /api/v3/circuits/energy

import requests
headers = {'Authorization': 'Token token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}
url = 'https://app.verdigris.co/api/v3/circuits/energy?'
payload = {
    'ids':'XXXXX, YYYYY',
    'start_time':'2018-10-8T:20:55:00Z',
    'end_time':'2018-10-8T:21:55:00Z',
    'interval':'15-minutely',
    'timestamp_format':'iso8601'
}
response = requests.get(url, params = payload, headers = headers)

response.json()

Did this answer your question?