Clojure wrappers over the beta Organization administration APIs of the official Anthropic Java SDK: the organization itself plus users, API keys, external keys, invites, rate limits, service accounts, workspaces, workspace members/rate-limits/service-accounts, and identity federation (issuers, rules, and rule workspaces).
These wrap beta endpoints that Anthropic may change. Build a request as a
Clojure map, get a Clojure map back. Errors follow anthropic.core's
contract: API/IO failures are ex-info keyed :anthropic/error with the SDK
exception as cause.
Deeply nested response sub-objects (an API key's principal/scope, an external key's provider config/attachment, a federation issuer's JWKS, a rule's match/target/attributes) are returned as full-fidelity Clojure data. For the matching request inputs, scalar fields are accepted as idiomatic maps; the richest union inputs (inline JWKS keys, Azure external-key configs, match claims) also accept a ready SDK object as an escape hatch.
Clojure wrappers over the beta Organization administration APIs of the official Anthropic Java SDK: the organization itself plus users, API keys, external keys, invites, rate limits, service accounts, workspaces, workspace members/rate-limits/service-accounts, and identity federation (issuers, rules, and rule workspaces). These wrap beta endpoints that Anthropic may change. Build a request as a Clojure map, get a Clojure map back. Errors follow `anthropic.core`'s contract: API/IO failures are ex-info keyed `:anthropic/error` with the SDK exception as cause. Deeply nested response sub-objects (an API key's principal/scope, an external key's provider config/attachment, a federation issuer's JWKS, a rule's match/target/attributes) are returned as full-fidelity Clojure data. For the matching request inputs, scalar fields are accepted as idiomatic maps; the richest union inputs (inline JWKS keys, Azure external-key configs, match claims) also accept a ready SDK object as an escape hatch.
(add-federation-rule-workspace client rule-id workspace-id)Attach a workspace to a federation rule.
Attach a workspace to a federation rule.
(add-service-account-workspace client
service-account-id
{:keys [workspace-id workspace-role]})Add a service account to a workspace with :workspace-role (a non-billing
workspace role).
Add a service account to a workspace with `:workspace-role` (a non-billing workspace role).
(add-workspace-member client workspace-id {:keys [user-id workspace-role]})Add a user to a workspace with :workspace-role (a non-billing workspace
role).
Add a user to a workspace with `:workspace-role` (a non-billing workspace role).
(add-workspace-service-account client
workspace-id
{:keys [service-account-id workspace-role]})Add a service account to a workspace with :workspace-role (non-billing).
Add a service account to a workspace with `:workspace-role` (non-billing).
(archive-federation-issuer client issuer-id)Archive a federation issuer by id. Returns the archived issuer.
Archive a federation issuer by id. Returns the archived issuer.
(archive-federation-rule client rule-id)Archive a federation rule by id. Returns the archived rule.
Archive a federation rule by id. Returns the archived rule.
(archive-service-account client service-account-id)Archive a service account by id. Returns the archived service account.
Archive a service account by id. Returns the archived service account.
(archive-workspace client workspace-id)Archive a workspace by id. Returns the archived workspace.
Archive a workspace by id. Returns the archived workspace.
(create-external-key client
{:keys [display-name geo aws-provider-config
gcp-provider-config provider-config]})Create an external key. Provide a provider config as one of
:aws-provider-config/:gcp-provider-config (a key name string) or
:provider-config (a ready SDK config object). Options: :display-name,
:geo (:us).
Create an external key. Provide a provider config as one of `:aws-provider-config`/`:gcp-provider-config` (a key name string) or `:provider-config` (a ready SDK config object). Options: `:display-name`, `:geo` (`:us`).
(create-federation-issuer client
{:keys [name issuer-url explicit-url-jwks jwks
check-jti max-jwt-lifetime-seconds]})Create a federation issuer. Requires :name and :issuer-url. JWKS via
:explicit-url-jwks (a URL string) or :jwks (a ready SDK JWKS object).
Optional :check-jti, :max-jwt-lifetime-seconds.
Create a federation issuer. Requires `:name` and `:issuer-url`. JWKS via `:explicit-url-jwks` (a URL string) or `:jwks` (a ready SDK JWKS object). Optional `:check-jti`, `:max-jwt-lifetime-seconds`.
(create-federation-rule client
{:keys [name issuer-id oauth-scope
token-lifetime-seconds target description
applies-to-all-workspaces workspace-id match]})Create a federation rule. Requires :name, :issuer-id, :oauth-scope,
:token-lifetime-seconds, and :target (a map {:service-account-id ...}
or a ready SDK target). Optional :description, :applies-to-all-workspaces,
:workspace-id, and :match (a map of :audience/:condition/
:subject-prefix/:claims, or a ready SDK match).
Create a federation rule. Requires `:name`, `:issuer-id`, `:oauth-scope`,
`:token-lifetime-seconds`, and `:target` (a map `{:service-account-id ...}`
or a ready SDK target). Optional `:description`, `:applies-to-all-workspaces`,
`:workspace-id`, and `:match` (a map of `:audience`/`:condition`/
`:subject-prefix`/`:claims`, or a ready SDK match).(create-invite client {:keys [email role rbac-group-ids]})Create an organization invite. Requires :email and :role (one of the
invite roles). Optional :rbac-group-ids (a seq of strings).
Create an organization invite. Requires `:email` and `:role` (one of the invite roles). Optional `:rbac-group-ids` (a seq of strings).
(create-service-account client {:keys [name description organization-role]})Create a service account. Requires :name. Optional :description,
:organization-role (:admin/:developer).
Create a service account. Requires `:name`. Optional `:description`, `:organization-role` (`:admin`/`:developer`).
(create-workspace client
{:keys [name display-color external-key-id data-residency
tags]})Create a workspace. Requires :name. Optional :display-color,
:external-key-id, and :data-residency/:tags as ready SDK config objects.
Create a workspace. Requires `:name`. Optional `:display-color`, `:external-key-id`, and `:data-residency`/`:tags` as ready SDK config objects.
(delete-external-key client external-key-id)Delete an external key by id. Returns the delete response as a map.
Delete an external key by id. Returns the delete response as a map.
(delete-invite client invite-id)Delete an invite by id. Returns the delete response as a map.
Delete an invite by id. Returns the delete response as a map.
(get-api-key client api-key-id)Retrieve one organization API key by id.
Retrieve one organization API key by id.
(get-external-key client external-key-id)Retrieve one external key by id.
Retrieve one external key by id.
(get-federation-issuer client issuer-id)Retrieve one federation issuer by id.
Retrieve one federation issuer by id.
(get-federation-rule client rule-id)Retrieve one federation rule by id.
Retrieve one federation rule by id.
(get-invite client invite-id)Retrieve one invite by id.
Retrieve one invite by id.
(get-org-user client user-id)Retrieve one organization user by id.
Retrieve one organization user by id.
(get-organization client)Retrieve the caller's organization, as {:id ... :name ...}.
Retrieve the caller's organization, as `{:id ... :name ...}`.
(get-service-account client service-account-id)Retrieve one service account by id.
Retrieve one service account by id.
(get-workspace client workspace-id)Retrieve one workspace by id.
Retrieve one workspace by id.
(get-workspace-member client workspace-id user-id)Retrieve one workspace member by workspace id and user id.
Retrieve one workspace member by workspace id and user id.
(get-workspace-service-account client workspace-id service-account-id)Retrieve a service account's membership in a workspace.
Retrieve a service account's membership in a workspace.
(list-api-keys client)(list-api-keys client
{:keys [limit after-id before-id status workspace-id
created-by-user-id]})List organization API keys. Options: :limit, :after-id, :before-id,
:status (:active/:archived/:expired/:inactive), :workspace-id,
:created-by-user-id.
List organization API keys. Options: `:limit`, `:after-id`, `:before-id`, `:status` (`:active`/`:archived`/`:expired`/`:inactive`), `:workspace-id`, `:created-by-user-id`.
(list-external-keys client)(list-external-keys client {:keys [limit page]})List external keys. Options: :limit, :page.
List external keys. Options: `:limit`, `:page`.
(list-federation-issuers client)(list-federation-issuers client {:keys [limit page include-archived]})List federation issuers. Options: :limit, :page, :include-archived.
List federation issuers. Options: `:limit`, `:page`, `:include-archived`.
(list-federation-rule-workspaces client rule-id)(list-federation-rule-workspaces client rule-id {:keys [limit page]})List the workspaces attached to a federation rule. Options: :limit, :page.
List the workspaces attached to a federation rule. Options: `:limit`, `:page`.
(list-federation-rules client)(list-federation-rules client {:keys [limit page include-archived issuer-id]})List federation rules. Options: :limit, :page, :include-archived,
:issuer-id.
List federation rules. Options: `:limit`, `:page`, `:include-archived`, `:issuer-id`.
(list-invites client)(list-invites client {:keys [limit after-id before-id email roles statuses]})List invites. Options: :limit, :after-id, :before-id, :email,
:roles (seq of role strings), :statuses (seq of :accepted/:expired/
:pending).
List invites. Options: `:limit`, `:after-id`, `:before-id`, `:email`, `:roles` (seq of role strings), `:statuses` (seq of `:accepted`/`:expired`/ `:pending`).
(list-org-users client)(list-org-users client {:keys [limit after-id before-id email roles]})List organization users. Options: :limit, :after-id, :before-id,
:email, :roles (a seq of role strings).
List organization users. Options: `:limit`, `:after-id`, `:before-id`, `:email`, `:roles` (a seq of role strings).
(list-rate-limits client)(list-rate-limits client {:keys [limit page model group-type]})List organization rate limits. Options: :limit, :page, :model,
:group-type (:batch/:files/:model-group/:skills/:token-count/
:web-search).
List organization rate limits. Options: `:limit`, `:page`, `:model`, `:group-type` (`:batch`/`:files`/`:model-group`/`:skills`/`:token-count`/ `:web-search`).
(list-service-account-workspaces client service-account-id)(list-service-account-workspaces client service-account-id {:keys [limit page]})List the workspaces a service account belongs to. Options: :limit, :page.
List the workspaces a service account belongs to. Options: `:limit`, `:page`.
(list-service-accounts client)(list-service-accounts client {:keys [limit page include-archived]})List service accounts. Options: :limit, :page, :include-archived.
List service accounts. Options: `:limit`, `:page`, `:include-archived`.
(list-workspace-members client workspace-id)(list-workspace-members client workspace-id {:keys [limit after-id before-id]})List a workspace's members. Options: :limit, :after-id, :before-id.
List a workspace's members. Options: `:limit`, `:after-id`, `:before-id`.
(list-workspace-rate-limits client workspace-id)(list-workspace-rate-limits client workspace-id {:keys [limit page group-type]})List a workspace's rate limits. Options: :limit, :page, :group-type.
List a workspace's rate limits. Options: `:limit`, `:page`, `:group-type`.
(list-workspace-service-accounts client workspace-id)(list-workspace-service-accounts client workspace-id {:keys [limit page]})List a workspace's service accounts. Options: :limit, :page.
List a workspace's service accounts. Options: `:limit`, `:page`.
(list-workspaces client)(list-workspaces client {:keys [limit after-id before-id include-archived]})List workspaces. Options: :limit, :after-id, :before-id,
:include-archived.
List workspaces. Options: `:limit`, `:after-id`, `:before-id`, `:include-archived`.
(remove-federation-rule-workspace client rule-id workspace-id)Detach a workspace from a federation rule. Returns the removal response map.
Detach a workspace from a federation rule. Returns the removal response map.
(remove-org-user client user-id)Remove a user from the organization. Returns the removal response as a map.
Remove a user from the organization. Returns the removal response as a map.
(remove-service-account-workspace client service-account-id workspace-id)Remove a service account from a workspace. Returns the removal response map.
Remove a service account from a workspace. Returns the removal response map.
(remove-workspace-member client workspace-id user-id)Remove a user from a workspace. Returns the removal response as a map.
Remove a user from a workspace. Returns the removal response as a map.
(remove-workspace-service-account client workspace-id service-account-id)Remove a service account from a workspace. Returns the removal response map.
Remove a service account from a workspace. Returns the removal response map.
(update-api-key client api-key-id {:keys [name status]})Update an API key's :name and/or :status (:active, :archived,
:inactive).
Update an API key's `:name` and/or `:status` (`:active`, `:archived`, `:inactive`).
(update-external-key client
external-key-id
{:keys [display-name geo aws-provider-config
gcp-provider-config provider-config]})Update an external key's :display-name, provider config
(:aws-provider-config/:gcp-provider-config/:provider-config), or :geo.
Update an external key's `:display-name`, provider config (`:aws-provider-config`/`:gcp-provider-config`/`:provider-config`), or `:geo`.
(update-federation-issuer client
issuer-id
{:keys [name issuer-url explicit-url-jwks jwks
check-jti max-jwt-lifetime-seconds
jwks-polling-disabled]})Update a federation issuer's :name, :issuer-url, JWKS
(:explicit-url-jwks/:jwks), :check-jti, :max-jwt-lifetime-seconds, or
:jwks-polling-disabled.
Update a federation issuer's `:name`, `:issuer-url`, JWKS (`:explicit-url-jwks`/`:jwks`), `:check-jti`, `:max-jwt-lifetime-seconds`, or `:jwks-polling-disabled`.
(update-federation-rule client
rule-id
{:keys [name description oauth-scope
token-lifetime-seconds applies-to-all-workspaces
workspace-id target match]})Update a federation rule's :name, :description, :oauth-scope,
:token-lifetime-seconds, :applies-to-all-workspaces, :workspace-id,
:target, or :match.
Update a federation rule's `:name`, `:description`, `:oauth-scope`, `:token-lifetime-seconds`, `:applies-to-all-workspaces`, `:workspace-id`, `:target`, or `:match`.
(update-org-user client user-id {:keys [role]})Update an organization user's :role (one of the organization roles).
Update an organization user's `:role` (one of the organization roles).
(update-service-account client
service-account-id
{:keys [description organization-role]})Update a service account's :description and/or :organization-role.
Update a service account's `:description` and/or `:organization-role`.
(update-workspace client
workspace-id
{:keys [name display-color external-key-id data-residency
tags]})Update a workspace's :name, :display-color, :external-key-id, or
:data-residency/:tags (ready SDK config objects).
Update a workspace's `:name`, `:display-color`, `:external-key-id`, or `:data-residency`/`:tags` (ready SDK config objects).
(update-workspace-member client workspace-id user-id {:keys [workspace-role]})Update a workspace member's :workspace-role (any workspace role).
Update a workspace member's `:workspace-role` (any workspace role).
(update-workspace-service-account client
workspace-id
service-account-id
{:keys [workspace-role]})Update a workspace service account's :workspace-role (a non-billing role).
Update a workspace service account's `:workspace-role` (a non-billing role).
(validate-external-key client external-key-id)Validate an external key by id. Returns the validation response as a map.
Validate an external key by id. Returns the validation response as a map.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |