Use this API to implement approval functionality. With this functionality in place, you can get generic approvals and modify them.
The main advantages this API has vs Access Request Approvals are that you can use it to get generic approvals individually or in batches and make changes to those approvals.
Get Approval
Get a single approval for a given approval ID. This endpoint is for generic approvals, unlike the access-request-approval endpoint, and doesn't include access-request-approvals.
Client Error - Returned if the request body is invalid.
ErrorResponseDto
-
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
-
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
-
429
Too 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.
ListAccessModelMetadataAttribute429Response
-
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
-
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
fromsailpoint.beta.api.approvals_apiimportApprovalsApifromsailpoint.beta.api_clientimportApiClientfromsailpoint.beta.models.approvalimportApprovalfrompprintimportpprintfromsailpoint.configurationimportConfigurationconfiguration=Configuration()withApiClient(configuration)asapi_client:id='38453251-6be2-5f8f-df93-5ce19e295837'# str | ID of the approval that to be returned. # str | ID of the approval that to be returned.try:# Get Approvalresults=ApprovalsApi(api_client).get_approval(id=id)# Below is a request that includes all optional parameters# results = ApprovalsApi(api_client).get_approval(id)print("The response of ApprovalsApi->get_approval:\n")pprint(results)exceptExceptionase:print("Exception when calling ApprovalsApi->get_approval: %s\n"%e)
Get Approvals
Get a list of approvals, which can be filtered by requester ID, status, or reference type. You can use the "Mine" query parameter to return all approvals for the current approver. This endpoint is for generic approvals, unlike the access-request-approval endpoint, and does not include access-request-approvals.
Absence of all query parameters will will default to mine=true.
Returns the list of approvals for the current caller.
Query
requester_id
str
(optional)
Returns the list of approvals for a given requester ID.
Query
filters
str
(optional)
Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: status: eqreferenceType: eq
Client Error - Returned if the request body is invalid.
ErrorResponseDto
-
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
-
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
-
429
Too 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.
ListAccessModelMetadataAttribute429Response
-
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
-
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
fromsailpoint.beta.api.approvals_apiimportApprovalsApifromsailpoint.beta.api_clientimportApiClientfromsailpoint.beta.models.approvalimportApprovalfrompprintimportpprintfromsailpoint.configurationimportConfigurationconfiguration=Configuration()withApiClient(configuration)asapi_client:mine=true# bool | Returns the list of approvals for the current caller. (optional) # bool | Returns the list of approvals for the current caller. (optional)requester_id='17e633e7d57e481569df76323169deb6a'# str | Returns the list of approvals for a given requester ID. (optional) # str | Returns the list of approvals for a given requester ID. (optional)filters='filters=status eq PENDING'# str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **status**: *eq* **referenceType**: *eq* (optional) # str | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **status**: *eq* **referenceType**: *eq* (optional)try:# Get Approvalsresults=ApprovalsApi(api_client).get_approvals()# Below is a request that includes all optional parameters# results = ApprovalsApi(api_client).get_approvals(mine, requester_id, filters)print("The response of ApprovalsApi->get_approvals:\n")pprint(results)exceptExceptionase:print("Exception when calling ApprovalsApi->get_approvals: %s\n"%e)