Skip to content

[Bug] Incorrect Accept Header in get_report Causes 500 Error in ReportsDataExtractionApi #63

@Yeyvo

Description

@Yeyvo

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

  1. Call get_report(...) using sailpoint.v3.ReportsDataExtractionApi with the expected parameters for a CSV report.
  2. Observe that the request is sent with Accept: application/json.
  3. The API responds with a 500 error and the above error message.
  4. 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions