Friends,
I am consuming the API via python and there is a data limitation in the Aruba request. I've tried pagination, but since I'm not a developer, I've tried to scrape the page with beautiful soap and nothing, then I tried offset / params, and I still have an error.
I have 125 customers in my company's instance, and I wanted to filter all customers_name / ID.
Someone to help?
import requests
url = "https://apxxxx.arubanetworks.com/msp_api/v1/customers"
querystring = {"offset":"0","limit":"50"}
querystring1 = {"offset":"1","limit":"50"}
querystring2 = {"offset":"2","limit":"50"}
#headers = {"Accept": "application/json"}
header = {"authorization": f"Bearer {access_token}"}
response = requests.get(url, headers=header, params=querystring)
if response.status_code == 200:
resp = response.json()
content_json = resp
#print(json.dumps(content_json,indent=4))
customers = content_json['customers']
for name in customers:
print(name['customer_name'])
response1 = requests.get(url, headers=header, params=querystring1)
OBS: I created several querystring, to help, but I'm not evolving
------------------------------
Jardel Oliveira
------------------------------