Skip to main content

policies_password_update

PUT 

/api/v3//policies/password/:policy_uuid/

Password Policy Viewset

Request

Path Parameters

    policy_uuid uuidrequired

    A UUID string identifying this Password Policy.

Bodyrequired

    namestringrequired

    Possible values: non-empty

    execution_loggingboolean

    When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.

    password_fieldstring

    Field key to check, field keys defined in Prompt stages are available.

    Possible values: non-empty

    amount_digitsinteger

    Possible values: <= 2147483647

    amount_uppercaseinteger

    Possible values: <= 2147483647

    amount_lowercaseinteger

    Possible values: <= 2147483647

    amount_symbolsinteger

    Possible values: <= 2147483647

    length_mininteger

    Possible values: <= 2147483647

    symbol_charsetstring

    Possible values: non-empty

    error_messagestring
    check_static_rulesboolean
    check_have_i_been_pwnedboolean
    check_zxcvbnboolean
    hibp_allowed_countinteger

    How many times the password hash is allowed to be on haveibeenpwned

    Possible values: <= 2147483647

    zxcvbn_score_thresholdinteger

    If the zxcvbn score is equal or less than this value, the policy will fail.

    Possible values: <= 2147483647

Responses

Schema
    pkuuidrequired
    namestringrequired
    execution_loggingboolean

    When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.

    componentstringrequired

    Get object component so that we know how to edit the object

    verbose_namestringrequired

    Return object's verbose_name

    verbose_name_pluralstringrequired

    Return object's plural verbose_name

    meta_model_namestringrequired

    Return internal model name

    bound_tointegerrequired

    Return objects policy is bound to

    password_fieldstring

    Field key to check, field keys defined in Prompt stages are available.

    amount_digitsinteger

    Possible values: <= 2147483647

    amount_uppercaseinteger

    Possible values: <= 2147483647

    amount_lowercaseinteger

    Possible values: <= 2147483647

    amount_symbolsinteger

    Possible values: <= 2147483647

    length_mininteger

    Possible values: <= 2147483647

    symbol_charsetstring
    error_messagestring
    check_static_rulesboolean
    check_have_i_been_pwnedboolean
    check_zxcvbnboolean
    hibp_allowed_countinteger

    How many times the password hash is allowed to be on haveibeenpwned

    Possible values: <= 2147483647

    zxcvbn_score_thresholdinteger

    If the zxcvbn score is equal or less than this value, the policy will fail.

    Possible values: <= 2147483647

Authorization: http

name: authentiktype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "/api/v3/policies/password/:policy_uuid/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\",\n \"execution_logging\": true,\n \"password_field\": \"string\",\n \"amount_digits\": 0,\n \"amount_uppercase\": 0,\n \"amount_lowercase\": 0,\n \"amount_symbols\": 0,\n \"length_min\": 0,\n \"symbol_charset\": \"string\",\n \"error_message\": \"string\",\n \"check_static_rules\": true,\n \"check_have_i_been_pwned\": true,\n \"check_zxcvbn\": true,\n \"hibp_allowed_count\": 0,\n \"zxcvbn_score_threshold\": 0\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
/api/v3
Auth
Parameters
— pathrequired
Body required
{
  "name": "string",
  "execution_logging": true,
  "password_field": "string",
  "amount_digits": 0,
  "amount_uppercase": 0,
  "amount_lowercase": 0,
  "amount_symbols": 0,
  "length_min": 0,
  "symbol_charset": "string",
  "error_message": "string",
  "check_static_rules": true,
  "check_have_i_been_pwned": true,
  "check_zxcvbn": true,
  "hibp_allowed_count": 0,
  "zxcvbn_score_threshold": 0
}