Skip to main content

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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
filterquerystringnoQuery parameter: filter.
sincequerystring or nullnoQuery parameter: since.
limitqueryintegernoMaximum number of rows to return.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list audit.application/json array of object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
filterquerystringnoQuery parameter: filter.
sincequerystring or nullnoQuery parameter: since.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for export audit.application/json any
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
limitqueryintegernoPage size. At most 1000.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list members.application/json array of object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for invite member.

Responses

StatusDescriptionBody
200Successful response for invite member.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for export members.application/json any
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
dryRunquerybooleannoMust be true: the import only reports. Apply each invite row through POST /members.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for import members.

Responses

StatusDescriptionBody
200Successful response for import members.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
user_idpathstringyesPath parameter identifying the user id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for update member.

Responses

StatusDescriptionBody
200Successful response for update member.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
user_idpathstringyesPath parameter identifying the user id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
204Successful response for offboard member.—
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
user_idpathstringyesPath parameter identifying the user id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for resend member invite.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
user_idpathstringyesPath parameter identifying the user id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for member reset two factor.

Responses

StatusDescriptionBody
200Successful response for member reset two factor.application/json TwoFactorResetResult
403The caller is not an owner of this workspace (owner_required), or called with an API key (session_required).—
404The user is not an active member of this workspace.—
409The member belongs to another workspace as well (multi_tenant_member), or the caller tried to reset their own two-factor (self_reset).—
422Reason 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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get my permissions.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
limitqueryintegernoPage size. At most 1000.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list roles.application/json array of object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for create role.

Responses

StatusDescriptionBody
200Successful response for create role.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
role_idpathstringyesRole identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get role.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
role_idpathstringyesRole identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for update role.

Responses

StatusDescriptionBody
200Successful response for update role.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
role_idpathstringyesRole identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
204Successful response for delete role.—
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
role_idpathstringyesRole identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for duplicate role.

Responses

StatusDescriptionBody
200Successful response for duplicate role.application/json object
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read the two-factor policy.application/json TwoFactorPolicy
422Validation Errorapplication/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

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for change the two-factor policy.

Responses

StatusDescriptionBody
200Successful response for change the two-factor policy.application/json TwoFactorPolicy
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

MemberImportUploadBody​

Body_import_members_v1_access__tenant_slug__members_import_post schema.

PropertyTypeRequiredDescription
filestring (binary)yesCSV with an email,role,display_name header.

MemberInviteRequest​

Invite an existing account to the tenant and assign a role.

PropertyTypeRequiredDescription
emailstringyesEmail.
role_idstring or nullnoRole ID.

MemberUpdateRequest​

Change a member's role and/or lifecycle status.

PropertyTypeRequiredDescription
role_idstring or nullnoRole ID.
statusstring or nullnoStatus.

RoleDuplicateRequest​

Clone an existing role under a new name.

PropertyTypeRequiredDescription
namestringyesHuman-readable name.

RoleWriteRequest​

Create/update payload for a role (name, description, full permission grid).

PropertyTypeRequiredDescription
namestringyesHuman-readable name.
descriptionstring or nullnoFree-text description.
permissionsarray of PermissionCellnoPermissions.

TwoFactorPolicy​

The tenant's two-factor policy.

PropertyTypeRequiredDescription
require_two_factorbooleanyesWhen true, every member must turn on two-factor.
grace_daysintegeryesDays a member without two-factor may keep working after the policy is on or they join.
required_sincestring or nullnoWhen the policy was last turned on (ISO-8601); null while off.
complianceTwoFactorCompliancenoActive members by state; all zero while the policy is off.

TwoFactorPolicyInput​

A policy change. Omitted fields are left alone.

PropertyTypeRequiredDescription
require_two_factorboolean or nullnoRequire Two Factor.
grace_daysinteger or nullnoGrace Days.

TwoFactorResetRequest​

Why the factor is being reset, and proof the caller means this user.

PropertyTypeRequiredDescription
reasonstringyesWhy the two-factor is being reset (10–500 characters). Stored in the audit trail.
confirmstringyesThe target user's email address, typed out to confirm the reset.

TwoFactorResetResult​

What a reset cleared.

PropertyTypeRequiredDescription
user_idstringyesThe user whose two-factor was reset.
emailstring or nullnoThat user's email address.
namestring or nullnoThat user's display name.
had_two_factorbooleanyesWhether the user had two-factor on before the reset.
sessions_revokedintegeryesHow many of the user's sessions were ended.
trusted_devices_revokedintegeryesHow many trusted-device records were removed.