mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 12:27:47 +00:00
Update python SDK docs: 16633304233
This commit is contained in:
@@ -1,148 +0,0 @@
|
||||
---
|
||||
id: beta-approvals
|
||||
title: Approvals
|
||||
pagination_label: Approvals
|
||||
sidebar_label: Approvals
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'Approvals', 'BetaApprovals']
|
||||
slug: /tools/sdk/python/beta/methods/approvals
|
||||
tags: ['SDK', 'Software Development Kit', 'Approvals', 'BetaApprovals']
|
||||
---
|
||||
|
||||
# sailpoint.beta.ApprovalsApi
|
||||
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](https://developer.sailpoint.com/docs/api/beta/access-request-approvals) are that you can use it to get generic approvals individually or in batches and make changes to those approvals.
|
||||
|
||||
All URIs are relative to *https://sailpoint.api.identitynow.com/beta*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get-approval**](#get-approval) | **GET** `/generic-approvals/{id}` | Get approval
|
||||
[**get-approvals**](#get-approvals) | **GET** `/generic-approvals` | Get approvals
|
||||
|
||||
|
||||
## get-approval
|
||||
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.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/beta/get-approval)
|
||||
|
||||
### Parameters
|
||||
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Path | id | **str** | True | ID of the approval that to be returned.
|
||||
|
||||
### Return type
|
||||
[**Approval**](../models/approval)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type | Response headers |
|
||||
------------- | ------------- | ------------- |------------------|
|
||||
200 | Approval object | Approval | - |
|
||||
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. | 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
|
||||
|
||||
```python
|
||||
from sailpoint.beta.api.approvals_api import ApprovalsApi
|
||||
from sailpoint.beta.api_client import ApiClient
|
||||
from sailpoint.beta.models.approval import Approval
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_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 approval
|
||||
|
||||
results = 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")
|
||||
print(results.model_dump_json(by_alias=True, indent=4))
|
||||
except Exception as e:
|
||||
print("Exception when calling ApprovalsApi->get_approval: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## get-approvals
|
||||
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.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/beta/get-approvals)
|
||||
|
||||
### Parameters
|
||||
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
Query | mine | **bool** | (optional) | 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](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **status**: *eq* **referenceType**: *eq*
|
||||
|
||||
### Return type
|
||||
[**List[Approval]**](../models/approval)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type | Response headers |
|
||||
------------- | ------------- | ------------- |------------------|
|
||||
200 | List of approvals. | List[Approval] | - |
|
||||
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. | 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
|
||||
|
||||
```python
|
||||
from sailpoint.beta.api.approvals_api import ApprovalsApi
|
||||
from sailpoint.beta.api_client import ApiClient
|
||||
from sailpoint.beta.models.approval import Approval
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_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 approvals
|
||||
|
||||
results = 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")
|
||||
for item in results:
|
||||
print(item.model_dump_json(by_alias=True, indent=4))
|
||||
except Exception as e:
|
||||
print("Exception when calling ApprovalsApi->get_approvals: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
---
|
||||
id: beta-approval
|
||||
title: Approval
|
||||
pagination_label: Approval
|
||||
sidebar_label: Approval
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'Approval', 'BetaApproval']
|
||||
slug: /tools/sdk/python/beta/models/approval
|
||||
tags: ['SDK', 'Software Development Kit', 'Approval', 'BetaApproval']
|
||||
---
|
||||
|
||||
# Approval
|
||||
|
||||
Approval Object
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**approval_id** | **str** | The Approval ID | [optional]
|
||||
**approvers** | [**[]ApprovalIdentity**](approval-identity) | Object representation of an approver of an approval | [optional]
|
||||
**created_date** | **str** | Date the approval was created | [optional]
|
||||
**type** | **str** | Type of approval | [optional]
|
||||
**name** | [**[]ApprovalName**](approval-name) | The name of the approval for a given locale | [optional]
|
||||
**batch_request** | [**ApprovalBatch**](approval-batch) | The name of the approval for a given locale | [optional]
|
||||
**description** | [**[]ApprovalDescription**](approval-description) | The description of the approval for a given locale | [optional]
|
||||
**priority** | **Enum** [ 'HIGH', 'MEDIUM', 'LOW' ] | The priority of the approval | [optional]
|
||||
**requester** | [**ApprovalIdentity**](approval-identity) | Object representation of the requester of the approval | [optional]
|
||||
**comments** | [**[]ApprovalComment**](approval-comment) | Object representation of a comment on the approval | [optional]
|
||||
**approved_by** | [**[]ApprovalIdentity**](approval-identity) | Array of approvers who have approved the approval | [optional]
|
||||
**rejected_by** | [**[]ApprovalIdentity**](approval-identity) | Array of approvers who have rejected the approval | [optional]
|
||||
**completed_date** | **str** | Date the approval was completed | [optional]
|
||||
**approval_criteria** | **Enum** [ 'SINGLE', 'DOUBLE', 'TRIPLE', 'QUARTER', 'HALF', 'ALL' ] | Criteria that needs to be met for an approval to be marked as approved | [optional]
|
||||
**status** | **Enum** [ 'PENDING', 'APPROVED', 'REJECTED' ] | The current status of the approval | [optional]
|
||||
**additional_attributes** | **str** | Json string representing additional attributes known about the object to be approved. | [optional]
|
||||
**reference_data** | [**[]ApprovalReference**](approval-reference) | Reference data related to the approval | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval import Approval
|
||||
|
||||
approval = Approval(
|
||||
approval_id='38453251-6be2-5f8f-df93-5ce19e295837',
|
||||
approvers=[
|
||||
sailpoint.beta.models.approval_identity.Approval Identity(
|
||||
id = '85d173e7d57e496569df763231d6deb6a',
|
||||
type = 'IDENTITY',
|
||||
name = 'John Doe', )
|
||||
],
|
||||
created_date='2023-04-12T23:20:50.52Z',
|
||||
type='ENTITLEMENT_DESCRIPTIONS',
|
||||
name=[
|
||||
sailpoint.beta.models.approval_name.Approval Name(
|
||||
value = 'Audit DB Access',
|
||||
locale = 'en_US', )
|
||||
],
|
||||
batch_request={batchId=38453251-6be2-5f8f-df93-5ce19e295837, batchSize=100},
|
||||
description=[
|
||||
sailpoint.beta.models.approval_description.Approval Description(
|
||||
value = 'This access allows viewing and editing of workflow resource',
|
||||
locale = 'en_US', )
|
||||
],
|
||||
priority='HIGH',
|
||||
requester={id=85d173e7d57e496569df763231d6deb6a, type=IDENTITY, name=John Doe},
|
||||
comments=[
|
||||
sailpoint.beta.models.approval_comment.Approval Comment(
|
||||
author = sailpoint.beta.models.approval_identity.Approval Identity(
|
||||
id = '85d173e7d57e496569df763231d6deb6a',
|
||||
type = 'IDENTITY',
|
||||
name = 'John Doe', ),
|
||||
comment = 'Looks good',
|
||||
created_date = '2023-04-12T23:20:50.52Z', )
|
||||
],
|
||||
approved_by=[
|
||||
sailpoint.beta.models.approval_identity.Approval Identity(
|
||||
id = '85d173e7d57e496569df763231d6deb6a',
|
||||
type = 'IDENTITY',
|
||||
name = 'John Doe', )
|
||||
],
|
||||
rejected_by=[
|
||||
sailpoint.beta.models.approval_identity.Approval Identity(
|
||||
id = '85d173e7d57e496569df763231d6deb6a',
|
||||
type = 'IDENTITY',
|
||||
name = 'John Doe', )
|
||||
],
|
||||
completed_date='2023-04-12T23:20:50.52Z',
|
||||
approval_criteria='SINGLE',
|
||||
status='PENDING',
|
||||
additional_attributes='{ "llm_description": "generated description" }',
|
||||
reference_data=[
|
||||
sailpoint.beta.models.approval_reference.Approval Reference(
|
||||
id = '64012350-8fd9-4f6c-a170-1fe123683899',
|
||||
type = 'AccessRequestId', )
|
||||
]
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
id: beta-approval-batch
|
||||
title: ApprovalBatch
|
||||
pagination_label: ApprovalBatch
|
||||
sidebar_label: ApprovalBatch
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalBatch', 'BetaApprovalBatch']
|
||||
slug: /tools/sdk/python/beta/models/approval-batch
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalBatch', 'BetaApprovalBatch']
|
||||
---
|
||||
|
||||
# ApprovalBatch
|
||||
|
||||
Batch properties if an approval is sent via batching.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**batch_id** | **str** | ID of the batch | [optional]
|
||||
**batch_size** | **int** | How many approvals are going to be in this batch. Defaults to 1 if not provided. | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_batch import ApprovalBatch
|
||||
|
||||
approval_batch = ApprovalBatch(
|
||||
batch_id='38453251-6be2-5f8f-df93-5ce19e295837',
|
||||
batch_size=100
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
id: beta-approval-comment
|
||||
title: ApprovalComment
|
||||
pagination_label: ApprovalComment
|
||||
sidebar_label: ApprovalComment
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalComment', 'BetaApprovalComment']
|
||||
slug: /tools/sdk/python/beta/models/approval-comment
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalComment', 'BetaApprovalComment']
|
||||
---
|
||||
|
||||
# ApprovalComment
|
||||
|
||||
Comments Object
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**author** | [**ApprovalIdentity**](approval-identity) | | [optional]
|
||||
**comment** | **str** | Comment to be left on an approval | [optional]
|
||||
**created_date** | **str** | Date the comment was created | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_comment import ApprovalComment
|
||||
|
||||
approval_comment = ApprovalComment(
|
||||
author=sailpoint.beta.models.approval_identity.Approval Identity(
|
||||
id = '85d173e7d57e496569df763231d6deb6a',
|
||||
type = 'IDENTITY',
|
||||
name = 'John Doe', ),
|
||||
comment='Looks good',
|
||||
created_date='2023-04-12T23:20:50.52Z'
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
id: beta-approval-description
|
||||
title: ApprovalDescription
|
||||
pagination_label: ApprovalDescription
|
||||
sidebar_label: ApprovalDescription
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalDescription', 'BetaApprovalDescription']
|
||||
slug: /tools/sdk/python/beta/models/approval-description
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalDescription', 'BetaApprovalDescription']
|
||||
---
|
||||
|
||||
# ApprovalDescription
|
||||
|
||||
The description of what the approval is asking for
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | The description of what the approval is asking for | [optional]
|
||||
**locale** | **str** | What locale the description of the approval is using | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_description import ApprovalDescription
|
||||
|
||||
approval_description = ApprovalDescription(
|
||||
value='This access allows viewing and editing of workflow resource',
|
||||
locale='en_US'
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
id: beta-approval-identity
|
||||
title: ApprovalIdentity
|
||||
pagination_label: ApprovalIdentity
|
||||
sidebar_label: ApprovalIdentity
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalIdentity', 'BetaApprovalIdentity']
|
||||
slug: /tools/sdk/python/beta/models/approval-identity
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalIdentity', 'BetaApprovalIdentity']
|
||||
---
|
||||
|
||||
# ApprovalIdentity
|
||||
|
||||
Identity Object
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | The identity ID | [optional]
|
||||
**type** | **Enum** [ 'IDENTITY' ] | Indication of what group the identity belongs to. Ie, IDENTITY, GOVERNANCE_GROUP, etc | [optional]
|
||||
**name** | **str** | Name of the identity | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_identity import ApprovalIdentity
|
||||
|
||||
approval_identity = ApprovalIdentity(
|
||||
id='85d173e7d57e496569df763231d6deb6a',
|
||||
type='IDENTITY',
|
||||
name='John Doe'
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
id: beta-approval-name
|
||||
title: ApprovalName
|
||||
pagination_label: ApprovalName
|
||||
sidebar_label: ApprovalName
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalName', 'BetaApprovalName']
|
||||
slug: /tools/sdk/python/beta/models/approval-name
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalName', 'BetaApprovalName']
|
||||
---
|
||||
|
||||
# ApprovalName
|
||||
|
||||
Approval Name Object
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**value** | **str** | Name of the approval | [optional]
|
||||
**locale** | **str** | What locale the name of the approval is using | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_name import ApprovalName
|
||||
|
||||
approval_name = ApprovalName(
|
||||
value='Audit DB Access',
|
||||
locale='en_US'
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
id: beta-approval-reference
|
||||
title: ApprovalReference
|
||||
pagination_label: ApprovalReference
|
||||
sidebar_label: ApprovalReference
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'ApprovalReference', 'BetaApprovalReference']
|
||||
slug: /tools/sdk/python/beta/models/approval-reference
|
||||
tags: ['SDK', 'Software Development Kit', 'ApprovalReference', 'BetaApprovalReference']
|
||||
---
|
||||
|
||||
# ApprovalReference
|
||||
|
||||
Reference objects related to the approval
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | Id of the reference object | [optional]
|
||||
**type** | **str** | What reference object does this ID correspond to | [optional]
|
||||
}
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from sailpoint.beta.models.approval_reference import ApprovalReference
|
||||
|
||||
approval_reference = ApprovalReference(
|
||||
id='64012350-8fd9-4f6c-a170-1fe123683899',
|
||||
type='AccessRequestId'
|
||||
)
|
||||
|
||||
```
|
||||
[[Back to top]](#)
|
||||
|
||||
Reference in New Issue
Block a user