Skip to content

API Reference — Batch 12

This batch documents auth security endpoints and model registry status management endpoints.

Base URL: https://api.arbitex.ai

Authentication: All endpoints require a Bearer token. Admin endpoints require a token belonging to a user with the admin or security_auditor role unless noted.


Retrieve audit log events. Supports the user_id=me alias for self-service access and action=auth.* wildcard for filtering to authentication events.

Authentication: Any authenticated user (self-service with user_id=me); admin role required for arbitrary user_id.

ParameterTypeRequiredDescription
user_idstringNoFilter by user ID. Use the literal string me to query the authenticated user’s own events. Admin role required for any other value.
actionstringNoFilter by action. Supports exact match (auth.login.success) and wildcard suffix (auth.*). Multiple values comma-separated.
fromISO 8601NoStart of date range (inclusive). Default: 90 days ago.
toISO 8601NoEnd of date range (inclusive). Default: now.
limitintegerNoMaximum records to return. Range: 1–1000. Default: 100.
cursorstringNoPagination cursor from a previous response’s next_cursor field.

The action=auth.* wildcard matches all 12 auth event types:

auth.login.success
auth.login.failure
auth.login.mfa_required
auth.login.mfa_success
auth.login.mfa_failure
auth.logout
auth.session.revoked
auth.session.expired
auth.token.issued
auth.token.revoked
auth.password.changed
auth.saml.sso
Terminal window
# Self-service: authenticated user's own auth events
curl -H "Authorization: Bearer $TOKEN" \
"https://api.arbitex.ai/v1/audit/events?user_id=me&action=auth.*&limit=50"
# Admin: auth events for a specific user
curl -H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/v1/audit/events?user_id=user_abc123&action=auth.*"
# All org auth events in a date range
curl -H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/v1/audit/events?action=auth.*&from=2026-03-01T00:00:00Z&to=2026-03-13T23:59:59Z"
{
"events": [
{
"id": "evt_01HXK2M3N4P5Q6R7S8T9",
"time": "2026-03-13T18:42:11Z",
"action": "auth.login.success",
"actor": {
"user_id": "user_abc123",
"email": "alice@example.com"
},
"target": {
"type": "session",
"id": "sess_01HXK2M3N4P5Q6R7"
},
"src": {
"ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
},
"geo": {
"city": "New York",
"region": "New York",
"country_name": "United States",
"country_code": "US",
"latitude": 40.7128,
"longitude": -74.0060
},
"detail": {
"mfa_used": true,
"mfa_method": "totp"
}
}
],
"total": 142,
"limit": 50,
"next_cursor": "eyJvZmZzZXQiOjUwfQ=="
}
FieldTypeDescription
idstringUnique event ID (ULID format)
timeISO 8601Event timestamp UTC
actionstringEvent type from the 12-value enum
actor.user_idstringUser ID of the authenticating principal
actor.emailstringEmail address of the authenticating principal
target.typestringResource type affected (session, token)
target.idstringResource ID affected
src.ipstringSource IP address
src.user_agentstringRaw HTTP User-Agent string
geo.*objectGeoIP-enriched location; may be absent for private IPs
detailobjectEvent-specific supplementary fields (varies by action)
StatusCodeDescription
400invalid_filteraction wildcard pattern is malformed or from/to not valid ISO 8601
403forbiddenNon-admin user specified a user_id other than me
404user_not_foundSpecified user_id does not exist in the organization

List active sessions. Returns all currently valid sessions for the organization (admin) or filtered by user.

Authentication: Admin role required.

ParameterTypeRequiredDescription
user_idstringNoFilter to sessions belonging to a specific user
limitintegerNoMaximum records. Range: 1–500. Default: 100.
cursorstringNoPagination cursor
Terminal window
# All active sessions in the org
curl -H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/api/admin/sessions"
# Sessions for a specific user
curl -H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/api/admin/sessions?user_id=user_abc123"
{
"sessions": [
{
"id": "sess_01HXK2M3N4P5Q6R7",
"user_id": "user_abc123",
"user_email": "alice@example.com",
"created_at": "2026-03-13T18:42:11Z",
"last_active_at": "2026-03-13T20:15:33Z",
"expires_at": "2026-03-20T18:42:11Z",
"src_ip": "203.0.113.42",
"user_agent": "Mozilla/5.0 ...",
"geo": {
"city": "New York",
"country_code": "US"
},
"device": {
"browser": "Chrome",
"browser_version": "122",
"os": "macOS",
"device_type": "desktop"
}
}
],
"total": 47,
"limit": 100,
"next_cursor": null
}
FieldTypeDescription
idstringSession ID
user_idstringOwner user ID
user_emailstringOwner email address
created_atISO 8601Session creation time
last_active_atISO 8601Most recent authenticated request on this session
expires_atISO 8601Hard expiry time
src_ipstringIP at session creation
user_agentstringUser-Agent at session creation
geoobjectGeoIP location at session creation
deviceobjectParsed device information
StatusCodeDescription
403forbiddenCaller does not have admin role
404user_not_foundSpecified user_id does not exist

Force-terminate a single session by ID.

Authentication: Admin role required.

ParameterTypeRequiredDescription
idstringYesSession ID to terminate
Terminal window
curl -X DELETE \
-H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/api/admin/sessions/sess_01HXK2M3N4P5Q6R7"
{
"id": "sess_01HXK2M3N4P5Q6R7",
"status": "revoked",
"revoked_at": "2026-03-13T21:00:00Z",
"audit_event_id": "evt_01HXK9Z1A2B3C4D5"
}

