Per @sam’s wonderful guide, I’ve found the proper endpoint for my desired request:
https://domain.com/admin/reports/bulk?reports[dau_by_mau][facets][]=prev_period&reports[dau_by_mau][start_date]=2022-07-27&reports[dau_by_mau][end_date]=2022-08-28&reports[dau_by_mau][limit]=50
I found no form-headers to be present, and I assumed there were none needed. This request in Dev Tools results in a JSON response, exactly the one I want/need. I’m trying to make a python get request:
url = "https://domain.com/admin/reports/bulk?reports[dau_by_mau][facets][]=prev_period&reports[dau_by_mau][start_date]=2022-07-27&reports[dau_by_mau][end_date]=2022-08-28&reports[dau_by_mau][limit]=50.json"
headers = CaseInsensitiveDict()
headers["Content-Type"] = "multipart/form-data"
headers["Content-Type"] = "application/json"
headers["Api-Key"] = SECRET.API
headers["Api-Username"] = "system"
resp = requests.get(url, headers=headers)
print(resp.status_code)
print(resp.headers)
I do get a 200
, but it returns with a 'Content-Type': 'text/html
, and not a JSON (which is what I want). And I’m not even sure the text it returns is the text version of desired data.
Didn’t help either.
So what am I doing wrong?