LettaAPI.Api.Organization (letta_api v1.0.0)

API calls for all endpoints tagged Organization.

Summary

Functions

create_organization(connection, organization_create, opts \\ [])

Create Org Create a new org in the database

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • organization_create (OrganizationCreate):
  • opts (keyword): Optional parameters

Returns

  • {:ok, LettaAPI.Model.Organization.t} on success
  • {:error, Tesla.Env.t} on failure

delete_organization_by_id(connection, org_id, opts \\ [])

@spec delete_organization_by_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, LettaAPI.Model.Organization.t()}
  | {:ok, LettaAPI.Model.HttpValidationError.t()}
  | {:error, Tesla.Env.t()}

Delete Org

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • org_id (String.t): The org_id key to be deleted.
  • opts (keyword): Optional parameters

Returns

  • {:ok, LettaAPI.Model.Organization.t} on success
  • {:error, Tesla.Env.t} on failure

list_orgs(connection, opts \\ [])

@spec list_orgs(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [LettaAPI.Model.Organization.t()]}
  | {:ok, LettaAPI.Model.HttpValidationError.t()}
  | {:error, Tesla.Env.t()}

Get All Orgs Get a list of all orgs in the database

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :after (String.t):
    • :limit (integer()):

Returns

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

update_organization(connection, org_id, organization_update, opts \\ [])

Update Org

Parameters

  • connection (LettaAPI.Connection): Connection to server
  • org_id (String.t): The org_id key to be updated.
  • organization_update (OrganizationUpdate):
  • opts (keyword): Optional parameters

Returns

  • {:ok, LettaAPI.Model.Organization.t} on success
  • {:error, Tesla.Env.t} on failure