Tenants API

Get tenant information, plan details, and manage tenant settings.

POST
/rest/v1/rpc/get_current_tenant
Get current tenant information including plan details and limits.

Authentication

Requires JWT token (Bearer token). Tenant ID is extracted from the JWT token.

Parameters

NameTypeRequiredDescription
p_tenant_idstringRequiredTenant ID (extracted from JWT if not provided)

Responses

200Tenant information
{
  "tenant_id": "tenant-123",
  "plan_id": "pro",
  "plan_name": "Pro Plan",
  "created_at": "2025-01-01T00:00:00Z",
  "monthly_events_limit": 1000000,
  "monthly_bytes_limit": 107374182400,
  "features": {
    "saved_searches": true,
    "max_saved_searches": 50,
    "alerts": true,
    "max_alerts": 100
  }
}
404Tenant not found
POST
/rest/v1/rpc/get_tenant_settings
Get tenant settings including pipeline configuration and notification preferences.

Authentication

Requires JWT token (Bearer token). Tenant ID is extracted from the JWT token.

Parameters

NameTypeRequiredDescription
p_tenant_idstringRequiredTenant ID (extracted from JWT if not provided)

Responses

200Tenant settings
{
  "tenant_id": "tenant-123",
  "pipeline_config": {
    "retention_days": 30,
    "compression": true
  },
  "notification_preferences": {
    "email_enabled": true,
    "webhook_enabled": true
  }
}
404Tenant settings not found
POST
/rest/v1/rpc/update_tenant_settings
Update tenant settings. Only provided fields will be updated.

Authentication

Requires JWT token (Bearer token). Tenant ID is extracted from the JWT token.

Parameters

NameTypeRequiredDescription
p_tenant_idstringRequiredTenant ID
pipeline_configobjectOptionalPipeline configuration object
notification_preferencesobjectOptionalNotification preferences object

Request Body

interface UpdateTenantRequest {
  p_tenant_id: string
  pipeline_config?: {
    retention_days?: number
    compression?: boolean
  }
  notification_preferences?: {
    email_enabled?: boolean
    webhook_enabled?: boolean
  }
}
Example
{
  "p_tenant_id": "tenant-123",
  "pipeline_config": {
    "retention_days": 60,
    "compression": true
  },
  "notification_preferences": {
    "email_enabled": true,
    "webhook_enabled": false
  }
}

Responses

200Updated tenant settings
400Invalid settings data