import os, requests, time, json, sys, logging, configparser from datetime import datetime, timedelta from http.cookies import SimpleCookie def checkAPIlimit(): global number_of_calls print("API calls: ", str(number_of_calls+1)) if number_of_calls == 59: print("Sleeping") time.sleep(60) number_of_calls=0 def saveValues(): YOUR_DT_API_URL = tenant_info.split(" ")[0].rstrip('\n') YOUR_DT_API_TOKEN = tenant_info.split(" ")[1].rstrip('\n') return YOUR_DT_API_URL, YOUR_DT_API_TOKEN def update(): print(headers) print(YOUR_DT_API_URL) r = requests.get(''.join(YOUR_DT_API_URL) + '/api/config/v1/dashboards', headers=headers, cookies=dict(cookies), verify=False); print(r.text) dashboards = json.loads(r.text) i = 0 while i