sailpoint.v2024.AccessRequestApprovalsApi
Use this API to implement and customize access request approval functionality.
With this functionality in place, administrators can delegate qualified users to review users' requests for access or managers' requests to revoke team members' access to applications, entitlements, or roles.
This enables more qualified users to review access requests and the others to spend their time on other tasks.
In Identity Security Cloud, users can request access to applications, entitlements, and roles, and managers can request that team members' access be revoked.
For applications and entitlements, administrators can set access profiles to require approval from the access profile owner, the application owner, the source owner, the requesting user's manager, or a governance group for access to be granted or revoked.
For roles, administrators can also set roles to allow access requests and require approval from the role owner, the requesting user's manager, or a governance group for access to be granted or revoked.
If the administrator designates a governance group as the required approver, any governance group member can approve the requests.
When a user submits an access request, Identity Security Cloud sends the first required approver in the queue an email notification, based on the access request configuration's approval and reminder escalation configuration.
In Approvals in Identity Security Cloud, required approvers can view pending access requests under the Requested tab and approve or deny them, or the approvers can reassign the requests to different reviewers for approval.
If the required approver approves the request and is the only reviewer required, Identity Security Cloud grants or revokes access, based on the request.
If multiple reviewers are required, Identity Security Cloud sends the request to the next reviewer in the queue, based on the access request configuration's approval reminder and escalation configuration.
The required approver can then view any completed access requests under the Reviewed tab.
Refer to Access Requests for more information about access request approvals.
All URIs are relative to https://sailpoint.api.identitynow.com/v2024
Method | HTTP request | Description |
---|---|---|
approve-access-request | POST /access-request-approvals/{approvalId}/approve | Approve Access Request Approval |
forward-access-request | POST /access-request-approvals/{approvalId}/forward | Forward Access Request Approval |
get-access-request-approval-summary | GET /access-request-approvals/approval-summary | Get Access Requests Approvals Number |
list-access-request-approvers | GET /access-request-approvals/{accessRequestId}/approvers | Access Request Approvers |
list-completed-approvals | GET /access-request-approvals/completed | Completed Access Request Approvals List |
list-pending-approvals | GET /access-request-approvals/pending | Pending Access Request Approvals List |
reject-access-request | POST /access-request-approvals/{approvalId}/reject | Reject Access Request Approval |
approve-access-request
Approve Access Request Approval Use this endpoint to approve an access request approval. Only the owner of the approval and ORG_ADMIN users are allowed to perform this action.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Path | approval_id | str | True | Approval ID. |
Body | comment_dto | CommentDto | (optional) | Reviewer's comment. |
Return type
object
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
202 | Accepted - Returned if the request was successfully accepted into the system. | object | - |
400 | 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. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | 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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.comment_dto import CommentDto
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
approval_id = '2c91808b7294bea301729568c68c002e' # str | Approval ID. # str | Approval ID.
comment_dto = '''{
"created" : "2017-07-11T18:45:37.098Z",
"author" : {
"name" : "john.doe",
"id" : "2c9180847e25f377017e2ae8cae4650b",
"type" : "IDENTITY"
},
"comment" : "This is a comment."
}''' # CommentDto | Reviewer's comment. (optional)
try:
# Approve Access Request Approval
results = AccessRequestApprovalsApi(api_client).approve_access_request(approval_id=approval_id)
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).approve_access_request(approval_id, new_comment_dto)
print("The response of AccessRequestApprovalsApi->approve_access_request:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->approve_access_request: %s\n" % e)
forward-access-request
Forward Access Request Approval Use this API to forward an access request approval to a new owner. Only the owner of the approval and ORG_ADMIN users are allowed to perform this action. Only the owner of the approval and ORG_ADMIN users are allowed to perform this action.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Path | approval_id | str | True | Approval ID. |
Body | forward_approval_dto | ForwardApprovalDto | True | Information about the forwarded approval. |
Return type
object
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
202 | Accepted - Returned if the request was successfully accepted into the system. | object | - |
400 | 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. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | 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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.forward_approval_dto import ForwardApprovalDto
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
approval_id = '2c91808b7294bea301729568c68c002e' # str | Approval ID. # str | Approval ID.
forward_approval_dto = '''{
"newOwnerId" : "2c91808568c529c60168cca6f90c1314",
"comment" : "2c91808568c529c60168cca6f90c1313"
}''' # ForwardApprovalDto | Information about the forwarded approval.
try:
# Forward Access Request Approval
new_forward_approval_dto = ForwardApprovalDto.from_json(forward_approval_dto)
results = AccessRequestApprovalsApi(api_client).forward_access_request(approval_id=approval_id, forward_approval_dto=new_forward_approval_dto)
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).forward_access_request(approval_id, new_forward_approval_dto)
print("The response of AccessRequestApprovalsApi->forward_access_request:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->forward_access_request: %s\n" % e)
get-access-request-approval-summary
Get Access Requests Approvals Number Use this API to return the number of pending, approved and rejected access requests approvals. See the "owner-id" query parameter for authorization information. info.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Query | owner_id | str | (optional) | The ID of the owner or approver identity of the approvals. If present, the value returns approval summary for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN user can also fetch all the approvals in the org, when owner-id is not used. * Non ORG_ADMIN users can only specify me or pass their own identity ID value. |
Query | from_date | str | (optional) | This is the date and time the results will be shown from. It must be in a valid ISO-8601 format. |
Return type
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
200 | Number of pending, approved, rejected access request approvals. | ApprovalSummary | - |
400 | Client Error - Returned if the query parameter is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.approval_summary import ApprovalSummary
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
owner_id = '2c91808568c529c60168cca6f90c1313' # str | The ID of the owner or approver identity of the approvals. If present, the value returns approval summary for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN user can also fetch all the approvals in the org, when owner-id is not used. * Non ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # str | The ID of the owner or approver identity of the approvals. If present, the value returns approval summary for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN user can also fetch all the approvals in the org, when owner-id is not used. * Non ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
from_date = 'from-date=2020-03-19T19:59:11Z' # str | This is the date and time the results will be shown from. It must be in a valid ISO-8601 format. (optional) # str | This is the date and time the results will be shown from. It must be in a valid ISO-8601 format. (optional)
try:
# Get Access Requests Approvals Number
results = AccessRequestApprovalsApi(api_client).get_access_request_approval_summary()
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).get_access_request_approval_summary(owner_id, from_date)
print("The response of AccessRequestApprovalsApi->get_access_request_approval_summary:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->get_access_request_approval_summary: %s\n" % e)
list-access-request-approvers
Access Request Approvers This API endpoint returns the list of approvers for the given access request id.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Path | access_request_id | str | True | Access Request ID. |
Query | limit | int | (optional) (default to 250) | Max number of results to return. |
Query | offset | int | (optional) | Offset into the full result set. Usually specified with limit to paginate through the results. Defaults to 0 if not specified. |
Query | count | bool | (optional) (default to False) | If this is true, the X-Total-Count response header populates with the number of results that would be returned if limit and offset were ignored. |
Return type
List[AccessRequestApproversListResponse]
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
200 | List of Approvers. | List[AccessRequestApproversListResponse] | - |
400 | 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. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | 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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.access_request_approvers_list_response import AccessRequestApproversListResponse
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
access_request_id = '2c91808568c529c60168cca6f90c1313' # str | Access Request ID. # str | Access Request ID.
limit = 250 # int | Max number of results to return. (optional) (default to 250) # int | Max number of results to return. (optional) (default to 250)
offset = 10 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. Defaults to 0 if not specified. (optional) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. Defaults to 0 if not specified. (optional)
count = False # bool | If this is true, the *X-Total-Count* response header populates with the number of results that would be returned if limit and offset were ignored. (optional) (default to False) # bool | If this is true, the *X-Total-Count* response header populates with the number of results that would be returned if limit and offset were ignored. (optional) (default to False)
try:
# Access Request Approvers
results = AccessRequestApprovalsApi(api_client).list_access_request_approvers(access_request_id=access_request_id)
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).list_access_request_approvers(access_request_id, limit, offset, count)
print("The response of AccessRequestApprovalsApi->list_access_request_approvers:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->list_access_request_approvers: %s\n" % e)
list-completed-approvals
Completed Access Request Approvals List This endpoint returns list of completed approvals. See owner-id query parameter below for authorization info.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Query | owner_id | str | (optional) | If present, the value returns only completed approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify me or pass their own identity ID value. |
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Query | count | bool | (optional) (default to False) | If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information. |
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: id: eq, in, ge, gt, le, lt, ne, isnull, sw requestedFor.id: eq, in, ge, gt, le, lt, ne, isnull, sw modified: gt, lt, ge, le, eq, in, ne, sw |
Query | sorters | str | (optional) | Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: created, modified |
Return type
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
200 | List of Completed Approvals. | List[CompletedApproval] | - |
400 | 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. | ListAccessProfiles401Response | - |
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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.completed_approval import CompletedApproval
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
owner_id = '2c91808568c529c60168cca6f90c1313' # str | If present, the value returns only completed approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # str | If present, the value returns only completed approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
limit = 250 # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
filters = 'id eq \"2c91808568c529c60168cca6f90c1313\"' # 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: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **requestedFor.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, sw* (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: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **requestedFor.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, sw* (optional)
sorters = 'modified' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
try:
# Completed Access Request Approvals List
results = AccessRequestApprovalsApi(api_client).list_completed_approvals()
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).list_completed_approvals(owner_id, limit, offset, count, filters, sorters)
print("The response of AccessRequestApprovalsApi->list_completed_approvals:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->list_completed_approvals: %s\n" % e)
list-pending-approvals
Pending Access Request Approvals List This endpoint returns a list of pending approvals. See "owner-id" query parameter below for authorization info.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Query | owner_id | str | (optional) | If present, the value returns only pending approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify me or pass their own identity ID value. |
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Query | count | bool | (optional) (default to False) | If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information. |
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: id: eq, in requestedFor.id: eq, in modified: gt, lt, ge, le, eq, in accessRequestId: eq, in |
Query | sorters | str | (optional) | Sort results using the standard syntax described in V3 API Standard Collection Parameters Sorting is supported for the following fields: created, modified |
Return type
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
200 | List of Pending Approvals. | List[PendingApproval] | - |
400 | 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. | ListAccessProfiles401Response | - |
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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.pending_approval import PendingApproval
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
owner_id = '2c91808568c529c60168cca6f90c1313' # str | If present, the value returns only pending approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # str | If present, the value returns only pending approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
limit = 250 # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to False)
filters = 'id eq \"2c91808568c529c60168cca6f90c1313\"' # 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: **id**: *eq, in* **requestedFor.id**: *eq, in* **modified**: *gt, lt, ge, le, eq, in* **accessRequestId**: *eq, in* (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: **id**: *eq, in* **requestedFor.id**: *eq, in* **modified**: *gt, lt, ge, le, eq, in* **accessRequestId**: *eq, in* (optional)
sorters = 'modified' # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # str | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
try:
# Pending Access Request Approvals List
results = AccessRequestApprovalsApi(api_client).list_pending_approvals()
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).list_pending_approvals(owner_id, limit, offset, count, filters, sorters)
print("The response of AccessRequestApprovalsApi->list_pending_approvals:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->list_pending_approvals: %s\n" % e)
reject-access-request
Reject Access Request Approval Use this API to reject an access request approval. Only the owner of the approval and admin users are allowed to perform this action.
Parameters
Param Type | Name | Data Type | Required | Description |
---|---|---|---|---|
Path | approval_id | str | True | Approval ID. |
Body | comment_dto | CommentDto | True | Reviewer's comment. |
Return type
object
Responses
Code | Description | Data Type | Response headers |
---|---|---|---|
202 | Accepted - Returned if the request was successfully accepted into the system. | object | - |
400 | 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. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | 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. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.access_request_approvals_api import AccessRequestApprovalsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.comment_dto import CommentDto
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
approval_id = '2c91808b7294bea301729568c68c002e' # str | Approval ID. # str | Approval ID.
comment_dto = '''{
"created" : "2017-07-11T18:45:37.098Z",
"author" : {
"name" : "john.doe",
"id" : "2c9180847e25f377017e2ae8cae4650b",
"type" : "IDENTITY"
},
"comment" : "This is a comment."
}''' # CommentDto | Reviewer's comment.
try:
# Reject Access Request Approval
new_comment_dto = CommentDto.from_json(comment_dto)
results = AccessRequestApprovalsApi(api_client).reject_access_request(approval_id=approval_id, comment_dto=new_comment_dto)
# Below is a request that includes all optional parameters
# results = AccessRequestApprovalsApi(api_client).reject_access_request(approval_id, new_comment_dto)
print("The response of AccessRequestApprovalsApi->reject_access_request:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling AccessRequestApprovalsApi->reject_access_request: %s\n" % e)