Method for Working with System Security Settings

To work with system security settings, execute requests using the "security-settings" API method (determine administrator token before executing the request):

curl -v '<IP address or DNS server name>/api/v2/security/security-settings/' --header 'Content-Type: application/json' -H 'Authorization: Bearer <administrator token>'

The example of response:

{
    "jwt_expiration_delta": 336,
    "admin_jwt_expiration_delta": 336,
    "rjwt_expiration_delta": 1080,
    "inactive_session_ttl": 2880,
    "user_ttl": 30,
    "number_of_fails_per_device": 5,
    "device_block_minutes": 600,
    "range_time_of_fails_per_device": 600,
    "user_block_days": 2,
    "number_of_blocked_devices": 5,
    "range_time_of_blocked_devices": 1440
}

curl -X PUT -v '<IP address DNS server name>/api/v2/security/security-settings/' --header 'Content-Type: application/json' -H 'Authorization: Bearer <administrator token>' -d '{
    "jwt_expiration_delta": <JWT token expiration time for API users in minutes>,
    "admin_jwt_expiration_delta": <JWT token expiration time for administrators in minutes>,
    "rjwt_expiration_delta": <refresh JWT expiration time for API users and administrators in hours>,
    "inactive_session_ttl": <Session lifetime in minutes if administrator is inactive>,
    "user_ttl": <user account expiration time in days>,
    "number_of_fails_per_device": <lock device after the specified number of failed logins>,
   "device_block_minutes": <lock device for the specified time in minutes>,
    "range_time_of_fails_per_device": <reset counter of failed logins after the specified time in minutes>,
    "user_block_days": <lock user for the specified time in days>,
    "number_of_blocked_devices": <lock user after the specified number of device locks>,
    "range_time_of_blocked_devices": <reset counter of device locks after the specified time in minutes>
}'

The example of response:

{
    "jwt_expiration_delta": 20160,
    "admin_jwt_expiration_delta": 20160,
    "rjwt_expiration_delta": 720,
    "inactive_session_ttl": 720,
    "user_ttl": 30,
    "number_of_fails_per_device": 5,
    "device_block_minutes": 600,
    "range_time_of_fails_per_device": 900,
    "user_block_days": 2,
    "number_of_blocked_devices": 5,
    "range_time_of_blocked_devices": 1440
}

See also:

Server API