Canvas Data Portal 2 get request object url need python example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've used Postman and am able to get data from Canvas Data Portal 2. I'm trying to do the same thing in Python. I'm able to get all the preliminary steps (GetJWT, Dispatch query, get status of query) in python, but get a bad request format when trying to get request object url. I suspect the issue is what I'm sending as data. The following is the code I'm using to try to get the request object url.
url = "https://api-gateway.instructure.com/dap/object/url"
data = {"id":[str(queryid)]}
userinfo = requests.post(url, headers=token, json=data).json()
I've attempted [{"id":str(queryid)}] , ["id":str(queryid)] , and {"id": str(queryid)} with no luck. Any idea where I'm going wrong or have an example of it working? With [{"id":str(queryid)}], the error changes to Unsupported query objects format.