tenants
tenants, members, seats, groups, email domains, invite links
A collection of operations for tenants (organizations) and their members. Alongside single-tenant reads and the member directory / org chart reads, there is an admin op that deletes a membership entirely. Deletion (rejoining possible) and deactivation (blocked until reactivated) are different actions, so the criteria for choosing between them matter. The operational flow of inviting and cleaning up members is covered in the member management guide.
5 operations — tenants, members, seats, groups, email domains, invite links
GET /api/v1/tenants
tenantsGetApiV1Tenants
전체 테넌트 목록을 반환한다.
- 호출 권한: platform_admin (
RequirePlatformAdminmiddleware — 일반 사용자는 403). - Phase 1: 페이징 미지원 — 응답은 항상 전체.
- 부수 효과 없음 (read-only).
| Language | Call |
|---|---|
| node | not in @ax-hub/sdk — use @ax-hub/admin-sdk tenants.list in the ops package @ax-hub/admin-sdk |
| go | client.Tenants().TenantsGetApiV1Tenants(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.tenants().tenantsGetApiV1Tenants(pathParams, query, body) — async: tenantsGetApiV1TenantsAsync(…) → CompletableFuture |
| kotlin | client.tenants.tenantsGetApiV1Tenants(pathParams, query, body) — suspend |
| python | client.tenants.tenants_get_api_v1_tenants(path_params=…, query=…, body=…) — AsyncAxHubClient awaits the same name |
| ruby | client.tenants.tenants_get_api_v1_tenants(path_params: …, query: …, body: …) |
| generic | request("tenantsGetApiV1Tenants", pathParams, query, body) |
Response — 200 · 테넌트 목록
| Name | Type | Description |
|---|---|---|
items | array<object> | |
nextCursor (wire: next_cursor) | string | |
total | integer |
Error statuses: 401 403 500 — Error handling
GET /api/v1/tenants/{tenantID}
tenantsGetApiV1TenantsByTenantID
테넌트 UUID 로 단건 조회 (id / slug / name / icon / description).
- 호출 권한: 자기 테넌트 멤버만 (
RequireTenantMemberOnPath). SaaS 격리 — 다른 테넌트 사용자에겐 조직 메타데이터도 노출 X. - path 의 tenantID 가 UUID 형식이 아니면 400.
- 부수 효과 없음 (read-only).
| Language | Call |
|---|---|
| node | sdk.tenants.get(…) — resource model — see the package's TypeScript definitions for arguments and return types |
| go | client.Tenants().TenantsGetApiV1TenantsByTenantID(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.tenants().tenantsGetApiV1TenantsByTenantID(pathParams, query, body) — async: tenantsGetApiV1TenantsByTenantIDAsync(…) → CompletableFuture |
| kotlin | client.tenants.tenantsGetApiV1TenantsByTenantID(pathParams, query, body) — suspend |
| python | client.tenants.tenants_get_api_v1_tenants_by_tenant_id(path_params=…, query=…, body=…) — AsyncAxHubClient awaits the same name |
| ruby | client.tenants.tenants_get_api_v1_tenants_by_tenant_id(path_params: …, query: …, body: …) |
| generic | request("tenantsGetApiV1TenantsByTenantID", pathParams, query, body) |
Path parameters — pass via pathParams
| Name | Type | Description |
|---|---|---|
tenantID required | string | 테넌트 UUID |
Response — 200 · 테넌트
| Name | Type | Description |
|---|---|---|
adminEmail (wire: admin_email) | string | AdminEmail 은 가장 오래된 active tenant_admin 의 email (없으면 null). 관리 UI 의 owner 컬럼 표시용 — 결정적 단일 admin (created_at ASC) 으로 페이지로드 간 안정. |
appCount (wire: app_count) | integer | AppCount 는 not-soft-deleted 앱의 수. enrich 불가 시 0. |
createdAt (wire: created_at) | string | CreatedAt 은 생성 시각. |
deletedAt (wire: deleted_at) | string | DeletedAt 은 soft delete 시각 (활성 테넌트는 null). |
description | string | Description 은 테넌트 설명 (없으면 null). |
iconUrl (wire: icon_url) | string | IconURL 은 테넌트 아이콘 이미지 URL (없으면 null). |
id | string | ID 는 테넌트 UUID. |
memberCount (wire: member_count) | integer | MemberCount 는 active 멤버십 (is_active=true) 의 수. enrich 불가 시 0. |
name | string | Name 은 사람이 읽는 표시 이름. |
slug | string | Slug 는 URL 식별자. [a-z][a-z0-9_]*[a-z0-9] 패턴, 전 시스템에서 unique. |
updatedAt (wire: updated_at) | string | UpdatedAt 은 마지막 수정 시각. |
Error statuses: 400 401 403 404 500 — Error handling
GET /api/v1/tenants/{tenantID}/members/directory
tenantsGetApiV1TenantsByTenantIDMembersDirectory
같은 테넌트의 활성 멤버 목록을 반환한다. admin 멤버 목록(/members)과
달리 관리 메타데이터는 제외하되 user_id·이름·이메일·아바타·역할·그룹을
노출 — 일반 멤버가 같은 조직 동료를 식별·연락·@mention 하는 용도
(spec 095 — 조직도와 이메일 노출 정책 통일).
- 호출 권한: tenant_member (테넌트의 활성 멤버,
RequireTenantMemberOnPath). 비-멤버/다른 테넌트는 403. - 활성 멤버만 (비활성 멤버·삭제된 사용자 row 는 제외).
- Phase 1: 페이징 미지원 — 응답은 항상 전체.
- 부수 효과 없음 (read-only).
| Language | Call |
|---|---|
| node | sdk.tenants.membersDirectory(…) — resource model — see the package's TypeScript definitions for arguments and return types |
| go | client.Tenants().TenantsGetApiV1TenantsByTenantIDMembersDirectory(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.tenants().tenantsGetApiV1TenantsByTenantIDMembersDirectory(pathParams, query, body) — async: tenantsGetApiV1TenantsByTenantIDMembersDirectoryAsync(…) → CompletableFuture |
| kotlin | client.tenants.tenantsGetApiV1TenantsByTenantIDMembersDirectory(pathParams, query, body) — suspend |
| python | client.tenants.tenants_get_api_v1_tenants_by_tenant_id_members_directory(path_params=…, query=…, body=…) — AsyncAxHubClient awaits the same name |
| ruby | client.tenants.tenants_get_api_v1_tenants_by_tenant_id_members_directory(path_params: …, query: …, body: …) |
| generic | request("tenantsGetApiV1TenantsByTenantIDMembersDirectory", pathParams, query, body) |
Path parameters — pass via pathParams
| Name | Type | Description |
|---|---|---|
tenantID required | string | 테넌트 UUID |
Response — 200 · 조직원 디렉토리 (PII 축소)
| Name | Type | Description |
|---|---|---|
items | array<object> | |
nextCursor (wire: next_cursor) | string | |
total | integer |
Error statuses: 400 401 403 500 — Error handling
DELETE /api/v1/tenants/{tenantID}/members/{membershipID}
tenantsDeleteApiV1TenantsByTenantIDMembersByMembershipID
멤버십 행을 물리 삭제한다 — 멤버 목록에서 사라진다 (spec 173). 비활성화(차단)와 별개 동작: 삭제된 사람은 재초대 또는 SSO 자동 가입으로 새 멤버로 재가입할 수 있다. 접근을 계속 막아야 하면 비활성화를 쓸 것 (행이 남아 재가입까지 차단).
- 호출 권한: tenant_admin (
RequireTenantAdminOnPath— 일반 멤버는 403). - 활성/비활성 무관하게 삭제 가능. 단 마지막 활성 admin 은 409 (
last_admin). - 부수 효과: 감사 기록 (tenants.member_removed, emit-first — 기록 실패 시 삭제 중단), AXRouter 연동 테넌트면 라우터 deprovision 미러 (best-effort), 멤버 전용 에이전트는 회수 스윕이 자동 정리, 점유 좌석은 행 삭제로 반환.
- spec 173 신규 표면 — SDK 릴리스에 순차 반영 중 (미포함 버전에서는 아래 이름의 메서드가 아직 없다).
| Language | Call |
|---|---|
| node | not provided |
| go | client.Tenants().TenantsDeleteApiV1TenantsByTenantIDMembersByMembershipID(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.tenants().tenantsDeleteApiV1TenantsByTenantIDMembersByMembershipID(pathParams, query, body) — async: tenantsDeleteApiV1TenantsByTenantIDMembersByMembershipIDAsync(…) → CompletableFuture |
| kotlin | client.tenants.tenantsDeleteApiV1TenantsByTenantIDMembersByMembershipID(pathParams, query, body) — suspend |
| python | client.tenants.tenants_delete_api_v1_tenants_by_tenant_id_members_by_membership_id(path_params=…, query=…, body=…) — AsyncAxHubClient awaits the same name |
| ruby | client.tenants.tenants_delete_api_v1_tenants_by_tenant_id_members_by_membership_id(path_params: …, query: …, body: …) |
| generic | request("tenantsDeleteApiV1TenantsByTenantIDMembersByMembershipID", pathParams, query, body) |
Path parameters — pass via pathParams
| Name | Type | Description |
|---|---|---|
tenantID required | string | 테넌트 UUID |
membershipID required | string | 멤버십 UUID |
Response — 204 · 삭제 성공 (no content)
No body → the SDK returns an empty map {}
Error statuses: 400 401 403 404 409 500 — Error handling
GET /api/v1/tenants/{tenantID}/org-directory
tenantsGetApiV1TenantsByTenantIDOrgDirectory
회사 IdP(Okta/Azure)가 SCIM 으로 밀어넣은 조직 구조를 부서(그룹)→인원으로 반환한다.
- 호출 권한: tenant_member (자기 테넌트의 활성 멤버면 관리자 아니어도 열람). 다른 테넌트는 403.
- 아직 로그인/가입하지 않은 인원도 미러 데이터 그대로 노출 (joined 플래그로 구분).
- v1 은 테넌트의 모든 그룹을 부서로 표시. 어느 부서에도 없는 인원은 unassigned 로.
- 표시 이름이 없으면 이메일로 폴백. 부수 효과 없음 (read-only).
| Language | Call |
|---|---|
| node | sdk.tenants.orgDirectory(…) — resource model — see the package's TypeScript definitions for arguments and return types |
| go | client.Tenants().TenantsGetApiV1TenantsByTenantIDOrgDirectory(ctx, axhub.OperationParams{PathParams: …, Query: …, Body: …}) |
| java | client.tenants().tenantsGetApiV1TenantsByTenantIDOrgDirectory(pathParams, query, body) — async: tenantsGetApiV1TenantsByTenantIDOrgDirectoryAsync(…) → CompletableFuture |
| kotlin | client.tenants.tenantsGetApiV1TenantsByTenantIDOrgDirectory(pathParams, query, body) — suspend |
| python | client.tenants.tenants_get_api_v1_tenants_by_tenant_id_org_directory(path_params=…, query=…, body=…) — AsyncAxHubClient awaits the same name |
| ruby | client.tenants.tenants_get_api_v1_tenants_by_tenant_id_org_directory(path_params: …, query: …, body: …) |
| generic | request("tenantsGetApiV1TenantsByTenantIDOrgDirectory", pathParams, query, body) |
Path parameters — pass via pathParams
| Name | Type | Description |
|---|---|---|
tenantID required | string | 테넌트 UUID |
Response — 200 · 부서별 조직도 + 미배정
| Name | Type | Description |
|---|---|---|
departments | array<object> | Departments 는 테넌트의 모든 그룹(부서)과 소속 인원. |
unassigned | array<object> | Unassigned 는 어느 부서에도 속하지 않은 인원. |
Error statuses: 400 401 403 500 — Error handling