Skip to main content

sailpoint.v3.ReportsDataExtractionApi

Use this API to implement reports lifecycle managing and monitoring. With this functionality in place, users can run reports, view their results, and cancel reports in progress. This can be potentially helpful for auditing purposes.

All URIs are relative to https://sailpoint.api.identitynow.com/v3

MethodHTTP requestDescription
cancel-reportPOST /reports/{id}/cancelCancel Report
get-reportGET /reports/{taskResultId}Get Report File
get-report-resultGET /reports/{taskResultId}/resultGet Report Result
start-reportPOST /reports/runRun Report

cancel-report

Cancel Report Cancels a running report.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
PathidstrTrueID of the running Report to cancel

Return type

(empty response body)

Responses

CodeDescriptionData TypeResponse headers
204No content - indicates the request was successful but there is no content to be returned in the response.-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v3.api.reports_data_extraction_api import ReportsDataExtractionApi
from sailpoint.v3.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
id = 'a1ed223247144cc29d23c632624b4767' # str | ID of the running Report to cancel # str | ID of the running Report to cancel

try:
# Cancel Report

ReportsDataExtractionApi(api_client).cancel_report(id=id)
# Below is a request that includes all optional parameters
# ReportsDataExtractionApi(api_client).cancel_report(id)
except Exception as e:
print("Exception when calling ReportsDataExtractionApi->cancel_report: %s\n" % e)

[Back to top]

get-report

Get Report File Gets a report in file format.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Pathtask_result_idstrTrueUnique identifier of the task result which handled report
Queryfile_formatstrTrueOutput format of the requested report file
Querynamestr(optional)preferred Report file name, by default will be used report name from task result.
Queryauditablebool(optional) (default to False)Enables auditing for current report download. Will create an audit event and sent it to the REPORT cloud-audit kafka topic. Event will be created if there is any result present by requested taskResultId.

Return type

bytearray

Responses

CodeDescriptionData TypeResponse headers
200Report file in selected format. CSV by default.bytearray* Content-disposition - The requested report's filename
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
404Not Found - returned if the request URL refers to a resource or object that does not existErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/csv, application/pdf, application/json

Example

from sailpoint.v3.api.reports_data_extraction_api import ReportsDataExtractionApi
from sailpoint.v3.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
task_result_id = 'ef38f94347e94562b5bb8424a56397d8' # str | Unique identifier of the task result which handled report # str | Unique identifier of the task result which handled report
file_format = 'csv' # str | Output format of the requested report file # str | Output format of the requested report file
name = 'Identities Details Report' # str | preferred Report file name, by default will be used report name from task result. (optional) # str | preferred Report file name, by default will be used report name from task result. (optional)
auditable = False # bool | Enables auditing for current report download. Will create an audit event and sent it to the REPORT cloud-audit kafka topic. Event will be created if there is any result present by requested taskResultId. (optional) (default to False) # bool | Enables auditing for current report download. Will create an audit event and sent it to the REPORT cloud-audit kafka topic. Event will be created if there is any result present by requested taskResultId. (optional) (default to False)

try:
# Get Report File

results = ReportsDataExtractionApi(api_client).get_report(task_result_id=task_result_id, file_format=file_format)
# Below is a request that includes all optional parameters
# results = ReportsDataExtractionApi(api_client).get_report(task_result_id, file_format, name, auditable)
print("The response of ReportsDataExtractionApi->get_report:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling ReportsDataExtractionApi->get_report: %s\n" % e)

[Back to top]

get-report-result

Get Report Result Get the report results for a report that was run or is running. Returns empty report result in case there are no active task definitions with used in payload task definition name.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Pathtask_result_idstrTrueUnique identifier of the task result which handled report
Querycompletedbool(optional) (default to False)state of task result to apply ordering when results are fetching from the DB

Return type

ReportResults

Responses

CodeDescriptionData TypeResponse headers
200Details about report that was run or is running.ReportResults-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

from sailpoint.v3.api.reports_data_extraction_api import ReportsDataExtractionApi
from sailpoint.v3.api_client import ApiClient
from sailpoint.v3.models.report_results import ReportResults
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
task_result_id = 'ef38f94347e94562b5bb8424a56397d8' # str | Unique identifier of the task result which handled report # str | Unique identifier of the task result which handled report
completed = False # bool | state of task result to apply ordering when results are fetching from the DB (optional) (default to False) # bool | state of task result to apply ordering when results are fetching from the DB (optional) (default to False)

try:
# Get Report Result

results = ReportsDataExtractionApi(api_client).get_report_result(task_result_id=task_result_id)
# Below is a request that includes all optional parameters
# results = ReportsDataExtractionApi(api_client).get_report_result(task_result_id, completed)
print("The response of ReportsDataExtractionApi->get_report_result:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling ReportsDataExtractionApi->get_report_result: %s\n" % e)

[Back to top]

start-report

Run Report Use this API to run a report according to report input details. If non-concurrent task is already running then it returns, otherwise new task creates and returns.

API Spec

Parameters

Param TypeNameData TypeRequiredDescription
Bodyreport_detailsReportDetailsTrue

Return type

TaskResultDetails

Responses

CodeDescriptionData TypeResponse headers
200Details about running report task.TaskResultDetails-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.ListAccessProfiles401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.ListAccessProfiles429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

from sailpoint.v3.api.reports_data_extraction_api import ReportsDataExtractionApi
from sailpoint.v3.api_client import ApiClient
from sailpoint.v3.models.report_details import ReportDetails
from sailpoint.v3.models.task_result_details import TaskResultDetails
from sailpoint.configuration import Configuration
configuration = Configuration()


with ApiClient(configuration) as api_client:
report_details = '''{
"reportType" : "ACCOUNTS",
"arguments" : {
"application" : "2c9180897e7742b2017e781782f705b9",
"sourceName" : "Active Directory"
}
}''' # ReportDetails |

try:
# Run Report
new_report_details = ReportDetails.from_json(report_details)
results = ReportsDataExtractionApi(api_client).start_report(report_details=new_report_details)
# Below is a request that includes all optional parameters
# results = ReportsDataExtractionApi(api_client).start_report(new_report_details)
print("The response of ReportsDataExtractionApi->start_report:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling ReportsDataExtractionApi->start_report: %s\n" % e)

[Back to top]