Ory.Api.Relationship (ory_client v1.22.1)

API calls for all endpoints tagged Relationship.

Summary

Functions

Check the syntax of an OPL file The OPL file is expected in the body of the request.

Create a Relationship Use this endpoint to create a relationship.

Delete Relationships Use this endpoint to delete relationships

Query relationships Get all relationships that match the query. Only the namespace field is required.

Query namespaces Get all namespaces

Patch Multiple Relationships Use this endpoint to patch one or more relationships.

Functions

check_opl_syntax(connection, opts \\ [])

@spec check_opl_syntax(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.CheckOplSyntaxResult.t()}
  | {:error, Tesla.Env.t()}

Check the syntax of an OPL file The OPL file is expected in the body of the request.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body (String.t):

Returns

  • {:ok, Ory.Model.CheckOplSyntaxResult.t} on success
  • {:error, Tesla.Env.t} on failure

create_relationship(connection, opts \\ [])

@spec create_relationship(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.Relationship.t()}
  | {:error, Tesla.Env.t()}

Create a Relationship Use this endpoint to create a relationship.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body (CreateRelationshipBody):

Returns

  • {:ok, Ory.Model.Relationship.t} on success
  • {:error, Tesla.Env.t} on failure

delete_relationships(connection, opts \\ [])

@spec delete_relationships(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:ok, Ory.Model.ErrorGeneric.t()} | {:error, Tesla.Env.t()}

Delete Relationships Use this endpoint to delete relationships

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :namespace (String.t): Namespace of the Relationship
    • :object (String.t): Object of the Relationship
    • :relation (String.t): Relation of the Relationship
    • :subject_id (String.t): SubjectID of the Relationship
    • :"subject_set.namespace" (String.t): Namespace of the Subject Set
    • :"subject_set.object" (String.t): Object of the Subject Set
    • :"subject_set.relation" (String.t): Relation of the Subject Set

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_relationships(connection, opts \\ [])

@spec get_relationships(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.Relationships.t()}
  | {:error, Tesla.Env.t()}

Query relationships Get all relationships that match the query. Only the namespace field is required.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :page_size (integer()): Items per Page This is the number of items per page to return. For details on pagination please head over to the pagination documentation.
    • :page_token (String.t): Next Page Token The next page token. For details on pagination please head over to the pagination documentation.
    • :namespace (String.t): Namespace of the Relationship
    • :object (String.t): Object of the Relationship
    • :relation (String.t): Relation of the Relationship
    • :subject_id (String.t): SubjectID of the Relationship
    • :"subject_set.namespace" (String.t): Namespace of the Subject Set
    • :"subject_set.object" (String.t): Object of the Subject Set
    • :"subject_set.relation" (String.t): Relation of the Subject Set

Returns

  • {:ok, Ory.Model.Relationships.t} on success
  • {:error, Tesla.Env.t} on failure

list_relationship_namespaces(connection, opts \\ [])

@spec list_relationship_namespaces(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, Ory.Model.RelationshipNamespaces.t()}
  | {:error, Tesla.Env.t()}

Query namespaces Get all namespaces

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, Ory.Model.RelationshipNamespaces.t} on success
  • {:error, Tesla.Env.t} on failure

patch_relationships(connection, opts \\ [])

@spec patch_relationships(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:ok, Ory.Model.ErrorGeneric.t()} | {:error, Tesla.Env.t()}

Patch Multiple Relationships Use this endpoint to patch one or more relationships.

Parameters

  • connection (Ory.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body ([Ory.Model.RelationshipPatch.t]):

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure