simple_salesforce
doesn't have direct access to the Reports and Analytics API, which is what you need, but it can call arbitrary Salesforce REST endpoints using the method simple_salesforce.Salesforce.restful()
. I've used it successfully to talk to the Tooling API, for example.
It looks like you want to be hitting the Report Describe endpoint to get details about the report's structure,
/services/data/44.0/analytics/reports/YOUR_REPORT_ID/describe
as well as the Execute Sync endpoint to extract the rows from an actual run of this report. If you don't care about the column names or report metadata independent of the report run, you may need only Execute Sync.
/services/data/44.0/analytics/reports/YOUR_REPORT_ID
There's a lengthy example of getting report run data synchronously in the documentation.
Note that there are a variety of limitations on the Reports and Analytics API, including particularly
The API returns up to the first 2,000 report rows. You can narrow results using filters.
The report metadata that is returned to you is also, in my opinion, quite complex and can be challenging to work with.
When you query the Report sObject as you are in your question, you don't get back that detailed metadata. Note also that SOQL doesn't support wildcards in the SELECT
clause, and you probably don't want to be using the Bulk API to query a single record - regular SOQL will be more expeditious.