Skip to main content

Create Password Policy

POST 

https://sailpoint.api.identitynow.com/v3/password-policies

This API creates the specified password policy.

Request

Bodyrequired

    idstring

    The password policy Id.

    Example: 2c91808e7d976f3b017d9f5ceae440c8
    descriptionstringnullable

    Description for current password policy.

    Example: Information about the Password Policy
    namestring

    The name of the password policy.

    Example: PasswordPolicy Example
    dateCreateddate-time

    Date the Password Policy was created.

    Example: 1639056206564
    lastUpdateddate-timenullable

    Date the Password Policy was updated.

    Example: 1939056206564
    firstExpirationReminderint64

    The number of days before expiration remaninder.

    Example: 45
    accountIdMinWordLengthint64

    The minimun length of account Id. By default is equals to -1.

    Example: 4
    accountNameMinWordLengthint64

    The minimun length of account name. By default is equals to -1.

    Example: 6
    minAlphaint64

    Maximum alpha. By default is equals to 0.

    Example: 5
    minCharacterTypesint64

    MinCharacterTypes. By default is equals to -1.

    Example: 5
    maxLengthint64

    Maximum length of the password.

    Example: 25
    minLengthint64

    Minimum length of the password. By default is equals to 0.

    Example: 8
    maxRepeatedCharsint64

    Maximum repetition of the same character in the password. By default is equals to -1.

    Example: 3
    minLowerint64

    Minimum amount of lower case character in the password. By default is equals to 0.

    Example: 8
    minNumericint64

    Minimum amount of numeric characters in the password. By default is equals to 0.

    Example: 8
    minSpecialint64

    Minimum amount of special symbols in the password. By default is equals to 0.

    Example: 8
    minUpperint64

    Minimum amount of upper case symbols in the password. By default is equals to 0.

    Example: 8
    passwordExpirationint64

    Number of days before current password expires. By default is equals to 90.

    Example: 8
    defaultPolicyboolean

    Defines whether this policy is default or not. Default policy is created automatically when an org is setup. This field is false by default.

    Default value: false
    Example: true
    enablePasswdExpirationboolean

    Defines whether this policy is enabled to expire or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthnboolean

    Defines whether this policy require strong Auth or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthOffNetworkboolean

    Defines whether this policy require strong Auth of network or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthUntrustedGeographiesboolean

    Defines whether this policy require strong Auth for untrusted geographies. This field is false by default.

    Default value: false
    Example: true
    useAccountAttributesboolean

    Defines whether this policy uses account attributes or not. This field is false by default.

    Default value: false
    Example: false
    useDictionaryboolean

    Defines whether this policy uses dictionary or not. This field is false by default.

    Default value: false
    Example: false
    useIdentityAttributesboolean

    Defines whether this policy uses identity attributes or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountIdboolean

    Defines whether this policy validate against account id or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountNameboolean

    Defines whether this policy validate against account name or not. This field is false by default.

    Default value: false
    Example: true
    createdstringnullable
    modifiedstringnullable
    sourceIdsstring[]

    List of sources IDs managed by this password policy.

    Example: ["2c91808382ffee0b01830de154f14034","2f98808382ffee0b01830de154f12134"]

Responses

Reference to the password policy.

