Skip to main content

CreatePolicy adds a new Policy.

The Policy models an aplication's high level access control rules.

Request Body — REQUIRED
creator string
policy string
marshal_type string

Possible values: [UNKNOWN, SHORT_YAML, SHORT_JSON]

PolicyEncodingType enumerates supported marshaling types for policies.

  • UNKNOWN: Fallback value for a missing Marshaling Type
  • SHORT_YAML: Policy Marshaled as a YAML Short Policy definition
  • SHORT_JSON: Policy Marshaled as a JSON Short Policy definition
creation_time date-time
Responses
200

A successful response.

Schema — OPTIONAL
policy object — OPTIONAL

Policy represents an ACP module Policy definition. Each Policy defines a set of high level rules over how the acces control system should behave.

id string — OPTIONAL
name string — OPTIONAL
description string — OPTIONAL
creation_time date-time — OPTIONAL
attributes object — OPTIONAL
resources object[] — OPTIONAL
name string — OPTIONAL
doc string — OPTIONAL
permissions object[] — OPTIONAL
name string — OPTIONAL
doc string — OPTIONAL
expression string — OPTIONAL
relations object[] — OPTIONAL
name string — OPTIONAL
doc string — OPTIONAL
manages string[] — OPTIONAL
vr_types object[] — OPTIONAL
resource_name resource_name scopes permissible actors resource — OPTIONAL
relation_name relation_name scopes permissible actors relation — OPTIONAL
actor_resource object — OPTIONAL

ActorResource represents a special Resource which is reserved for Policy actors.

name string — OPTIONAL
doc string — OPTIONAL
relations object[] — OPTIONAL
name string — OPTIONAL
doc string — OPTIONAL
manages string[] — OPTIONAL
vr_types object[] — OPTIONAL
resource_name resource_name scopes permissible actors resource — OPTIONAL
relation_name relation_name scopes permissible actors relation — OPTIONAL
creator string — OPTIONAL
default

An unexpected error response.

Schema — OPTIONAL
code int32 — OPTIONAL
message string — OPTIONAL
details object[] — OPTIONAL