Skip to main content

policies_unique_password_create

POST 

/api/v3//policies/unique_password/

Password Uniqueness Policy Viewset

Request

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

    num_historical_passwordsinteger

    Number of passwords to check against.

    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.

    num_historical_passwordsinteger

    Number of passwords to check against.

    Possible values: <= 2147483647

Authorization: http

name: authentiktype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "/api/v3/policies/unique_password/");
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 \"num_historical_passwords\": 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
Body required
{
  "name": "string",
  "execution_logging": true,
  "password_field": "string",
  "num_historical_passwords": 0
}