mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 12:27:47 +00:00
starting point for adding python sdk docs
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
---
|
||||
id: v2024-iai-recommendations
|
||||
title: IAI_Recommendations
|
||||
pagination_label: IAI_Recommendations
|
||||
sidebar_label: IAI_Recommendations
|
||||
sidebar_class_name: pythonsdk
|
||||
keywords: ['python', 'Python', 'sdk', 'IAI_Recommendations', 'V2024IAI_Recommendations']
|
||||
slug: /tools/sdk/python/v2024/methods/iai-recommendations
|
||||
tags: ['SDK', 'Software Development Kit', 'IAI_Recommendations', 'V2024IAI_Recommendations']
|
||||
---
|
||||
|
||||
# sailpoint.v2024.IAIRecommendationsApi
|
||||
|
||||
All URIs are relative to *https://sailpoint.api.identitynow.com/v2024*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_recommendations**](IAIRecommendationsApi#get-recommendations) | **POST** `/recommendations/request` | Returns a Recommendation Based on Object
|
||||
[**get_recommendations_config**](IAIRecommendationsApi#get-recommendations-config) | **GET** `/recommendations/config` | Get certification recommendation config values
|
||||
[**update_recommendations_config**](IAIRecommendationsApi#update-recommendations-config) | **PUT** `/recommendations/config` | Update certification recommendation config values
|
||||
|
||||
|
||||
## get-recommendations
|
||||
:::warning experimental
|
||||
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to `true` to use this endpoint.
|
||||
:::
|
||||
Returns a Recommendation Based on Object
|
||||
The getRecommendations API returns recommendations based on the requested object. The recommendations are invoked by IdentityIQ and IdentityNow plug-ins that retrieve recommendations based on the performed calculations.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/v2024/get-recommendations)
|
||||
|
||||
### Parameters
|
||||
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
| x_sail_point_experimental | **str** | True (default to 'true') | Use this header to enable this experimental API.
|
||||
Body | recommendation_request_dto | [**RecommendationRequestDto**](../models/recommendation-request-dto) | True |
|
||||
|
||||
### Return type
|
||||
[**RecommendationResponseDto**](../models/recommendation-response-dto)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type | Response headers |
|
||||
------------- | ------------- | ------------- |------------------|
|
||||
200 | The recommendations for a customer | RecommendationResponseDto | - |
|
||||
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**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.models.recommendation_request_dto import RecommendationRequestDto
|
||||
from sailpoint.v2024.models.recommendation_response_dto import RecommendationResponseDto
|
||||
from sailpoint.v2024.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
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')
|
||||
recommendation_request_dto = {
|
||||
"prescribeMode" : false,
|
||||
"excludeInterpretations" : false,
|
||||
"requests" : [ {
|
||||
"item" : {
|
||||
"id" : "2c938083633d259901633d2623ec0375",
|
||||
"type" : "ENTITLEMENT"
|
||||
},
|
||||
"identityId" : "2c938083633d259901633d25c68c00fa"
|
||||
}, {
|
||||
"item" : {
|
||||
"id" : "2c938083633d259901633d2623ec0375",
|
||||
"type" : "ENTITLEMENT"
|
||||
},
|
||||
"identityId" : "2c938083633d259901633d25c68c00fa"
|
||||
} ],
|
||||
"includeTranslationMessages" : false,
|
||||
"includeDebugInformation" : true
|
||||
} # RecommendationRequestDto |
|
||||
|
||||
try:
|
||||
# Returns a Recommendation Based on Object
|
||||
Result = recommendation_request_dto.from_json(recommendation_request_dto)
|
||||
api_response = api_instance.get_recommendations(x_sail_point_experimental, Result)
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# api_response = api_instance.get_recommendations(x_sail_point_experimental, Result)
|
||||
print("The response of IAIRecommendationsApi->get_recommendations:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling IAIRecommendationsApi->get_recommendations: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## get-recommendations-config
|
||||
:::warning experimental
|
||||
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to `true` to use this endpoint.
|
||||
:::
|
||||
Get certification recommendation config values
|
||||
Retrieves configuration attributes used by certification recommendations.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/v2024/get-recommendations-config)
|
||||
|
||||
### Parameters
|
||||
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
| x_sail_point_experimental | **str** | True (default to 'true') | Use this header to enable this experimental API.
|
||||
|
||||
### Return type
|
||||
[**RecommendationConfigDto**](../models/recommendation-config-dto)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type | Response headers |
|
||||
------------- | ------------- | ------------- |------------------|
|
||||
200 | Cert recommendation configuration attributes | RecommendationConfigDto | - |
|
||||
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 | - |
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
|
||||
|
||||
### HTTP request headers
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.models.recommendation_config_dto import RecommendationConfigDto
|
||||
from sailpoint.v2024.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
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 certification recommendation config values
|
||||
|
||||
api_response = api_instance.get_recommendations_config(x_sail_point_experimental)
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# api_response = api_instance.get_recommendations_config(x_sail_point_experimental)
|
||||
print("The response of IAIRecommendationsApi->get_recommendations_config:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling IAIRecommendationsApi->get_recommendations_config: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
## update-recommendations-config
|
||||
:::warning experimental
|
||||
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to `true` to use this endpoint.
|
||||
:::
|
||||
Update certification recommendation config values
|
||||
Updates configuration attributes used by certification recommendations.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/v2024/update-recommendations-config)
|
||||
|
||||
### Parameters
|
||||
|
||||
Param Type | Name | Data Type | Required | Description
|
||||
------------- | ------------- | ------------- | ------------- | -------------
|
||||
| x_sail_point_experimental | **str** | True (default to 'true') | Use this header to enable this experimental API.
|
||||
Body | recommendation_config_dto | [**RecommendationConfigDto**](../models/recommendation-config-dto) | True |
|
||||
|
||||
### Return type
|
||||
[**RecommendationConfigDto**](../models/recommendation-config-dto)
|
||||
|
||||
### Responses
|
||||
Code | Description | Data Type | Response headers |
|
||||
------------- | ------------- | ------------- |------------------|
|
||||
200 | Cert recommendation configuration attributes after update | RecommendationConfigDto | - |
|
||||
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 | - |
|
||||
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
|
||||
|
||||
### HTTP request headers
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v2024
|
||||
from sailpoint.v2024.models.recommendation_config_dto import RecommendationConfigDto
|
||||
from sailpoint.v2024.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
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')
|
||||
recommendation_config_dto = {
|
||||
"recommenderFeatures" : [ "jobTitle", "location", "peer_group", "department", "active" ],
|
||||
"peerGroupPercentageThreshold" : 0.5,
|
||||
"runAutoSelectOnce" : false,
|
||||
"onlyTuneThreshold" : false
|
||||
} # RecommendationConfigDto |
|
||||
|
||||
try:
|
||||
# Update certification recommendation config values
|
||||
Result = recommendation_config_dto.from_json(recommendation_config_dto)
|
||||
api_response = api_instance.update_recommendations_config(x_sail_point_experimental, Result)
|
||||
|
||||
# Below is a request that includes all optional parameters
|
||||
# api_response = api_instance.update_recommendations_config(x_sail_point_experimental, Result)
|
||||
print("The response of IAIRecommendationsApi->update_recommendations_config:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling IAIRecommendationsApi->update_recommendations_config: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user