Pincode rules

Retrieve pincode rules

GET /api/v1/tenants/(string: tenant_id)/passcode_rules/

Retrieve all the security rules that a pincode should follow.

Authorization rights: minimum Tenant Admin.

Example request:

GET /api/v1/tenants/(string:tenant_id)/passcode_rules/ HTTP/1.1
Host: example.com

{}

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "disallowRepeatedDigits": true,
   "numberOfRepeatedDigits": 3,
   "disallowRepeatedPatterns": false,
   "disallowContiguousSequences": false,
   "numberOfAscendingDigits": 3,
   "numberOfDescendingDigits": 3,
   "disallowUserNumber": false,
   "disallowReversedUserNumber": false,
   "disallowOldPasscode": false,
   "numberOfPreviousPasscodes": 1,
   "disallowReversedOldPasscode": false,
   "minCodeLength": 4,
   "maxCodeLength": 8,
   "disableLoginAfterMaxFailedLoginAttempts": true,
   "maxFailedLoginAttempts": 3,
   "expirePassword": true,
   "passcodeExpiresDays": 30,
   "sendLoginDisabledNotifyEmail": false
}
<json boolean disallowRepeatedDigits:

if enabled prevents repeated digits in the pincode. The maximum amount is defied by numberOfRepeatedDigits.

<json integer numberOfRepeatedDigits:

the amount of repeated digits that are allowed.

<json boolean disallowRepeatedPatterns:

if enabled prevents repeated patterns in the pincode.

<json boolean disallowContiguousSequences:

if enabled prevents contiguous sequences of ascending digits (the amount is defined by numberOfAscendingDigits) and descending digits (the amount is defined by numberOfDescendingDigits).

<json integer numberOfAscendingDigits:

the amount of allowed ascending digits.

<json integer numberOfDescendingDigits:

the amount of allowed descending digits.

<json boolean disallowUserNumber:

if enabled prevents to use the phone number or the extension of the user as pincode.

<json boolean disallowReversedUserNumber:

if enabled prevents to use the revers of the phone number or the extension of the user as pincode.

<json boolean disallowOldPasscode:

if enabled prevents to use old pincodes.

<json integer numberOfPreviousPasscodes:

the amount of old pincodes to check to.

<json boolean disallowReversedOldPasscode:

if enabled prevents to use the revers of old pincodes

<json integer minCodeLength:

is the minimum length of the pincode.

<json integer maxCodeLength:

is the maximum length of the pincode.

<json boolean disableLoginAfterMaxFailedLoginAttempts:

if enabled prevents the user to login after failed logins.

<json integer maxFailedLoginAttempts:

the amount of failing login before block the access.

<json boolean expirePassword:

if enabled, then the pincode will expire.

<json integer passcodeExpiresDays:

the amount of days the pincode will last.

<json boolean sendLoginDisabledNotifyEmail:

if enabled it will send a notification email on disabled login.

<json string loginDisabledNotifyEmailAddress:

the email address to send the notification email.

statuscode 200:

no error

Update pincode rules

PUT /api/v1/tenants/(string: tenant_id)/passcode_rules/

Update all the security rules that a pincode should follow.

Authorization rights: minimum Tenant Admin.

Template Actions: this end point is available as template action under the name tenant_passcode_rules

Example request:

PUT /api/v1/tenants/foo/passcode_rules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "numberOfRepeatedDigits": 4,
   "numberOfAscendingDigits": 3,
   "numberOfDescendingDigits": 4,
   "minCodeLength": 6,
   "maxCodeLength": 12
}
Response JSON Object:
  • disallowRepeatedDigits (boolean) – if enabled prevents repeated digits in the pincode. The maximum amount is defied by numberOfRepeatedDigits.

  • numberOfRepeatedDigits (integer) – the amount of repeated digits that are allowed.

  • disallowRepeatedPatterns (boolean) – if enabled prevents repeated patterns in the pincode.

  • disallowContiguousSequences (boolean) – if enabled prevents contiguous sequences of ascending digits (the amount is defined by numberOfAscendingDigits) and descending digits (the amount is defined by numberOfDescendingDigits).

  • numberOfAscendingDigits (integer) – the amount of allowed ascending digits.

  • numberOfDescendingDigits (integer) – the amount of allowed descending digits.

  • disallowUserNumber (boolean) – if enabled prevents to use the phone number or the extension of the user as pincode.

  • disallowReversedUserNumber (boolean) – if enabled prevents to use the revers of the phone number or the extension of the user as pincode.

  • disallowOldPasscode (boolean) – if enabled prevents to use old pincodes.

  • numberOfPreviousPasscodes (integer) – the amount of old pincodes to check to.

  • disallowReversedOldPasscode (boolean) – if enabled prevents to use the revers of old pincodes

  • minCodeLength (integer) – is the minimum length of the pincode.

  • maxCodeLength (integer) – is the maximum length of the pincode.

  • disableLoginAfterMaxFailedLoginAttempts (boolean) – if enabled prevents the user to login after failed logins.

  • maxFailedLoginAttempts (integer) – the amount of failing login before block the access.

  • expirePassword (boolean) – if enabled, then the pincode will expire.

  • passcodeExpiresDays (integer) – the amount of days the pincode will last.

  • sendLoginDisabledNotifyEmail (boolean) – if enabled it will send a notification email on disabled login.

  • loginDisabledNotifyEmailAddress (string) – the email address to send the notification email.

Example response:

Response:

Similar to GET instance method response.

Status Codes:
  • 200 OK – no error

  • 400 Bad Request – error in the input data, most probably due to incorrect values.