Skip to main content

Update policy

Updates a policy by ID

Path Parameters
    id string required
Request Body required
    roleId string required

    unique id of the role to which policy is assigned

    title string

    The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
    Example: Policy title

    resource string required

    The resource to which policy is assigned in this format namespace:uuid.
    Example: app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2

    principal string required

    principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format namespace:uuid. The namespace can be app/user, app/group or app/serviceuser (coming up!) and uuid is the unique id of the principal.
    Example: app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825

    metadata object

    Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
    Example: {"labels": {"key": "value"}, "description": "Policy description"}

Responses

A successful response.


Schema
    policies object[]
  • Array [
  • id string
    title string
    createdAt date-time

    The time the policy was created.

    updatedAt date-time

    The time the policy was last updated.

    roleId string
    resource namespace:uuid
    principal namespace:uuid
    metadata object
  • ]
Loading...