Schema
    idstring

    The password policy Id.

    Example: 2c91808e7d976f3b017d9f5ceae440c8
    descriptionstringnullable

    Description for current password policy.

    Example: Information about the Password Policy
    namestring

    The name of the password policy.

    Example: PasswordPolicy Example
    dateCreateddate-time

    Date the Password Policy was created.

    Example: 1639056206564
    lastUpdateddate-timenullable

    Date the Password Policy was updated.

    Example: 1939056206564
    firstExpirationReminderint64

    The number of days before expiration remaninder.

    Example: 45
    accountIdMinWordLengthint64

    The minimun length of account Id. By default is equals to -1.

    Example: 4
    accountNameMinWordLengthint64

    The minimun length of account name. By default is equals to -1.

    Example: 6
    minAlphaint64

    Maximum alpha. By default is equals to 0.

    Example: 5
    minCharacterTypesint64

    MinCharacterTypes. By default is equals to -1.

    Example: 5
    maxLengthint64

    Maximum length of the password.

    Example: 25
    minLengthint64

    Minimum length of the password. By default is equals to 0.

    Example: 8
    maxRepeatedCharsint64

    Maximum repetition of the same character in the password. By default is equals to -1.

    Example: 3
    minLowerint64

    Minimum amount of lower case character in the password. By default is equals to 0.

    Example: 8
    minNumericint64

    Minimum amount of numeric characters in the password. By default is equals to 0.

    Example: 8
    minSpecialint64

    Minimum amount of special symbols in the password. By default is equals to 0.

    Example: 8
    minUpperint64

    Minimum amount of upper case symbols in the password. By default is equals to 0.

    Example: 8
    passwordExpirationint64

    Number of days before current password expires. By default is equals to 90.

    Example: 8
    defaultPolicyboolean

    Defines whether this policy is default or not. Default policy is created automatically when an org is setup. This field is false by default.

    Default value: false
    Example: true
    enablePasswdExpirationboolean

    Defines whether this policy is enabled to expire or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthnboolean

    Defines whether this policy require strong Auth or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthOffNetworkboolean

    Defines whether this policy require strong Auth of network or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthUntrustedGeographiesboolean

    Defines whether this policy require strong Auth for untrusted geographies. This field is false by default.

    Default value: false
    Example: true
    useAccountAttributesboolean

    Defines whether this policy uses account attributes or not. This field is false by default.

    Default value: false
    Example: false
    useDictionaryboolean

    Defines whether this policy uses dictionary or not. This field is false by default.

    Default value: false
    Example: false
    useIdentityAttributesboolean

    Defines whether this policy uses identity attributes or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountIdboolean

    Defines whether this policy validate against account id or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountNameboolean

    Defines whether this policy validate against account name or not. This field is false by default.

    Default value: false
    Example: true
    createdstringnullable
    modifiedstringnullable
    sourceIdsstring[]

    List of sources IDs managed by this password policy.

    Example: ["2c91808382ffee0b01830de154f14034","2f98808382ffee0b01830de154f12134"]

Authorization: oauth2

type: Personal Access Token
scopes: idn:password-policy:write
user levels: ORG_ADMIN
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sailpoint.api.identitynow.com/v3/password-policies"
method := "POST"

payload := strings.NewReader(`{
"id": "2c91808e7d976f3b017d9f5ceae440c8",
"description": "Information about the Password Policy",
"name": "PasswordPolicy Example",
"dateCreated": 1639056206564,
"lastUpdated": 1939056206564,
"firstExpirationReminder": 45,
"accountIdMinWordLength": 4,
"accountNameMinWordLength": 6,
"minAlpha": 5,
"minCharacterTypes": 5,
"maxLength": 25,
"minLength": 8,
"maxRepeatedChars": 3,
"minLower": 8,
"minNumeric": 8,
"minSpecial": 8,
"minUpper": 8,
"passwordExpiration": 8,
"defaultPolicy": true,
"enablePasswdExpiration": true,
"requireStrongAuthn": true,
"requireStrongAuthOffNetwork": true,
"requireStrongAuthUntrustedGeographies": true,
"useAccountAttributes": false,
"useDictionary": false,
"useIdentityAttributes": false,
"validateAgainstAccountId": false,
"validateAgainstAccountName": true,
"created": "string",
"modified": "string",
"sourceIds": [
"2c91808382ffee0b01830de154f14034",
"2f98808382ffee0b01830de154f12134"
]
}`)

client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)

if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")

res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()

body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Request Collapse all
Base URL
https://sailpoint.api.identitynow.com/v3
Auth
Body required
{
  "id": "2c91808e7d976f3b017d9f5ceae440c8",
  "description": "Information about the Password Policy",
  "name": "PasswordPolicy Example",
  "dateCreated": 1639056206564,
  "lastUpdated": 1939056206564,
  "firstExpirationReminder": 45,
  "accountIdMinWordLength": 4,
  "accountNameMinWordLength": 6,
  "minAlpha": 5,
  "minCharacterTypes": 5,
  "maxLength": 25,
  "minLength": 8,
  "maxRepeatedChars": 3,
  "minLower": 8,
  "minNumeric": 8,
  "minSpecial": 8,
  "minUpper": 8,
  "passwordExpiration": 8,
  "defaultPolicy": true,
  "enablePasswdExpiration": true,
  "requireStrongAuthn": true,
  "requireStrongAuthOffNetwork": true,
  "requireStrongAuthUntrustedGeographies": true,
  "useAccountAttributes": false,
  "useDictionary": false,
  "useIdentityAttributes": false,
  "validateAgainstAccountId": false,
  "validateAgainstAccountName": true,
  "created": "string",
  "modified": "string",
  "sourceIds": [
    "2c91808382ffee0b01830de154f14034",
    "2f98808382ffee0b01830de154f12134"
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!