Skip to main content

SetRelationship creates or updates a Relationship within a Policy.

A Relationship is a statement which ties together an object and a subjecto with a "relation",

which means the set of high level rules defined in the Policy will apply to these entities.

Request Body REQUIRED
creator string
policy_id string
creation_time date-time
relationship object

Relationship models an access control rule. It states that the given subject has relation with object.

object object

Object represents an entity which must be access controlled within a Policy.

resource string
id string
relation string
subject object

Subject specifies the target of a Relationship.

actor object

Actor represents an entity which makes access requests to a Policy.

id string
actor_set object

ActorSet represents a set of Actors in a Policy. It is specified through an Object, Relation pair, which represents all actors which have a relationship with given obj-rel pair. This expansion is recursive.

object object

Object represents an entity which must be access controlled within a Policy.

resource string
id string
relation string
all_actors object

AllActors models a special Relationship Subject which indicates that all Actors in the Policy are included.

object object

Object represents an entity which must be access controlled within a Policy.

resource string
id string
Responses
200

A successful response.

Schema OPTIONAL
record_existed Indicates whether the given Relationship previously existed, ie the Tx was a no op OPTIONAL
default

An unexpected error response.

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