<
import requests
import json
import datetime
import pprint

# get_readings example
device_sn = "z6-10162"
url = "https://zentracloud.com/api/v3/get_readings/"
token = "Token bd282bd6c4dade6c5e524324d55046b8a600bed3")
headers = {'content-type': 'application/json', 'Authorization': token}
end_date = datetime.datetime.today()
start_date = end_date - datetime.timedelta(days=30)
page_num = 1
per_page = 3
params = {'device_sn': device_sn, 'start_date': start_date, 'end_date': end_date,
'page_num': page_num, 'per_page': per_page}
response = requests.get(url, params=params, headers=headers)
content = json.loads(response.content)

$ pprint.pprint(content)

>