Skip to main content

REST APIs for 22.5

Password Policy

This Public Experimental API gets or updates the domain password policy.

A default password policy is created automatically when a new login domain (organization) is created. There is only one password policy per login domain, so the same password policy applies to all users.

API Methods

Functionality

HTTP

URI

Get the password policy

GET

[api_version]/authentication_settings/password_policy

Update the password policy

PUT

[api_version]/authentication_settings/password_policy

Curl Command Get the Password Policy

The org/:org_id/ path parameter is not specified in this command.

curl -i -X GET https://pce.my-company.com:8443/api/v2/authentication_services/password_policy -H "Accept: application/json" -u $KEY:$TOKEN

Example Default Response: 200 OK

{
  "require_type_number": true,
  "require_type_lowercase": true,
  "require_type_uppercase": true,
  "require_type_symbol": false,
  "min_characters_per_type": 1,
  "min_length": 8,
  "min_changed_characters": 1,
  "history_count": 1,
  "expire_time_days": 0,
  "updated_at": "2019-09-20T03:40:00Z",
  "updated_by": null
}
Parameters

Parameter

Description

Type

Req

require_type_number

If true, the password must contain a numerical digit.

Boolean

Yes

require_type_lowercase

If true, the password must contain a lowercase letter.

Boolean

Yes

require_type_uppercase

If true, the password must contain an uppercase letter.

Boolean

Yes

require_type_symbol

If true, the password must contain a symbol, for example:

! @ # $ % ^ * ? \u0026 \u003c \u003e

Boolean

Yes

min_characters_per_type

Minimum number of characters for each character type.

Integer

Yes

min_length

Minimum password length.

Integer

Yes

min_changed_characters

Minimum number of changed characters for a new password.

Minimum: 1

Maximum: 4

Integer

Yes

history_count

Number of old passwords to remember.

Minimum: 1

Maximum: 24

Integer

Yes

expire_time_days

Number of days until the password expires.

A value of 0 (zero) means the password never expires.

Minimum: 0

Maximum: 99

Integer

Yes

session_timeout_minutes

Number of minutes to timeout the user session without activity

Integer

Yes

updated_at

RFC-3339 date-time timestamp of when the password

policy was last updated. Automatically recorded by the system.

date-time String

Yes

updated_by

The username of the person that last updated this

password policy (null for the default password policy).

Automatically recorded by the system.

String

Yes

Properties

Property

Description

Type

Req

require_type_number

Flag to indicate whether password must contain numerical digit

Boolean

Yes

require_type_lowercase

Flag to indicate whether password must contain lowercase letter

Boolean

Yes

require_type_uppercase

Flag to indicate whether password must contain uppercase letter

Boolean

Yes

require_type_symbol

If true, the password must contain a symbol, for example:

! @ # $ % ^ * ? \u0026 \u003c \u003e

Boolean

Yes

min_characters_per_type

Minimum number of characters for each character type.

Integer

Yes

min_length

Minimum length of password

Integer

Yes

min_changed_characters

Minimum number of changed characters for new passwords

Integer

Yes

history_count

Number of old passwords to remember

Integer

Yes

expire_time_days

Number of days password expires; a value of 0 means it never expires

Integer

Yes

updated_at

RFC-3339 date-time timestamp of when the password

policy was last updated. Automatically recorded by the system.

date-time String

Yes

updated_by

The username of the person that last updated this

password policy (null for the default password policy).

Automatically recorded by the system.

String

Yes

Update Password Policy

Curl Command Update the Password Policy

The org/:org_id/ path parameter is not specified in this command.

curl -i -X PUT https://pce.my-company.com:8443/api/v2/authentication_services/password_policy -H "Content-Type: application/json" -u $KEY:$TOKEN -d '{"require_type_symbol": true, "expire_time_days": 90} 

Example Request Body

Only the parameters to change must be included in the request body.

{
  "require_type_number": true,
  "require_type_lowercase": true,
  "require_type_uppercase": true,
  "require_type_symbol": true,
  "min_characters_per_type": 1,
  "min_length": 8,
  "min_changed_characters": 1,
  "history_count": 1,
  "expire_time_days": 90
}