19 KiB
id, title, pagination_label, sidebar_label, sidebar_class_name, keywords, slug, tags
| id | title | pagination_label | sidebar_label | sidebar_class_name | keywords | slug | tags | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| v2024-password-policies | Password_Policies | Password_Policies | Password_Policies | pythonsdk |
|
/tools/sdk/python/v2024/methods/password-policies |
|
sailpoint.v2024.PasswordPoliciesApi
Use these APIs to implement password policies functionality. These APIs allow you to define the policy parameters for choosing passwords.
IdentityNow comes with a default policy that you can modify to define the password requirements your users must meet to log in to IdentityNow, such as requiring a minimum password length, including special characters, and disallowing certain patterns. If you have licensed Password Management, you can create additional password policies beyond the default one to manage passwords for supported sources in your org.
In the Identity Security Cloud Admin panel, administrators can use the Password Mgmt dropdown menu to select Sync Groups. Refer to Managing Password Policies for more information about password policies.
All URIs are relative to https://sailpoint.api.identitynow.com/v2024
| Method | HTTP request | Description |
|---|---|---|
| create_password_policy | POST /password-policies |
Create Password Policy |
| delete_password_policy | DELETE /password-policies/{id} |
Delete Password Policy by ID |
| get_password_policy_by_id | GET /password-policies/{id} |
Get Password Policy by ID |
| list_password_policies | GET /password-policies |
List Password Policies |
| set_password_policy | PUT /password-policies/{id} |
Update Password Policy by ID |
create-password-policy
Create Password Policy This API creates the specified password policy.
Parameters
| Param Type | Name | Data Type | Required | Description |
|---|---|---|---|---|
| Body | password_policy_v3_dto | PasswordPolicyV3Dto | True |
Return type
Responses
| Code | Description | Data Type | Response headers |
|---|---|---|---|
| 200 | Reference to the password policy. | PasswordPolicyV3Dto | - |
| 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
import sailpoint.v2024
from sailpoint.v2024.models.password_policy_v3_dto import PasswordPolicyV3Dto
from sailpoint.v2024.rest import ApiException
from pprint import pprint
password_policy_v3_dto = {
"validateAgainstAccountName" : true,
"minLength" : 8,
"description" : "Information about the Password Policy",
"requireStrongAuthUntrustedGeographies" : true,
"enablePasswdExpiration" : true,
"minNumeric" : 8,
"lastUpdated" : "2000-01-23T04:56:07.000+00:00",
"validateAgainstAccountId" : false,
"dateCreated" : "2000-01-23T04:56:07.000+00:00",
"accountNameMinWordLength" : 6,
"minUpper" : 8,
"firstExpirationReminder" : 45,
"modified" : "modified",
"id" : "2c91808e7d976f3b017d9f5ceae440c8",
"requireStrongAuthn" : true,
"useDictionary" : false,
"minSpecial" : 8,
"sourceIds" : [ "2c91808382ffee0b01830de154f14034", "2f98808382ffee0b01830de154f12134" ],
"passwordExpiration" : 8,
"maxRepeatedChars" : 3,
"minCharacterTypes" : 5,
"minAlpha" : 5,
"created" : "created",
"useAccountAttributes" : false,
"accountIdMinWordLength" : 4,
"minLower" : 8,
"useIdentityAttributes" : false,
"defaultPolicy" : true,
"requireStrongAuthOffNetwork" : true,
"name" : "PasswordPolicy Example",
"maxLength" : 25
} # PasswordPolicyV3Dto |
try:
# Create Password Policy
Result = password_policy_v3_dto.from_json(password_policy_v3_dto)
api_response = api_instance.create_password_policy(Result)
# Below is a request that includes all optional parameters
# api_response = api_instance.create_password_policy(Result)
print("The response of PasswordPoliciesApi->create_password_policy:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PasswordPoliciesApi->create_password_policy: %s\n" % e)
delete-password-policy
Delete Password Policy by ID This API deletes the specified password policy.
Parameters
| Param Type | Name | Data Type | Required | Description |
|---|---|---|---|---|
| Path | id | str | True | The ID of password policy to delete. |
Return type
(empty response body)
Responses
| Code | Description | Data Type | Response headers |
|---|---|---|---|
| 204 | No content - indicates the request was successful but there is no content to be returned in the response. | - | |
| 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
import sailpoint.v2024
from sailpoint.v2024.rest import ApiException
from pprint import pprint
id = 'ff808081838d9e9d01838da6a03e0002' # str | The ID of password policy to delete. # str | The ID of password policy to delete.
try:
# Delete Password Policy by ID
api_instance.delete_password_policy(id)
# Below is a request that includes all optional parameters
# api_instance.delete_password_policy(id)
except Exception as e:
print("Exception when calling PasswordPoliciesApi->delete_password_policy: %s\n" % e)
get-password-policy-by-id
Get Password Policy by ID This API returns the password policy for the specified ID.
Parameters
| Param Type | Name | Data Type | Required | Description |
|---|---|---|---|---|
| Path | id | str | True | The ID of password policy to retrieve. |
Return type
Responses
| Code | Description | Data Type | Response headers |
|---|---|---|---|
| 200 | Reference to the password policy. | PasswordPolicyV3Dto | - |
| 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
import sailpoint.v2024
from sailpoint.v2024.models.password_policy_v3_dto import PasswordPolicyV3Dto
from sailpoint.v2024.rest import ApiException
from pprint import pprint
id = 'ff808081838d9e9d01838da6a03e0005' # str | The ID of password policy to retrieve. # str | The ID of password policy to retrieve.
try:
# Get Password Policy by ID
api_response = api_instance.get_password_policy_by_id(id)
# Below is a request that includes all optional parameters
# api_response = api_instance.get_password_policy_by_id(id)
print("The response of PasswordPoliciesApi->get_password_policy_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PasswordPoliciesApi->get_password_policy_by_id: %s\n" % e)
list-password-policies
List Password Policies This gets list of all Password Policies. Requires role of ORG_ADMIN
Parameters
| Param Type | Name | Data Type | Required | Description |
|---|---|---|---|---|
| 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. |
Return type
Responses
| Code | Description | Data Type | Response headers |
|---|---|---|---|
| 200 | List of all Password Policies. | List[PasswordPolicyV3Dto] | - |
| 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
import sailpoint.v2024
from sailpoint.v2024.models.password_policy_v3_dto import PasswordPolicyV3Dto
from sailpoint.v2024.rest import ApiException
from pprint import pprint
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)
try:
# List Password Policies
api_response = api_instance.list_password_policies()
# Below is a request that includes all optional parameters
# api_response = api_instance.list_password_policies(limit, offset, count)
print("The response of PasswordPoliciesApi->list_password_policies:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PasswordPoliciesApi->list_password_policies: %s\n" % e)
set-password-policy
Update Password Policy by ID This API updates the specified password policy.
Parameters
| Param Type | Name | Data Type | Required | Description |
|---|---|---|---|---|
| Path | id | str | True | The ID of password policy to update. |
| Body | password_policy_v3_dto | PasswordPolicyV3Dto | True |
Return type
Responses
| Code | Description | Data Type | Response headers |
|---|---|---|---|
| 200 | Reference to the password policy. | PasswordPolicyV3Dto | - |
| 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
import sailpoint.v2024
from sailpoint.v2024.models.password_policy_v3_dto import PasswordPolicyV3Dto
from sailpoint.v2024.rest import ApiException
from pprint import pprint
id = 'ff808081838d9e9d01838da6a03e0007' # str | The ID of password policy to update. # str | The ID of password policy to update.
password_policy_v3_dto = {
"validateAgainstAccountName" : true,
"minLength" : 8,
"description" : "Information about the Password Policy",
"requireStrongAuthUntrustedGeographies" : true,
"enablePasswdExpiration" : true,
"minNumeric" : 8,
"lastUpdated" : "2000-01-23T04:56:07.000+00:00",
"validateAgainstAccountId" : false,
"dateCreated" : "2000-01-23T04:56:07.000+00:00",
"accountNameMinWordLength" : 6,
"minUpper" : 8,
"firstExpirationReminder" : 45,
"modified" : "modified",
"id" : "2c91808e7d976f3b017d9f5ceae440c8",
"requireStrongAuthn" : true,
"useDictionary" : false,
"minSpecial" : 8,
"sourceIds" : [ "2c91808382ffee0b01830de154f14034", "2f98808382ffee0b01830de154f12134" ],
"passwordExpiration" : 8,
"maxRepeatedChars" : 3,
"minCharacterTypes" : 5,
"minAlpha" : 5,
"created" : "created",
"useAccountAttributes" : false,
"accountIdMinWordLength" : 4,
"minLower" : 8,
"useIdentityAttributes" : false,
"defaultPolicy" : true,
"requireStrongAuthOffNetwork" : true,
"name" : "PasswordPolicy Example",
"maxLength" : 25
} # PasswordPolicyV3Dto |
try:
# Update Password Policy by ID
Result = password_policy_v3_dto.from_json(password_policy_v3_dto)
api_response = api_instance.set_password_policy(id, Result)
# Below is a request that includes all optional parameters
# api_response = api_instance.set_password_policy(id, Result)
print("The response of PasswordPoliciesApi->set_password_policy:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PasswordPoliciesApi->set_password_policy: %s\n" % e)