The session is invalidated immediately. Subsequent requests using this session token receive 401 Unauthorized.

An auth.session.revoked audit event is created. The event’s actor is the calling admin; target.id is the revoked session ID; detail.target_user_id is the session owner.

StatusCodeDescription
403forbiddenCaller does not have admin role
404session_not_foundSession ID not found or already expired/revoked
409session_already_revokedSession was already revoked before this call

Force-logout all active sessions for a user. This is a bulk operation: all currently valid sessions belonging to the user are terminated atomically.

Authentication: Admin role required.

ParameterTypeRequiredDescription
idstringYesUser ID whose sessions should all be terminated
Terminal window
curl -X DELETE \
-H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/api/admin/users/user_abc123/sessions"
{
"user_id": "user_abc123",
"sessions_revoked": 3,
"revoked_at": "2026-03-13T21:00:00Z",
"audit_event_id": "evt_01HXK9Z1A2B3C4D6"
}
FieldTypeDescription
user_idstringTarget user ID
sessions_revokedintegerCount of sessions terminated by this call
revoked_atISO 8601Timestamp of the bulk revocation
audit_event_idstringID of the auth.session.revoked audit event created (one event with detail.bulk: true)

Returns { "sessions_revoked": 0 } (HTTP 200) if the user has no active sessions — not an error.

StatusCodeDescription
403forbiddenCaller does not have admin role
404user_not_foundSpecified user ID does not exist

Update the status of a model in the model registry. This endpoint drives the model validation lifecycle state machine.

Authentication: Admin role required.

ParameterTypeRequiredDescription
idstringYesModel registry ID

The model lifecycle follows this state machine:

draft → pending_review → validated
draft → deprecated
pending_review → validated
pending_review → draft (send back for revision)
validated → deprecated
deprecated → draft (re-activate for re-validation)

Attempting an invalid transition returns 409 invalid_transition.

{
"status": "validated",
"reason": "Passed all validation checks including red-team evaluation.",
"effective_at": "2026-03-14T00:00:00Z"
}
FieldTypeRequiredDescription
statusstringYesTarget status. One of: draft, pending_review, validated, deprecated
reasonstringNoHuman-readable reason for the transition. Stored in the status history.
effective_atISO 8601NoWhen the status change takes effect. Defaults to the time of the API call. Future-dated transitions are scheduled but not yet enforced until the effective time.
Terminal window
curl -X POST \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "validated",
"reason": "Completed red-team review and bias evaluation. Approved for production use."
}' \
"https://api.arbitex.ai/api/admin/models/model_abc123/status"
{
"model_id": "model_abc123",
"previous_status": "pending_review",
"status": "validated",
"reason": "Completed red-team review and bias evaluation. Approved for production use.",
"effective_at": "2026-03-13T21:00:00Z",
"updated_by": "admin@example.com",
"updated_at": "2026-03-13T21:00:00Z"
}
FieldTypeDescription
model_idstringModel registry ID
previous_statusstringStatus before this transition
statusstringNew status after this transition
reasonstringReason text as submitted
effective_atISO 8601When the status is/was applied
updated_bystringEmail of the admin who made the change
updated_atISO 8601Timestamp of this API call
StatusCodeDescription
400invalid_statusstatus value not in the valid enum
403forbiddenCaller does not have admin role
404model_not_foundModel ID not in the registry
409invalid_transitionThe requested status transition is not permitted by the state machine

Retrieve the full status transition history for a model. Returns all transitions from creation to present in chronological order.

Authentication: Admin role required.

ParameterTypeRequiredDescription
idstringYesModel registry ID
ParameterTypeRequiredDescription
limitintegerNoMaximum records. Range: 1–200. Default: 50.
cursorstringNoPagination cursor
Terminal window
curl -H "Authorization: Bearer $ADMIN_TOKEN" \
"https://api.arbitex.ai/api/admin/models/model_abc123/status/history"
{
"model_id": "model_abc123",
"current_status": "validated",
"history": [
{
"id": "hist_01HXK2M3N4P5Q6R7",
"from_status": null,
"to_status": "draft",
"reason": "Auto-discovered via audit log scan.",
"effective_at": "2026-03-01T10:00:00Z",
"updated_by": "system",
"updated_at": "2026-03-01T10:00:00Z"
},
{
"id": "hist_01HXK3M4N5P6Q7R8",
"from_status": "draft",
"to_status": "pending_review",
"reason": "Submitted for red-team evaluation.",
"effective_at": "2026-03-10T14:30:00Z",
"updated_by": "admin@example.com",
"updated_at": "2026-03-10T14:30:00Z"
},
{
"id": "hist_01HXK9Z1A2B3C4D7",
"from_status": "pending_review",
"to_status": "validated",
"reason": "Completed red-team review and bias evaluation.",
"effective_at": "2026-03-13T21:00:00Z",
"updated_by": "admin@example.com",
"updated_at": "2026-03-13T21:00:00Z"
}
],
"total": 3,
"limit": 50,
"next_cursor": null
}
FieldTypeDescription
model_idstringModel registry ID
current_statusstringCurrent status of the model
history[].idstringUnique transition record ID
history[].from_statusstring | nullPrevious status; null for initial creation
history[].to_statusstringStatus after this transition
history[].reasonstringReason text as recorded
history[].effective_atISO 8601When this status became effective
history[].updated_bystringEmail or "system" for auto-discovered transitions
history[].updated_atISO 8601Timestamp of the API call that recorded this transition
StatusCodeDescription
403forbiddenCaller does not have admin role
404model_not_foundModel ID not in the registry