I am trying to iterate through Freshservice API and I don't know how to get the json format within the file to be able to use read_json for pandas? I will not be able to share the API link nor do I think I need to since I can touch the API and access. It would
json_data = []
for page in range(1,11):
Rest1 = requests.get(Change_URL_api + f"{page}",auth=HTTPBasicAuth('Username','Password'))
new_results = json.loads(Rest1.text)
json_data.append(new_results)
print(json_data)
with open('change.json','w') as f:
f.write(json.dumps(json_data))
dataframe=pandas.read_json('change.json',orient='records')
Format within json file:
[{"changes": [{"agent_id": xxxxxx, "group_id": xxxxx, "priority": x, "impact": x, "status": x, "risk": x, "change_type": x,
This is the following format I see within the dataframe. I believe it has a different page for each index based off my range.
Index Changes
0 [object Object],[object Object],[object Object],[object Object],[object Object],
1 [object Object],[object Object],[object Object],[object Object],[object Object],