-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Bug Description
When using sailpoint.v3.ReportsDataExtractionApi with the get_report method to retrieve a report file as CSV, the API returns a 500 error with the following response:
{
"errorName": "NotAcceptableException",
"errorMessage": "RESTEASY003635: No match for accept header",
"trackingId": "e83c98a4dc2047e8bf4de740d047e14a"
}Upon inspection, the "Accept" header is incorrectly set as:
Accept: application/json
This is incorrect for CSV downloads.
Steps to Reproduce
- Call
get_report(...)usingsailpoint.v3.ReportsDataExtractionApiwith the expected parameters for a CSV report. - Observe that the request is sent with
Accept: application/json. - The API responds with a
500error and the above error message. - Repeat the process for a PDF report and observe the same issue.
Expected Behavior
The API should return the requested report file in the correct format (CSV or PDF) without an error. The Accept header should be correctly set based on the requested format.
Actual Behavior
The request is incorrectly sent with Accept: application/json, leading to a 500 error.
Environment
- SailPoint Python SDK Version: 1.2.7 (latest available)
Proposed Fix
Modify the request's Accept header in get_report to dynamically adjust based on the requested format:
- If requesting CSV, set:
Accept: application/csv - If requesting PDF, set:
Accept: application/pdf - Alternatively, use a wildcard:
Accept: */*
This ensures the API correctly matches the requested content type.