I'm using the official Office365-REST-Python-Client which basically is a wrapper to submit HTTP requests. I'm looking at the documentation and have been succesfully able to upload documents to the site, however they are all going straight to the Shared Documents Folder. When I try specifying a subfolder, I get a HTTP 404 client error because the API is creating a bad request.
HTTPError: 404 Client Error: Not Found for url: https://domain.sharepoint.com/sites/site_name/_api/Web/lists/GetByTitle('Documents%2Ftest%2F')/RootFolder/Files/add(overwrite=true,url='runtime_table.csv')
I've been reading the documentation and understand I need to add a subfolder to the REST query, but I'm not sure how to do that within the Python library? Any help would be greatly appreciated, thanks.