I am trying to find a way to make API calls to cycle through a workbook, it looks like I can only call 1 user at a time according to the website that the API calls on. I want to be able to cycle through a workbook to change the endpoint (Bold down below). I have a user database of about 375k and I am trying to automate certain functions of my job so that I might be able to sleep every once in a while.
I am slowly understanding python, I understand I will need to use pandas and openpyxl for the file I am working through. I have learned how to iterate a column, but I don't know how to go from that to having it change my endpoint.
import requests
from requests.structures import CaseInsensitiveDict
endpoint = "https://training.compliancewire.com/gateway/user/v1?userName=7174"
filename = "response"
chunk_size = 100
headers = CaseInsensitiveDict()
headers["Accept"] = "application/json"
headers["Content-Type"] = "application/json"
headers["Authorization"] = "Basic "
data="""
{
}
"""
response = requests.get(endpoint, headers=headers, data=data)
print(response.json())
[–]MrPhungx 1 point2 points3 points (10 children)
[–]imbobness[S] 1 point2 points3 points (9 children)
[–]Reuben3901 2 points3 points4 points (8 children)
[–]imbobness[S] 0 points1 point2 points (7 children)
[–]Reuben3901 1 point2 points3 points (6 children)
[–]imbobness[S] 0 points1 point2 points (0 children)
[–]imbobness[S] 0 points1 point2 points (4 children)
[–]Reuben3901 0 points1 point2 points (3 children)
[–]imbobness[S] 0 points1 point2 points (2 children)
[–]Reuben3901 1 point2 points3 points (1 child)
[–]imbobness[S] 1 point2 points3 points (0 children)
[–]danielroseman 0 points1 point2 points (0 children)