policies_bindings_partial_update
PATCH/api/v3//policies/bindings/:policy_binding_uuid/
PolicyBinding Viewset
Request
Path Parameters
policy_binding_uuid uuidrequired
A UUID string identifying this Policy Binding.
- application/json
Body
policy uuidnullable
group uuidnullable
user integernullable
target uuid
negate boolean
Negates the outcome of the policy. Messages are unaffected.
enabled boolean
order integer
Possible values: >= -2147483648
and <= 2147483647
timeout integer
Timeout after which Policy execution is terminated.
Possible values: <= 2147483647
failure_result boolean
Result if the Policy execution fails.
Responses
- 200
- 400
- 403
- application/json
- Schema
- Example (from schema)
Schema
pk uuidrequired
policy uuidnullable
group uuidnullable
user integernullable
policy_obj
object
required
group_obj
object
required
user_obj
object
required
target uuidrequired
negate boolean
Negates the outcome of the policy. Messages are unaffected.
enabled boolean
order integerrequired
Possible values: >= -2147483648
and <= 2147483647
timeout integer
Timeout after which Policy execution is terminated.
Possible values: <= 2147483647
failure_result boolean
Result if the Policy execution fails.
{
"pk": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"policy": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user": 0,
"target": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"negate": true,
"enabled": true,
"order": 0,
"timeout": 0,
"failure_result": true
}
- application/json
- Schema
- Example (from schema)
Schema
non_field_errors string[]
code string
property name* any
Validation Error
{
"non_field_errors": [
"string"
],
"code": "string"
}
- application/json
- Schema
- Example (from schema)
Schema
detail stringrequired
code string
{
"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.Patch, "/api/v3/policies/bindings/:policy_binding_uuid/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"policy\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"group\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"user\": 0,\n \"target\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"negate\": true,\n \"enabled\": true,\n \"order\": 0,\n \"timeout\": 0,\n \"failure_result\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());