Ory.Api.Workspace (ory_client v1.19.0)

API calls for all endpoints tagged Workspace.

Summary

Functions

Create workspace API key Create an API key for a workspace.

Delete workspace API key Deletes an API key and immediately removes it.

Get a workspace Any workspace member can access this endpoint.

List a workspace's API keys A list of all the workspace's API keys.

List all projects of a workspace Any workspace member can access this endpoint.

List workspaces the user is a member of

Update an workspace Workspace members with the role OWNER can access this endpoint.

Functions

create_workspace(connection, opts \\ [])

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

Create a new workspace

Parameters

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

Returns

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

create_workspace_api_key(connection, workspace, opts \\ [])

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

Create workspace API key Create an API key for a workspace.

Parameters

  • connection (Ory.Connection): Connection to server
  • workspace (String.t): The Workspace ID
  • opts (keyword): Optional parameters
    • :body (CreateWorkspaceApiKeyBody):

Returns

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

delete_workspace_api_key(connection, workspace, token_id, opts \\ [])

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

Delete workspace API key Deletes an API key and immediately removes it.

Parameters

  • connection (Ory.Connection): Connection to server
  • workspace (String.t): The Workspace ID or Workspace slug
  • token_id (String.t): The Token ID
  • opts (keyword): Optional parameters

Returns

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

get_workspace(connection, workspace, opts \\ [])

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

Get a workspace Any workspace member can access this endpoint.

Parameters

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

Returns

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

list_workspace_api_keys(connection, workspace, opts \\ [])

@spec list_workspace_api_keys(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Ory.Model.ErrorGeneric.t()}
  | {:ok, [Ory.Model.WorkspaceApiKey.t()]}
  | {:error, Tesla.Env.t()}

List a workspace's API keys A list of all the workspace's API keys.

Parameters

  • connection (Ory.Connection): Connection to server
  • workspace (String.t): The Workspace ID or Workspace slug
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%WorkspaceApiKey{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

list_workspace_projects(connection, workspace, opts \\ [])

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

List all projects of a workspace Any workspace member can access this endpoint.

Parameters

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

Returns

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

list_workspaces(connection, opts \\ [])

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

List workspaces the user is a member of

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.

Returns

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

update_workspace(connection, workspace, opts \\ [])

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

Update an workspace Workspace members with the role OWNER can access this endpoint.

Parameters

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

Returns

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