Access
Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.
Tag: access · 19 operations
GET /v1/access/{tenant_slug}/audit
List Audit
List access-audit entries for the tenant, newest first, with an optional category filter.
Categories are all, role, permission, member, admin, styleGuide
(style-guide governance: create / edit / assign, GOV-1.6) and portal (Browse reader
enrolment, sign-in and sign-out, PCX-1.1). An unknown value is treated as all.
since is an optional ISO 8601 lower bound on created_at — what the UI's date range
sends, and what its CSV export sends back so the two agree (HIVE-5.5, #5308).
Each row carries prev_hash and entry_hash, its position in the tenant's hash chain.
Operation id: list_audit_v1_access__tenant_slug__audit_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
filter | query | string | no | Query parameter: filter. |
since | query | string or null | no | Query parameter: since. |
limit | query | integer | no | Maximum number of rows to return. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for list audit. | application/json array of object |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/access/{tenant_slug}/audit/export
Export Audit
Export the tenant's access-audit ledger as CSV (SOC 2 / ISO 27001 access-review evidence).
Takes the same filter and since narrowing as the list endpoint, so the CSV holds the
rows the reader was looking at rather than a second, wider answer. Omitting both exports
the whole ledger, which is what every caller before HIVE-5.5 (#5308) got.
Operation id: export_audit_v1_access__tenant_slug__audit_export_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
filter | query | string | no | Query parameter: filter. |
since | query | string or null | no | Query parameter: since. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for export audit. | application/json any |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/access/{tenant_slug}/members
List Members
List tenant members with their role, lifecycle status, and admin flag.
The body is a JSON array of at most limit members (1,000 at most), by display name.
X-Has-More says whether more exist and X-Next-Cursor carries the cursor of the
next page (#7196).
Operation id: list_members_v1_access__tenant_slug__members_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
limit | query | integer | no | Page size. At most 1000. |
cursor | query | string or null | no | Opaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for list members. | application/json array of object |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/members
Invite Member
Invite an existing account into the tenant and optionally assign a role.
The invitee must already have an Apiome account (email-only invites that provision brand-new
accounts are a later SSO/SCIM ticket). The new membership is created active.
Seat-gated (OLO-5.3, #4213): when the tenant's license seats
(seats.max_users_per_tenant) are all occupied by non-suspended members, the
request is refused with a structured 403 (code license-seats-exhausted)
before any lookup or write happens — including re-invites of existing members,
which are inert at capacity anyway.
Operation id: invite_member_v1_access__tenant_slug__members_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for invite member.
application/json—MemberInviteRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for invite member. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/access/{tenant_slug}/members/export
Export Members
Export the tenant's members as CSV (EID-2.5, #5671).
Columns: email, status, role, two_factor (enabled | disabled),
provenance (invite | sso:<id> | scim), last_sign_in (the newest
successful sign-in in auth_events) and created (when the membership was made).
Importing the file back reports every row as already-member.
Needs members:view, the same as reading the roster.
Operation id: export_members_v1_access__tenant_slug__members_export_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for export members. | application/json any |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/members/import
Import Members
Dry-run a bulk CSV member import and report what each row would do (EID-2.5, #5671).
The file has a header row with an email column and optional role (id, slug or name;
empty for the default role) and display_name columns; other columns are ignored. At most
1,000 data rows. Each row gets an outcome: invite, already-member,
invalid-email, unknown-role, no-account or seat-cap.
Nothing is written — not a membership, not a role, not an audit entry. Applying the report
is the caller's job: send each invite row to POST /v1/access/{tenant}/members with
its email and role_id, so the seat guard (license-seats-exhausted), the rate
limit and the member.invited audit entry apply per row, as they do to any invitation.
Needs members:create, the same as inviting.
:raises HTTPException: 400 when dryRun is false or the file cannot be read as CSV,
413 when it is over 1 MiB.
Operation id: import_members_v1_access__tenant_slug__members_import_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
dryRun | query | boolean | no | Must be true: the import only reports. Apply each invite row through POST /members. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for import members.
multipart/form-data—MemberImportUploadBody
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for import members. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
PATCH /v1/access/{tenant_slug}/members/{user_id}
Update Member
Assign a member's role and/or change their lifecycle status (suspend / reinstate).
Operation id: update_member_v1_access__tenant_slug__members__user_id__patch
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
user_id | path | string | yes | Path parameter identifying the user id segment. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for update member.
application/json—MemberUpdateRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for update member. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
DELETE /v1/access/{tenant_slug}/members/{user_id}
Offboard Member
Offboard a member: remove membership, role assignment, and any tenant-admin row.
Operation id: offboard_member_v1_access__tenant_slug__members__user_id__delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
user_id | path | string | yes | Path parameter identifying the user id segment. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful response for offboard member. | — |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/members/{user_id}/resend-invite
Resend Member Invite
Re-issue a member's outstanding invitation (HIVE-5.2, #5305).
Apiome does not mail invitations: :func:invite_member requires the invitee to hold an
account already, and a pending membership becomes active the next time they sign
in. Re-issuing therefore renews the invitation rather than re-sending a message — the
membership row is re-stamped so the members screen's "Invited {date}" reads freshly, and
the renewal is recorded in the access ledger as member.invite_resent so an access
review can see who kept an outstanding invitation alive.
Gated on members:create, the same permission as issuing the invitation in the first
place. Consumes no seat: the pending membership already holds one, so the OLO-5.3
capacity guard is deliberately not consulted.
:raises HTTPException: 404 when the user has no membership in the tenant, 409 when their membership is not pending (there is no invitation outstanding to renew).
Operation id: resend_member_invite_v1_access__tenant_slug__members__user_id__resend_invite_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
user_id | path | string | yes | Path parameter identifying the user id segment. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for resend member invite. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/members/{user_id}/two-factor/reset
Member Reset Two Factor
Reset a member's two-factor, as an owner of the workspace.
Allowed only for an owner, only for an active member of this workspace, and only when that member belongs to no other workspace — two-factor protects the whole account, so a member shared with another workspace is left to the installation's super-admin. An owner cannot reset their own two-factor here; they manage it on their Profile page.
Recorded in the authentication ledger and in this workspace's access audit, with the reason.
Args: tenant_slug: The workspace the caller is acting in. user_id: The member to reset. payload: The reason, and the member's email typed out as confirmation.
Returns: What was cleared.
Operation id: member_reset_two_factor_v1_access__tenant_slug__members__user_id__two_factor_reset_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
user_id | path | string | yes | Path parameter identifying the user id segment. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for member reset two factor.
application/json—TwoFactorResetRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for member reset two factor. | application/json TwoFactorResetResult |
| 403 | The caller is not an owner of this workspace (owner_required), or called with an API key (session_required). | — |
| 404 | The user is not an active member of this workspace. | — |
| 409 | The member belongs to another workspace as well (multi_tenant_member), or the caller tried to reset their own two-factor (self_reset). | — |
| 422 | Reason missing or out of range, or the confirmation does not match. | — |
GET /v1/access/{tenant_slug}/permissions/me
Get My Permissions
Return the caller's effective resource:action permissions in this tenant.
Tenant administrators are reported as having every permission. The UI uses this to show/hide mutating controls without hard-coding role names.
Operation id: get_my_permissions_v1_access__tenant_slug__permissions_me_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for get my permissions. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/access/{tenant_slug}/roles
List Roles
List the tenant's roles (built-in first) with member counts and permission grids.
The body is a JSON array of at most limit roles (1,000 at most). X-Has-More says
whether more exist and X-Next-Cursor carries the cursor of the next page (#7196).
Operation id: list_roles_v1_access__tenant_slug__roles_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
limit | query | integer | no | Page size. At most 1000. |
cursor | query | string or null | no | Opaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for list roles. | application/json array of object |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/roles
Create Role
Create a custom role with an initial permission grid (Owner/Admin only by default).
Operation id: create_role_v1_access__tenant_slug__roles_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for create role.
application/json—RoleWriteRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for create role. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/access/{tenant_slug}/roles/{role_id}
Get Role
Fetch a single role with its permission grid.
Operation id: get_role_v1_access__tenant_slug__roles__role_id__get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
role_id | path | string | yes | Role identifier. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for get role. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
PUT /v1/access/{tenant_slug}/roles/{role_id}
Update Role
Update a role's name/description and replace its permission grid.
Built-in role names are immutable, but their permission grids may be tuned by an administrator.
Operation id: update_role_v1_access__tenant_slug__roles__role_id__put
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
role_id | path | string | yes | Role identifier. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for update role.
application/json—RoleWriteRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for update role. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
DELETE /v1/access/{tenant_slug}/roles/{role_id}
Delete Role
Delete a custom role. Built-in roles cannot be deleted.
Operation id: delete_role_v1_access__tenant_slug__roles__role_id__delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
role_id | path | string | yes | Role identifier. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful response for delete role. | — |
| 422 | Validation Error | application/json HTTPValidationError |
POST /v1/access/{tenant_slug}/roles/{role_id}/duplicate
Duplicate Role
Clone a role's permission grid into a new custom role.
Operation id: duplicate_role_v1_access__tenant_slug__roles__role_id__duplicate_post
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
role_id | path | string | yes | Role identifier. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for duplicate role.
application/json—RoleDuplicateRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for duplicate role. | application/json object |
| 422 | Validation Error | application/json HTTPValidationError |
GET /v1/tenants/{tenant_slug}/two-factor-policy
Read the two-factor policy
Whether every member must turn on two-factor authentication, the grace period in days, when the requirement was turned on, and how many active members have two-factor (enabled), are still inside their grace period (grace) or are past it (overdue).
A member's deadline is the later of the requirement being turned on and the member joining, plus the grace period.
Requires members:view.
Operation id: get_two_factor_policy_v1_tenants__tenant_slug__two_factor_policy_get
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for read the two-factor policy. | application/json TwoFactorPolicy |
| 422 | Validation Error | application/json HTTPValidationError |
PUT /v1/tenants/{tenant_slug}/two-factor-policy
Change the two-factor policy
Set require_two_factor and/or grace_days (0–90). Omitted fields are left alone. Turning the requirement on starts every member's grace period; turning it off and on again restarts them. Members past their deadline are asked to set up two-factor before they can use the app; API keys are unaffected.
Audited as two_factor_policy.update. Requires members:edit.
Operation id: put_two_factor_policy_v1_tenants__tenant_slug__two_factor_policy_put
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for change the two-factor policy.
application/json—TwoFactorPolicyInput
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful response for change the two-factor policy. | application/json TwoFactorPolicy |
| 422 | Validation Error | application/json HTTPValidationError |
Schemas used
HTTPValidationError
Validation error response emitted when request data fails schema checks.
| Property | Type | Required | Description |
|---|---|---|---|
detail | array of ValidationError | no | Detail. |
MemberImportUploadBody
Body_import_members_v1_access__tenant_slug__members_import_post schema.
| Property | Type | Required | Description |
|---|---|---|---|
file | string (binary) | yes | CSV with an email,role,display_name header. |
MemberInviteRequest
Invite an existing account to the tenant and assign a role.
| Property | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email. |
role_id | string or null | no | Role ID. |
MemberUpdateRequest
Change a member's role and/or lifecycle status.
| Property | Type | Required | Description |
|---|---|---|---|
role_id | string or null | no | Role ID. |
status | string or null | no | Status. |
RoleDuplicateRequest
Clone an existing role under a new name.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable name. |
RoleWriteRequest
Create/update payload for a role (name, description, full permission grid).
| Property | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable name. |
description | string or null | no | Free-text description. |
permissions | array of PermissionCell | no | Permissions. |
TwoFactorPolicy
The tenant's two-factor policy.
| Property | Type | Required | Description |
|---|---|---|---|
require_two_factor | boolean | yes | When true, every member must turn on two-factor. |
grace_days | integer | yes | Days a member without two-factor may keep working after the policy is on or they join. |
required_since | string or null | no | When the policy was last turned on (ISO-8601); null while off. |
compliance | TwoFactorCompliance | no | Active members by state; all zero while the policy is off. |
TwoFactorPolicyInput
A policy change. Omitted fields are left alone.
| Property | Type | Required | Description |
|---|---|---|---|
require_two_factor | boolean or null | no | Require Two Factor. |
grace_days | integer or null | no | Grace Days. |
TwoFactorResetRequest
Why the factor is being reset, and proof the caller means this user.
| Property | Type | Required | Description |
|---|---|---|---|
reason | string | yes | Why the two-factor is being reset (10–500 characters). Stored in the audit trail. |
confirm | string | yes | The target user's email address, typed out to confirm the reset. |
TwoFactorResetResult
What a reset cleared.
| Property | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | The user whose two-factor was reset. |
email | string or null | no | That user's email address. |
name | string or null | no | That user's display name. |
had_two_factor | boolean | yes | Whether the user had two-factor on before the reset. |
sessions_revoked | integer | yes | How many of the user's sessions were ended. |
trusted_devices_revoked | integer | yes | How many trusted-device records were removed. |