policies_unique_password_create
POST/api/v3//policies/unique_password/
Password Uniqueness Policy Viewset
Request
- application/json
Bodyrequired
Possible values: non-empty
When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
Field key to check, field keys defined in Prompt stages are available.
Possible values: non-empty
Number of passwords to check against.
Possible values: <= 2147483647
Responses
- 201
- 400
- 403
- application/json
- Schema
- Example (auto)
Schema
When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
Get object component so that we know how to edit the object
Return object's verbose_name
Return object's plural verbose_name
Return internal model name
Return objects policy is bound to
Field key to check, field keys defined in Prompt stages are available.
Number of passwords to check against.
Possible values: <= 2147483647
{
"pk": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"execution_logging": true,
"component": "string",
"verbose_name": "string",
"verbose_name_plural": "string",
"meta_model_name": "string",
"bound_to": 0,
"password_field": "string",
"num_historical_passwords": 0
}
- application/json
- Schema
- Example (auto)
Schema
Validation Error
{
"non_field_errors": [
"string"
],
"code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
{
"detail": "string",
"code": "string"
}
Authorization: http
name: authentiktype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());