Skip to main content

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.

Body

    policyuuidnullable
    groupuuidnullable
    userintegernullable
    targetuuid
    negateboolean

    Negates the outcome of the policy. Messages are unaffected.

    enabledboolean
    orderinteger

    Possible values: >= -2147483648 and <= 2147483647

    timeoutinteger

    Timeout after which Policy execution is terminated.

    Possible values: <= 2147483647

    failure_resultboolean

    Result if the Policy execution fails.

Responses

Schema
    pkuuidrequired
    policyuuidnullable
    groupuuidnullable
    userintegernullable
    policy_obj object

    Policy Serializer

    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

    group_obj object

    Group Serializer

    pkuuidrequired
    num_pkintegerrequired
    namestringrequired
    is_superuserboolean

    Users added to this group will be superusers.

    parentuuidnullable
    parent_namestringnullablerequired
    usersinteger[]
    users_obj object[]nullablerequired
  • Array [
  • pkID (integer)required
    usernamestringrequired

    Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

    Possible values: <= 150 characters, Value must match regular expression ^[\w.@+-]+$

    namestringrequired

    User's display name.

    is_activeActive (boolean)

    Designates whether this user should be treated as active. Unselect this instead of deleting accounts.

    last_logindate-timenullable
    emailemail

    Possible values: <= 254 characters

    attributes object
    property name*any
    uidstringrequired
  • ]
  • attributes object
    property name*any
    rolesuuid[]
    roles_obj object[]required
  • Array [
  • pkuuidrequired
    namestringrequired

    Possible values: <= 150 characters

  • ]
  • user_obj object

    User Serializer

    pkID (integer)required
    usernamestringrequired

    Possible values: <= 150 characters

    namestringrequired

    User's display name.

    is_activeActive (boolean)

    Designates whether this user should be treated as active. Unselect this instead of deleting accounts.

    last_logindate-timenullable
    is_superuserbooleanrequired
    groupsuuid[]
    groups_obj object[]nullablerequired
  • Array [
  • pkuuidrequired
    num_pkintegerrequired

    Get a numerical, int32 ID for the group

    namestringrequired
    is_superuserboolean

    Users added to this group will be superusers.

    parentuuidnullable
    parent_namestringnullablerequired
    attributes object
    property name*any
  • ]
  • emailemail

    Possible values: <= 254 characters

    avatarstringrequired

    User's avatar, either a http/https URL or a data URI

    attributes object
    property name*any
    uidstringrequired
    pathstring
    typeUserTypeEnum (string)

    Possible values: [internal, external, service_account, internal_service_account]

    uuiduuidrequired
    password_change_datedate-timerequired
    targetuuidrequired
    negateboolean

    Negates the outcome of the policy. Messages are unaffected.

    enabledboolean
    orderintegerrequired

    Possible values: >= -2147483648 and <= 2147483647

    timeoutinteger

    Timeout after which Policy execution is terminated.

    Possible values: <= 2147483647

    failure_resultboolean

    Result if the Policy execution fails.

Authorization: http

name: authentiktype: httpscheme: bearer
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());
Request Collapse all
Base URL
/api/v3
Auth
Parameters
— pathrequired
Body
{
  "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
}