### Python Example: Instantiate CampaignAllOfMachineAccountCampaignInfo Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Models/CampaignAllOfMachineAccountCampaignInfo.md Demonstrates how to import and create an instance of the `CampaignAllOfMachineAccountCampaignInfo` class in Python. The example shows how to set values for `source_ids` and `reviewer_type`. ```python from sailpoint.v2025.models.campaign_all_of_machine_account_campaign_info import CampaignAllOfMachineAccountCampaignInfo campaign_all_of_machine_account_campaign_info = CampaignAllOfMachineAccountCampaignInfo( source_ids=[0fbe863c063c4c88a35fd7f17e8a3df5], reviewer_type='ACCOUNT_OWNER' ) ``` -------------------------------- ### Python Example: Get Access Request Recommendations Config Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Methods/IAIAccessRequestRecommendationsApi.md Provides a complete Python example demonstrating how to call the `get_access_request_recommendations_config` API endpoint. It includes SDK configuration for experimental APIs, API client setup, and response handling. ```python from sailpoint.v2025.api.iai_access_request_recommendations_api import IAIAccessRequestRecommendationsApi from sailpoint.v2025.api_client import ApiClient from sailpoint.v2025.models.access_request_recommendation_config_dto import AccessRequestRecommendationConfigDto from sailpoint.configuration import Configuration configuration = Configuration() configuration.experimental = True with ApiClient(configuration) as api_client: x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (default to 'true') # str | Use this header to enable this experimental API. (default to 'true') try: # Get access request recommendations config results = IAIAccessRequestRecommendationsApi(api_client).get_access_request_recommendations_config(x_sail_point_experimental=x_sail_point_experimental) # Below is a request that includes all optional parameters # results = IAIAccessRequestRecommendationsApi(api_client).get_access_request_recommendations_config(x_sail_point_experimental) print("The response of IAIAccessRequestRecommendationsApi->get_access_request_recommendations_config:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling IAIAccessRequestRecommendationsApi->get_access_request_recommendations_config: %s\n" % e) ``` -------------------------------- ### Python Example: Instantiate ManualDiscoverApplicationsTemplate Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/ManualDiscoverApplicationsTemplate.md Demonstrates how to create an instance of the ManualDiscoverApplicationsTemplate class in Python, setting its application_name and description properties. This example shows basic usage of the model. ```python from sailpoint.beta.models.manual_discover_applications_template import ManualDiscoverApplicationsTemplate manual_discover_applications_template = ManualDiscoverApplicationsTemplate( application_name='Example Application', description='Example Description' ) ``` -------------------------------- ### Python Example: Get Auth Profile Configuration Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/AuthProfileApi.md Demonstrates how to use the SailPoint Python SDK to retrieve a single authentication profile by its ID using the `get_profile_config` method. This example shows basic setup, API client initialization, and error handling. ```python from sailpoint.beta.api.auth_profile_api import AuthProfileApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.auth_profile import AuthProfile from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: id = '2c91808a7813090a017814121919ecca' # str | ID of the Auth Profile to get. # str | ID of the Auth Profile to get. try: # Get auth profile. results = AuthProfileApi(api_client).get_profile_config(id=id) # Below is a request that includes all optional parameters # results = AuthProfileApi(api_client).get_profile_config(id) print("The response of AuthProfileApi->get_profile_config:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling AuthProfileApi->get_profile_config: %s\n" % e) ``` -------------------------------- ### Python Example for CampaignAllOfSourceOwnerCampaignInfo Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Models/CampaignAllOfSourceOwnerCampaignInfo.md Demonstrates how to instantiate the `CampaignAllOfSourceOwnerCampaignInfo` model in Python. This example shows the necessary import and how to pass a list of source IDs during object creation. ```python from sailpoint.v3.models.campaign_all_of_source_owner_campaign_info import CampaignAllOfSourceOwnerCampaignInfo campaign_all_of_source_owner_campaign_info = CampaignAllOfSourceOwnerCampaignInfo( source_ids=[0fbe863c063c4c88a35fd7f17e8a3df5] ) ``` -------------------------------- ### Python Example: Get a Single Account Activity Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Methods/AccountActivitiesApi.md Demonstrates how to use the SailPoint Python SDK to retrieve a specific account activity by its ID. It shows basic API client setup, making a GET request, and printing the JSON response, including error handling. ```python from sailpoint.v2024.api.account_activities_api import AccountActivitiesApi from sailpoint.v2024.api_client import ApiClient from sailpoint.v2024.models.account_activity import AccountActivity from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: id = 'ef38f94347e94562b5bb8424a56397d8' # str | The account activity id # str | The account activity id try: # Get an account activity results = AccountActivitiesApi(api_client).get_account_activity(id=id) # Below is a request that includes all optional parameters # results = AccountActivitiesApi(api_client).get_account_activity(id) print("The response of AccountActivitiesApi->get_account_activity:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling AccountActivitiesApi->get_account_activity: %s\n" % e) ``` -------------------------------- ### Python Example: Initialize CampaignAllOfRoleCompositionCampaignInfo Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Models/CampaignAllOfRoleCompositionCampaignInfo.md Demonstrates how to create an instance of the `CampaignAllOfRoleCompositionCampaignInfo` class in Python, populating its properties with example values, including nested objects like reviewer and remediator_ref. ```python from sailpoint.v3.models.campaign_all_of_role_composition_campaign_info import CampaignAllOfRoleCompositionCampaignInfo campaign_all_of_role_composition_campaign_info = CampaignAllOfRoleCompositionCampaignInfo( reviewer=sailpoint.v3.models.campaign_all_of_search_campaign_info_reviewer.Campaign_allOf_searchCampaignInfo_reviewer( type = 'IDENTITY', id = '2c91808568c529c60168cca6f90c1313', name = 'William Wilson', ), role_ids=[2c90ad2a70ace7d50170acf22ca90010], remediator_ref=sailpoint.v3.models.campaign_all_of_role_composition_campaign_info_remediator_ref.Campaign_allOf_roleCompositionCampaignInfo_remediatorRef( type = 'IDENTITY', id = '2c90ad2a70ace7d50170acf22ca90010', name = 'Role Admin', ), query='Search Query', description='Role Composition Description' ) ``` -------------------------------- ### Python Example: Retrieve Identity Start Date Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/IdentityHistoryApi.md This Python code snippet demonstrates how to use the SailPoint SDK to fetch the start date of a specific identity. It illustrates the setup of the API client, making the `get_identity_start_date` call with an identity ID, and handling potential exceptions during the API interaction. ```python from sailpoint.beta.api.identity_history_api import IdentityHistoryApi from sailpoint.beta.api_client import ApiClient from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: id = '8c190e6787aa4ed9a90bd9d5344523fb' # str | The identity id # str | The identity id try: # Gets the start date of the identity results = IdentityHistoryApi(api_client).get_identity_start_date(id=id) # Below is a request that includes all optional parameters # results = IdentityHistoryApi(api_client).get_identity_start_date(id) print("The response of IdentityHistoryApi->get_identity_start_date:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling IdentityHistoryApi->get_identity_start_date: %s\n" % e) ``` -------------------------------- ### Python Example: List Provisioning Policies Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/SourcesApi.md Demonstrates how to use the SailPoint Python SDK to list provisioning policies for a given source ID. This example initializes the API client, calls the `list_provisioning_policies` method, and prints the results or any exceptions encountered during the API call. ```python from sailpoint.beta.api.sources_api import SourcesApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.provisioning_policy_dto import ProvisioningPolicyDto from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: source_id = '2c9180835d191a86015d28455b4a2329' # str | The Source id # str | The Source id try: # Lists provisioningpolicies results = SourcesApi(api_client).list_provisioning_policies(source_id=source_id) # Below is a request that includes all optional parameters # results = SourcesApi(api_client).list_provisioning_policies(source_id) print("The response of SourcesApi->list_provisioning_policies:\n") for item in results: print(item.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling SourcesApi->list_provisioning_policies: %s\n" % e) ``` -------------------------------- ### Python Example for Get Identity Start Date Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Methods/IdentityHistoryApi.md Demonstrates how to use the SailPoint Python SDK to call the `get_identity_start_date` API. It shows configuration for experimental APIs, setting parameters, and handling the API response or exceptions. ```python from sailpoint.v2024.api.identity_history_api import IdentityHistoryApi from sailpoint.v2024.api_client import ApiClient from sailpoint.configuration import Configuration configuration = Configuration() configuration.experimental = True with ApiClient(configuration) as api_client: id = '8c190e6787aa4ed9a90bd9d5344523fb' # str | The identity id # str | The identity id x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (default to 'true') # str | Use this header to enable this experimental API. (default to 'true') try: # Gets the start date of the identity results = IdentityHistoryApi(api_client).get_identity_start_date(id=id, x_sail_point_experimental=x_sail_point_experimental) # Below is a request that includes all optional parameters # results = IdentityHistoryApi(api_client).get_identity_start_date(id, x_sail_point_experimental) print("The response of IdentityHistoryApi->get_identity_start_date:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling IdentityHistoryApi->get_identity_start_date: %s\n" % e) ``` -------------------------------- ### Python Example: Get Tenant Information Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/TenantApi.md This Python code snippet demonstrates how to use the `sailpoint.beta.TenantApi` to fetch tenant information. It shows the setup of the API client, calling the `get_tenant` method, and handling the successful response or any exceptions during the API call. ```python from sailpoint.beta.api.tenant_api import TenantApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.tenant import Tenant from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: try: # Get tenant information. results = TenantApi(api_client).get_tenant() # Below is a request that includes all optional parameters # results = TenantApi(api_client).get_tenant() print("The response of TenantApi->get_tenant:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling TenantApi->get_tenant: %s\n" % e) ``` -------------------------------- ### Python Example: Instantiate TaskDefinitionSummary Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Models/TaskDefinitionSummary.md Demonstrates how to create an instance of the TaskDefinitionSummary class in Python. This example shows how to import the class and populate its properties with sample data. ```python from sailpoint.v2024.models.task_definition_summary import TaskDefinitionSummary task_definition_summary = TaskDefinitionSummary( id='2c91808475b4334b0175e1dff64b63c5', unique_name='Cloud Account Aggregation', description='Aggregates from the specified application.', parent_name='Cloud Account Aggregation', executor='sailpoint.task.ServiceTaskExecutor', arguments={'mantisExecutor':'com.sailpoint.mantis.sources.task.AccountAggregationTask', 'eventClassesCsv':'sailpoint.thunderbolt.events.AggregationEvents', 'serviceClass':'sailpoint.thunderbolt.service.AggregationService', 'serviceMethod':'accountAggregationTask'} ) ``` -------------------------------- ### Python Example: Instantiate ProvisioningConfig Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/ProvisioningConfig.md Demonstrates how to create an instance of the ProvisioningConfig class in Python, setting various properties including universal manager, managed resource references, and a plan initializer script. The example includes an embedded XML rule for the initializer script. ```python from sailpoint.beta.models.provisioning_config import ProvisioningConfig provisioning_config = ProvisioningConfig( universal_manager=True, managed_resource_refs=[{type=SOURCE, id=2c9180855d191c59015d291ceb051111, name=My Source 1}, {type=SOURCE, id=2c9180855d191c59015d291ceb052222, name=My Source 2}], plan_initializer_script=sailpoint.beta.models.provisioning_config_plan_initializer_script.ProvisioningConfig_planInitializerScript( source = '<\r><\n><\r><\n><\r><\n> Before Provisioning Rule which changes disables and enables to a modify.<\r><\n> <\n>import sailpoint.object.*;<\r><\n>import sailpoint.object.ProvisioningPlan.AccountRequest;<\r><\n>import sailpoint.object.ProvisioningPlan.AccountRequest.Operation;<\r><\n>import sailpoint.object.ProvisioningPlan.AttributeRequest;<\r><\n>import sailpoint.object.ProvisioningPlan;<\r><\n>import sailpoint.object.ProvisioningPlan.Operation;<\r><\n><\r><\n>for ( AccountRequest accountRequest : plan.getAccountRequests() ) {<\r><\n> if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Disable ) ) {<\r><\n> accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );<\r><\n> }<\r><\n> if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Enable ) ) {<\r><\n> accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );<\r><\n> }<\r><\n>}<\r><\n><\r><\n> ]]><\r><\n>' ), no_provisioning_requests=True, provisioning_request_expiration=7 ) ``` -------------------------------- ### Python Example for AccessRequestPhases Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Models/AccessRequestPhases.md Demonstrates how to create an instance of the `AccessRequestPhases` model in Python, populating its attributes with example values. This example shows a completed approval phase with specific start and finish times, state, and result. ```python from sailpoint.v3.models.access_request_phases import AccessRequestPhases access_request_phases = AccessRequestPhases( started='2020-07-11T00:00Z', finished='2020-07-12T00:00Z', name='APPROVAL_PHASE', state='COMPLETED', result='SUCCESSFUL', phase_reference='approvalDetails' ) ``` -------------------------------- ### Python Example for ProvisioningDetails Object Creation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/ProvisioningDetails.md Demonstrates how to instantiate a ProvisioningDetails object using the SailPoint Python SDK and set its 'ordered_sub_phase_references' property. This example shows basic object initialization. ```python from sailpoint.beta.models.provisioning_details import ProvisioningDetails provisioning_details = ProvisioningDetails( ordered_sub_phase_references='manualWorkItemDetails' ) ``` -------------------------------- ### Python SDK: Get Access Model Metadata Attribute Example Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/AccessModelMetadataApi.md This Python code snippet demonstrates how to use the SailPoint Beta SDK to retrieve a specific access model metadata attribute. It shows the setup of the API client, passing the required `key` parameter, and handling the API response or any exceptions during the call. ```python from sailpoint.beta.api.access_model_metadata_api import AccessModelMetadataApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.attribute_dto import AttributeDTO from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: key = 'iscPrivacy' # str | Technical name of the Attribute. # str | Technical name of the Attribute. try: # Get access model metadata attribute results = AccessModelMetadataApi(api_client).get_access_model_metadata_attribute(key=key) # Below is a request that includes all optional parameters # results = AccessModelMetadataApi(api_client).get_access_model_metadata_attribute(key) print("The response of AccessModelMetadataApi->get_access_model_metadata_attribute:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling AccessModelMetadataApi->get_access_model_metadata_attribute: %s\n" % e) ``` -------------------------------- ### Python Example: Instantiating ProvisioningPolicyDto Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/ProvisioningPolicyDto.md Demonstrates how to create an instance of the `ProvisioningPolicyDto` in Python using the SailPoint SDK. It populates its `name`, `description`, `usage_type`, and `fields` attributes with example values, including a nested `FieldDetailsDto` object to illustrate complex data structures. ```python from sailpoint.beta.models.provisioning_policy_dto import ProvisioningPolicyDto provisioning_policy_dto = ProvisioningPolicyDto( name='example provisioning policy for inactive identities', description='this provisioning policy creates access based on an identity going inactive', usage_type='CREATE', fields=[ sailpoint.beta.models.field_details_dto.FieldDetailsDto( name = 'userName', transform = {type=rule, attributes={name=Create Unique LDAP Attribute}}, attributes = {template=${firstname}.${lastname}${uniqueCounter}, cloudMaxUniqueChecks=50, cloudMaxSize=20, cloudRequired=true}, is_required = False, type = 'string', is_multi_valued = False, ) ] ) ``` -------------------------------- ### Python SDK Example for Get Machine Account Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Methods/MachineAccountsApi.md Practical Python example demonstrating how to call the `get_machine_account` method using the SailPoint SDK, including setting up configuration and handling the response. ```python from sailpoint.v2024.api.machine_accounts_api import MachineAccountsApi from sailpoint.v2024.api_client import ApiClient from sailpoint.v2024.models.machine_account import MachineAccount from sailpoint.configuration import Configuration configuration = Configuration() configuration.experimental = True with ApiClient(configuration) as api_client: id = 'ef38f94347e94562b5bb8424a56397d8' # str | Machine Account ID. # str | Machine Account ID. x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (default to 'true') # str | Use this header to enable this experimental API. (default to 'true') try: # Machine account details results = MachineAccountsApi(api_client).get_machine_account(id=id, x_sail_point_experimental=x_sail_point_experimental) # Below is a request that includes all optional parameters # results = MachineAccountsApi(api_client).get_machine_account(id, x_sail_point_experimental) print("The response of MachineAccountsApi->get_machine_account:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling MachineAccountsApi->get_machine_account: %s\n" % e) ``` -------------------------------- ### Python Example: Instantiating SourceAppCreateDto Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/SourceAppCreateDto.md Provides a Python code example demonstrating how to create an instance of the `SourceAppCreateDto` class, populating its `name`, `description`, `match_all_accounts`, and nested `account_source` properties. ```python from sailpoint.beta.models.source_app_create_dto import SourceAppCreateDto source_app_create_dto = SourceAppCreateDto( name='my app', description='the source app for engineers', match_all_accounts=True, account_source=sailpoint.beta.models.source_app_create_dto_account_source.SourceAppCreateDto_accountSource( id = '2c9180827ca885d7017ca8ce28a000eb', type = 'SOURCE', name = 'ODS-AD-Source', ) ) ``` -------------------------------- ### Get Identity Outlier Contributing Feature Summary (Python) Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/IAIOutliersApi.md This Python code snippet demonstrates how to use the SailPoint Python SDK to retrieve a summary of contributing features for a specific identity outlier. It initializes the API client, calls the 'get_outlier_contributing_feature_summary' method with a provided outlier feature ID, and prints the JSON response. This example requires the SailPoint Python SDK to be installed and configured. ```python from sailpoint.beta.api.iai_outliers_api import IAIOutliersApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.outlier_feature_summary import OutlierFeatureSummary from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: outlier_feature_id = '04654b66-7561-4090-94f9-abee0722a1af' # str | Contributing feature id # str | Contributing feature id try: # Get identity outlier contibuting feature summary results = IAIOutliersApi(api_client).get_outlier_contributing_feature_summary(outlier_feature_id=outlier_feature_id) # Below is a request that includes all optional parameters # results = IAIOutliersApi(api_client).get_outlier_contributing_feature_summary(outlier_feature_id) print("The response of IAIOutliersApi->get_outlier_contributing_feature_summary:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling IAIOutliersApi->get_outlier_contributing_feature_summary: %s\n" % e) ``` -------------------------------- ### Python Example for ProvisioningDetails Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Models/ProvisioningDetails.md Demonstrates how to import and instantiate the ProvisioningDetails model in Python, setting the 'ordered_sub_phase_references' property. ```python from sailpoint.v3.models.provisioning_details import ProvisioningDetails provisioning_details = ProvisioningDetails( ordered_sub_phase_references='manualWorkItemDetails' ) ``` -------------------------------- ### API Documentation for Get Identity Start Date Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Methods/IdentityHistoryApi.md Documents the `get_identity_start_date` endpoint, including parameters, return types, and possible HTTP responses. This endpoint retrieves the start date of a specific identity. ```APIDOC Parameters: - Path: id (str, Required): The identity id - x_sail_point_experimental (str, Required, default: 'true'): Use this header to enable this experimental API. Return type: str Responses: - 200: The start date of the identity (str) - 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) - 500: Internal Server Error - Returned if there is an unexpected error. (ErrorResponseDto) HTTP request headers: - Content-Type: Not defined - Accept: application/json ``` -------------------------------- ### Instantiate FullcampaignAllOfSourceOwnerCampaignInfo in Python Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/FullcampaignAllOfSourceOwnerCampaignInfo.md This example demonstrates how to create an instance of the `FullcampaignAllOfSourceOwnerCampaignInfo` model in Python, populating the `source_ids` attribute with a list of example IDs. ```python from sailpoint.beta.models.fullcampaign_all_of_source_owner_campaign_info import FullcampaignAllOfSourceOwnerCampaignInfo fullcampaign_all_of_source_owner_campaign_info = FullcampaignAllOfSourceOwnerCampaignInfo( source_ids=["0fbe863c063c4c88a35fd7f17e8a3df5"] ) ``` -------------------------------- ### Python Example: Initialize SourceClassificationStatus Object Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Models/SourceClassificationStatus.md This Python snippet illustrates how to instantiate the `SourceClassificationStatus` object, demonstrating how to set its `status`, `started`, `updated` timestamps, and a nested `counts` object with example values. ```python from sailpoint.v2025.models.source_classification_status import SourceClassificationStatus source_classification_status = SourceClassificationStatus( status='COMPLETED', started='2017-07-11T18:45:37.098Z', updated='2018-06-25T20:22:28.104Z', counts=sailpoint.v2025.models.source_classification_status_all_of_counts.SourceClassificationStatus_allOf_counts( expected = 1000, received = 800, completed = 500, ) ) ``` -------------------------------- ### API: Download Manual Discover Applications CSV Template Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/ApplicationDiscoveryApi.md This API endpoint allows users to download an example CSV file template for manual application discovery. The template includes 'application_name' and 'description' columns with example values. It is designed for use with the `/manual-discover-applications` endpoint. ```APIDOC Endpoint: get-manual-discover-applications-csv-template Description: Download csv template for discovery. Details: Download an example CSV file with two columns `application_name` and `description`. The CSV file contains a single row with the values 'Example Application' and 'Example Description'. The downloaded template is specifically designed for use with the `/manual-discover-applications` endpoint. Parameters: None Return Type: ManualDiscoverApplicationsTemplate ``` -------------------------------- ### Python Example: Get Tenant Information Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Methods/TenantApi.md Demonstrates how to use the `TenantApi` in the SailPoint Python SDK to retrieve tenant details. This example initializes the API client and calls the `get_tenant` method, then prints the JSON response. ```python from sailpoint.v2025.api.tenant_api import TenantApi from sailpoint.v2025.api_client import ApiClient from sailpoint.v2025.models.tenant import Tenant from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: try: # Get tenant information. results = TenantApi(api_client).get_tenant() # Below is a request that includes all optional parameters # results = TenantApi(api_client).get_tenant() print("The response of TenantApi->get_tenant:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling TenantApi->get_tenant: %s\n" % e) ``` -------------------------------- ### Python Example: Instantiate ManualDiscoverApplications Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/ManualDiscoverApplications.md Demonstrates how to create an instance of the `ManualDiscoverApplications` model in Python, providing a sample CSV string for the `file` property. ```python from sailpoint.beta.models.manual_discover_applications import ManualDiscoverApplications manual_discover_applications = ManualDiscoverApplications( file='application_name,description\n"Sample App","This is a sample description for Sample App."\n"Another App","Description for Another App.' ) ``` -------------------------------- ### Python Example: Get Duo MFA Configuration Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Methods/MFAConfigurationApi.md Demonstrates how to use the SailPoint Python SDK to retrieve the Duo MFA configuration. This example initializes the API client and calls the `get_mfa_duo_config` method, printing the JSON response. ```python from sailpoint.v2025.api.mfa_configuration_api import MFAConfigurationApi from sailpoint.v2025.api_client import ApiClient from sailpoint.v2025.models.mfa_duo_config import MfaDuoConfig from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: try: # Configuration of duo mfa method results = MFAConfigurationApi(api_client).get_mfa_duo_config() # Below is a request that includes all optional parameters # results = MFAConfigurationApi(api_client).get_mfa_duo_config() print("The response of MFAConfigurationApi->get_mfa_duo_config:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling MFAConfigurationApi->get_mfa_duo_config: %s\n" % e) ``` -------------------------------- ### Python Example for WorkflowDefinition Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/WorkflowDefinition.md Demonstrates how to instantiate a WorkflowDefinition object in Python. The example sets the 'start' property to a specific step name and defines a 'steps' dictionary containing a 'Send Email' action and a 'success' step. ```python from sailpoint.beta.models.workflow_definition import WorkflowDefinition workflow_definition = WorkflowDefinition( start='Send Email Test', steps={'Send Email':{'actionId':'sp:send-email', 'attributes':{'body':'This is a test', 'from':'sailpoint@sailpoint.com', 'recipientId.$':'$.identity.id', 'subject':'test'}, 'nextStep':'success', 'selectResult':null, 'type':'ACTION'}, 'success':{'type':'success'}} ) ``` -------------------------------- ### API: Download CSV Template for Manual Application Discovery Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Methods/ApplicationDiscoveryApi.md This API endpoint allows users to download an example CSV file (`application_name`, `description`) for use with the `/manual-discover-applications` endpoint. The template contains a single row with 'Example Application' and 'Example Description'. ```APIDOC Endpoint: get-manual-discover-applications-csv-template Description: Download csv template for discovery. Download an example CSV file with two columns `application_name` and `description`. The CSV file contains a single row with the values 'Example Application' and 'Example Description'. The downloaded template is specifically designed for use with the `/manual-discover-applications` endpoint. Parameters: None Return Type: ManualDiscoverApplicationsTemplate ``` -------------------------------- ### Python Example for RoleMiningPotentialRoleSummary Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Models/RoleMiningPotentialRoleSummary.md Demonstrates how to instantiate and populate a RoleMiningPotentialRoleSummary object in Python. This example showcases the usage of various properties, including nested objects like RoleMiningPotentialRoleRef and RoleMiningSessionParametersDto, providing a practical guide for developers. ```python from sailpoint.v2024.models.role_mining_potential_role_summary import RoleMiningPotentialRoleSummary role_mining_potential_role_summary = RoleMiningPotentialRoleSummary( id='e0cc5d7d-bf7f-4f81-b2af-8885b09d9923', name='Potential Role - e0cc5d', potential_role_ref=sailpoint.v2024.models.role_mining_potential_role_ref.RoleMiningPotentialRoleRef( id = 'e0cc5d7d-bf7f-4f81-b2af-8885b09d9923', name = 'Potential Role - e0cc5d', ), identity_count=25, entitlement_count=15, identity_group_status='OBTAINED', provision_state='POTENTIAL', role_id='2a4be6fbcf3c4e66b95a0c15ffd591', density=90, freshness=70, quality=80, type='SPECIALIZED', created_by=None, created_date=datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), saved=True, description='', session=sailpoint.v2024.models.role_mining_session_parameters_dto.RoleMiningSessionParametersDto( id = '9f36f5e5-1e81-4eca-b087-548959d91c71', name = 'Saved RM Session - 07/10', min_num_identities_in_potential_role = 20, prune_threshold = 5, saved = True, scope = sailpoint.v2024.models.role_mining_session_scope.RoleMiningSessionScope( identity_ids = ['2c918090761a5aac0176215c46a62d58', '2c918090761a5aac01722015c46a62d42'], criteria = 'source.name:DataScienceDataset', attribute_filter_criteria = {'displayName':{'untranslated':'Location: Miami'}, 'ariaLabel':{'untranslated':'Location: Miami'}, 'data':{'displayName':{'translateKey':'IDN.IDENTITY_ATTRIBUTES.LOCATION'}, 'name':'location', 'operator':'EQUALS', 'values':['Miami']}}, ), type = 'SPECIALIZED', state = 'CREATED', scoping_method = 'MANUAL', ) ) ``` -------------------------------- ### Python Example: Instantiating CampaignFilterDetails Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Models/CampaignFilterDetails.md Demonstrates how to create an instance of the `CampaignFilterDetails` class in Python, populating its various properties with example values. ```python from sailpoint.v3.models.campaign_filter_details import CampaignFilterDetails campaign_filter_details = CampaignFilterDetails( id='5ec18cef39020d6fd7a60ad3970aba61', name='Identity Attribute Campaign Filter', description='Campaign filter to certify data based on an identity attribute\'s specified property.', owner='SailPoint Support', mode='INCLUSION', criteria_list=[{type=IDENTITY_ATTRIBUTE, property=displayName, value=support, operation=CONTAINS, negateResult=false, shortCircuit=false, recordChildMatches=false, id=null, suppressMatchedItems=false, children=null}], is_system_filter=False ) ``` -------------------------------- ### Python Example: Instantiating FullDiscoveredApplications Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2024/docs/Models/FullDiscoveredApplications.md Illustrates how to create an instance of the FullDiscoveredApplications model in Python, demonstrating the assignment of various property values. ```python from sailpoint.v2024.models.full_discovered_applications import FullDiscoveredApplications full_discovered_applications = FullDiscoveredApplications( id='', name='ExampleApp', discovery_source='csv', discovered_vendor='ExampleVendor', description='An application for managing examples.', recommended_connectors=[ConnectorA, ConnectorB], discovered_at='2023-01-01T12:00Z', created_at='2023-01-01T12:00Z', status='ACTIVE', associated_sources=[e0cc5d7d-bf7f-4f81-b2af-8885b09d9923, a0303682-5e4a-44f7-bdc2-6ce6112549c1] ) ``` -------------------------------- ### Get Org Configuration Settings API and Python Example Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Methods/OrgConfigApi.md Documents the `get-org-config` API endpoint for retrieving organization settings, including parameters, return types, and response codes. Also provides a Python example demonstrating its usage. ```APIDOC Method: get-org-config Description: Get org configuration settings. Get org configuration with only external (org admin) accessible properties for the current org. HTTP Request: GET /org-config Parameters: None Return Type: OrgConfig Responses: 200: Request succeeded. (OrgConfig) 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) 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. (ListAccessModelMetadataAttribute429Response) 500: Internal Server Error - Returned if there is an unexpected error. (ErrorResponseDto) HTTP Request Headers: Content-Type: Not defined Accept: application/json ``` ```python from sailpoint.beta.api.org_config_api import OrgConfigApi from sailpoint.beta.api_client import ApiClient from sailpoint.beta.models.org_config import OrgConfig from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: try: # Get org configuration settings results = OrgConfigApi(api_client).get_org_config() # Below is a request that includes all optional parameters # results = OrgConfigApi(api_client).get_org_config() print("The response of OrgConfigApi->get_org_config:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling OrgConfigApi->get_org_config: %s\n" % e) ``` -------------------------------- ### Python Example: Start Test Trigger Invocation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Methods/TriggersApi.md Illustrates how to use the SailPoint Python SDK to start a test trigger invocation. It demonstrates setting up the API client, preparing the `TestInvocation` object, and handling the API call and its response. ```python from sailpoint.v2025.api.triggers_api import TriggersApi from sailpoint.v2025.api_client import ApiClient from sailpoint.v2025.models.invocation import Invocation from sailpoint.v2025.models.test_invocation import TestInvocation from sailpoint.configuration import Configuration configuration = Configuration() configuration.experimental = True with ApiClient(configuration) as api_client: x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (default to 'true') # str | Use this header to enable this experimental API. (default to 'true') test_invocation = '''{ "input" : { "identityId" : "201327fda1c44704ac01181e963d463c" }, "subscriptionIds" : [ "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde" ], "triggerId" : "idn:access-request-post-approval", "contentJson" : { "workflowId" : 1234 } }''' # TestInvocation | try: # Start a test invocation new_test_invocation = TestInvocation.from_json(test_invocation) results = TriggersApi(api_client).start_test_trigger_invocation(x_sail_point_experimental=x_sail_point_experimental, test_invocation=new_test_invocation) # Below is a request that includes all optional parameters # results = TriggersApi(api_client).start_test_trigger_invocation(x_sail_point_experimental, new_test_invocation) print("The response of TriggersApi->start_test_trigger_invocation:\n") for item in results: print(item.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling TriggersApi->start_test_trigger_invocation: %s\n" % e) ``` -------------------------------- ### Python Example for BackupOptions Initialization Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Models/BackupOptions.md Demonstrates how to create an instance of the `BackupOptions` class in Python, specifying included object types and additional object-specific options for a Configuration Hub backup command. ```python from sailpoint.v2025.models.backup_options import BackupOptions backup_options = BackupOptions( include_types=[ 'TRIGGER_SUBSCRIPTION' ], object_options={TRIGGER_SUBSCRIPTION={includedNames=[Trigger Subscription name]}} ) ``` -------------------------------- ### Python Example: Instantiating ProvisioningCriteriaLevel3 Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Models/ProvisioningCriteriaLevel3.md Demonstrates how to create an instance of the `ProvisioningCriteriaLevel3` class in Python. This example shows how to set the `operation`, `attribute`, and `value` properties to define specific provisioning criteria. ```python from sailpoint.v2025.models.provisioning_criteria_level3 import ProvisioningCriteriaLevel3 provisioning_criteria_level3 = ProvisioningCriteriaLevel3( operation='EQUALS', attribute='email', value='carlee.cert1c9f9b6fd@mailinator.com', children='' ) ``` -------------------------------- ### Python Example for AccountAggregationStatus Initialization Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/AccountAggregationStatus.md Demonstrates how to instantiate the AccountAggregationStatus model in Python, setting its start time, status, total, and processed accounts. This example shows a typical usage pattern for creating an instance of the model with sample data. ```python from sailpoint.beta.models.account_aggregation_status import AccountAggregationStatus account_aggregation_status = AccountAggregationStatus( start='2021-01-31T14:30:05.104Z', status='ACCOUNTS_COLLECTED', total_accounts=520, processed_accounts=150 ) ``` -------------------------------- ### Python Example: Initialize FullDiscoveredApplications Model Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/beta/docs/Models/FullDiscoveredApplications.md Demonstrates how to create an instance of the `FullDiscoveredApplications` model in Python, populating its various attributes with example data. This snippet shows how to set properties like ID, name, discovery source, vendor, description, recommended connectors, timestamps, status, and associated sources. ```python from sailpoint.beta.models.full_discovered_applications import FullDiscoveredApplications full_discovered_applications = FullDiscoveredApplications( id='', name='ExampleApp', discovery_source='csv', discovered_vendor='ExampleVendor', description='An application for managing examples.', recommended_connectors=[ConnectorA, ConnectorB], discovered_at='2023-01-01T12:00Z', created_at='2023-01-01T12:00Z', status='ACTIVE', associated_sources=[e0cc5d7d-bf7f-4f81-b2af-8885b09d9923, a0303682-5e4a-44f7-bdc2-6ce6112549c1] ) ``` -------------------------------- ### Python Example for ScheduledActionPayload Instantiation Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v2025/docs/Models/ScheduledActionPayload.md Demonstrates how to create an instance of the `ScheduledActionPayload` class in Python, populating its properties with example values. This example configures a scheduled backup action, specifying details like job type, start time, cron string, time zone, and content options including included types and object options. ```python from sailpoint.v2025.models.scheduled_action_payload import ScheduledActionPayload scheduled_action_payload = ScheduledActionPayload( job_type='BACKUP', start_time='2024-08-16T14:16:58.389Z', cron_string='0 0 * * * *', time_zone_id='America/Chicago', content=sailpoint.v2025.models.scheduled_action_payload_content.ScheduledActionPayload_content( name = 'Daily Backup', backup_options = sailpoint.v2025.models.scheduled_action_payload_content_backup_options.ScheduledActionPayload_content_backupOptions( include_types = [ROLE, IDENTITY_PROFILE], object_options = {SOURCE={includedNames=[Source1, Source2]}, ROLE={includedNames=[Admin Role, User Role]}}, ), source_backup_id = '5678b87d-48ca-439a-868f-2160001da8c2', source_tenant = 'tenant-name', draft_id = '9012b87d-48ca-439a-868f-2160001da8c3', ) ) ``` -------------------------------- ### Get OAuth Client Details (Python Example) Source: https://github.com/sailpoint-oss/python-sdk/blob/main/sailpoint/v3/docs/Methods/OAuthClientsApi.md Illustrates how to retrieve details of a specific OAuth client using the SailPoint Python SDK. The example initializes the API client, calls `get_oauth_client` with the client ID, and prints the JSON response. ```python from sailpoint.v3.api.o_auth_clients_api import OAuthClientsApi from sailpoint.v3.api_client import ApiClient from sailpoint.v3.models.get_o_auth_client_response import GetOAuthClientResponse from sailpoint.configuration import Configuration configuration = Configuration() with ApiClient(configuration) as api_client: id = 'ef38f94347e94562b5bb8424a56397d8' # str | The OAuth client id # str | The OAuth client id try: # Get oauth client results = OAuthClientsApi(api_client).get_oauth_client(id=id) # Below is a request that includes all optional parameters # results = OAuthClientsApi(api_client).get_oauth_client(id) print("The response of OAuthClientsApi->get_oauth_client:\n") print(results.model_dump_json(by_alias=True, indent=4)) except Exception as e: print("Exception when calling OAuthClientsApi->get_oauth_client: %s\n" % e) ``` ```APIDOC Endpoint: GET /oauth-clients/{id} Description: This gets details of an OAuth client. Parameters: - Name: id Type: str Required: True Location: Path Description: The OAuth client id Return Type: GetOAuthClientResponse Responses: - Code: 200 Description: Request succeeded. Data Type: GetOAuthClientResponse - Code: 400 Description: Client Error - Returned if the request body is invalid. Data Type: ErrorResponseDto - Code: 401 Description: Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. Data Type: ListAccessProfiles401Response - Code: 403 Description: Forbidden - Returned if the user you are running as, doesn't have access to this end-point. Data Type: ErrorResponseDto - Code: 404 Description: Not Found - returned if the request URL refers to a resource or object that does not exist Data Type: ErrorResponseDto - Code: 429 Description: 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. Data Type: ListAccessProfiles429Response - Code: 500 Description: Internal Server Error - Returned if there is an unexpected error. Data Type: ErrorResponseDto HTTP Request Headers: - Content-Type: Not defined - Accept: application/json ```