The Notifications & Events API provides access to platform-level event history and user-facing notifications. Use these endpoints to query audit logs, retrieve aggregated event statistics, manage user notifications, and clean up old event records.
Query event history with filtering, pagination, and sorting. Maximum 500 events per page.
Name In Type Required Description limitquery integer No Number of events to return (max 500). Default: 100 offsetquery integer No Number of events to skip. Default: 0 sort_byquery string No Field to sort by. Allowed: created_at, event_type. Default: "created_at" sort_orderquery string No Sort direction. Allowed: asc, desc. Default: "desc" event_typequery string No Filter by specific event type resource_typequery string No Filter by resource type resource_idquery string No Filter by specific resource ID project_idquery string No Filter by project ID container_idquery string No Filter by container ID start_datequery string No Filter events after this timestamp end_datequery string No Filter events before this timestamp realm_idquery string No Filter by realm ID
const stream = client . api . events . listIterator ( {
for await ( const event of stream) {
console . log (event . event_type );
"message" : " Events retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439044 " ,
"event_type" : " container.running " ,
"resource_type" : " container " ,
"resource_id" : " 507f1f77bcf86cd799439033 " ,
"user_id" : " 507f1f77bcf86cd799439011 " ,
"id" : " 507f1f77bcf86cd799439033 " ,
"project_id" : " 507f1f77bcf86cd799439022 "
"realm_ids" : [ " 507f1f77bcf86cd799439022 " ],
"created_at" : " 2025-01-15T10:30:05.123Z "
"message" : " Invalid date range: start_date cannot be after end_date "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PARAMETER_VALUEInvalid parameter value A parameter value is outside the allowed range or format Ensure parameter values meet the documented constraints (min/max, format, regex) INVALID_DATE_RANGEInvalid date range The start_date cannot be after the end_date Ensure the start_date is before or the same as the end_date
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Retrieve detailed information about a specific event.
Name In Type Required Description idpath string Yes Event ID
const event = await client . api . events . get ( {
id: " 507f1f77bcf86cd799439044 " ,
"message" : " Event retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439044 " ,
"event_type" : " container.running " ,
"resource_type" : " container " ,
"resource_id" : " 507f1f77bcf86cd799439033 " ,
"user_id" : " 507f1f77bcf86cd799439011 " ,
"id" : " 507f1f77bcf86cd799439033 " ,
"project_id" : " 507f1f77bcf86cd799439022 "
"realm_ids" : [ " 507f1f77bcf86cd799439022 " ],
"created_at" : " 2025-01-15T10:30:05.123Z "
"message" : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Event not found "
Error Code Title Description Resolution EVENT_NOT_FOUNDEvent not found The requested event does not exist or has been deleted Verify the event ID is correct and that you have access to this event
Get aggregated statistics about event history.
Name In Type Required Description start_datequery string No Start of time range end_datequery string No End of time range realm_idquery string No Filter by realm
const stats = await client . api . events . getStats ( {
start_date: " 2025-01-01T00:00:00.000Z " ,
end_date: " 2025-01-31T23:59:59.999Z " ,
"message" : " Event statistics retrieved successfully " ,
"container.running" : 3456 ,
"container.stopped" : 2134 ,
"storage.share.mount_changed" : 1523 ,
"notification.read" : 8121
"oldest_event" : " 2024-11-15T10:30:00.000Z " ,
"newest_event" : " 2025-01-15T10:30:00.000Z "
"message" : " Invalid date range: start_date cannot be after end_date "
Error Code Title Description Resolution INVALID_DATE_RANGEInvalid date range The start_date cannot be after the end_date Ensure the start_date is before or the same as the end_date
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Delete events older than the specified retention period. Admin access required.
Field Type Required Description retention_daysinteger Yes Delete events older than this many days (min: 1, max: 365)
const result = await client . api . events . cleanup ( {
"message" : " Old events cleaned up successfully " ,
"cutoff_date" : " 2024-12-15T10:30:00.000Z "
"message" : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Admin access required "
Error Code Title Description Resolution ADMIN_ONLYAdmin access required This endpoint is only accessible to admin users Contact an administrator if you need access to this functionality ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
Delete multiple events at once based on filters.
Field Type Required Description event_typestring No Delete all events of this type resource_typestring No Delete all events for this resource type resource_idstring No Delete all events for this resource before_datestring No Delete events before this date realm_idstring No Delete events in this realm
"resource_type" : " container " ,
"before_date" : " 2024-12-15T00:00:00.000Z "
const result = await client . api . events . bulkDelete ( {
resource_id: " 507f1f77bcf86cd799439033 " ,
"message" : " Events deleted successfully " ,
"message" : " Either filters or `all=true` must be provided for bulk delete "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_BULK_DELETE_PARAMSInvalid bulk delete parameters You must provide at least one filter when performing a bulk delete, or set all=true to delete all events. Provide one or more filters (e.g., resource_type, event_type) or use all=true to confirm deletion of all events.
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Permanently delete an event from history.
Name In Type Required Description idpath string Yes Event ID to delete
await client . api . events . delete ({
id: " 507f1f77bcf86cd799439044 " ,
"message" : " Event deleted successfully "
"message" : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
"message" : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
"message" : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
"message" : " Event not found "
Error Code Title Description Resolution EVENT_NOT_FOUNDEvent not found The requested event does not exist or has been deleted Verify the event ID is correct and that you have access to this event
Get all notifications for the authenticated user, including global notifications and notifications targeted to the user.
This endpoint takes no parameters.
const stream = client . api . notifications . listIterator ();
for await ( const notification of stream) {
console . log (notification . title );
"message" : " Notifications retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439030 " ,
"title" : " System Maintenance Notice " ,
"message" : " Scheduled maintenance will occur on January 25th at 2:00 AM UTC. " ,
"expires_at" : " 2025-01-26T00:00:00.000Z " ,
"created_at" : " 2025-01-20T10:00:00.000Z " ,
"updated_at" : " 2025-01-20T10:00:00.000Z " ,
"message" : " Authentication required "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Get all public notifications. No authentication required.
This endpoint takes no parameters.
const stream = client . api . notifications . listPublicIterator ();
for await ( const notification of stream) {
console . log (notification . title );
"message" : " Public notifications retrieved successfully " ,
"id" : " 507f1f77bcf86cd799439030 " ,
"title" : " System Maintenance Notice " ,
"message" : " Scheduled maintenance will occur on January 25th at 2:00 AM UTC. " ,
"expires_at" : " 2025-01-26T00:00:00.000Z " ,
"created_at" : " 2025-01-20T10:00:00.000Z " ,
"updated_at" : " 2025-01-20T10:00:00.000Z "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Mark a notification as read for the authenticated user.
Name In Type Required Description idpath string Yes Unique identifier of the notification to mark as read
const result = await client . api . notifications . markRead ( {
id: " 507f1f77bcf86cd799439030 " ,
"message" : " Notification marked as read " ,
"id" : " 507f1f77bcf86cd799439150 " ,
"notification_id" : " 507f1f77bcf86cd799439030 " ,
"read_at" : " 2025-01-21T21:30:00.000Z "
"message" : " Invalid notification ID "
"message" : " Authentication required "
"message" : " You do not have access to this notification "
"message" : " Notification not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Mark all notifications as read for the authenticated user.
This endpoint takes no parameters.
const result = await client . api . notifications . markAllRead ();
"message" : " All notifications marked as read " ,
"message" : " Authentication required "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Note
Event types cover a wide range of platform activity including container lifecycle (container.running, container.stopped), proxy and firewall changes, pool membership events, and user account actions. Use the event_type filter combined with resource_type to narrow down results when investigating specific activity.