List Notifications
Listing notifications in Nexla allows you to view and manage all system alerts, status updates, and operational messages. The system provides comprehensive filtering and search capabilities to help you find relevant notifications quickly and efficiently.
Notification Listing Overview
The notification listing system provides flexible access to all notifications across your platform, enabling you to monitor system health, track resource status, and respond to operational issues effectively.
List All Notifications
Retrieve all notifications to get a comprehensive view of system events and status changes.
Basic Listing Endpoint
To retrieve all your notifications:
GET /notifications
- Nexla API
GET /notifications
Response Structure
The response includes comprehensive notification information with all relevant details:
- Nexla API
[
{
"id": 5007,
"owner": {
"id": 42,
"full_name": "John Smith",
"email": "john.smith@example.com"
},
"org": {
"id": 101,
"name": "Acme Corporation",
"email_domain": "acme.com"
},
"access_roles": ["owner"],
"level": "INFO",
"resource_id": 1002,
"resource_type": "SOURCE",
"message_id": 0,
"message": "Data source connected successfully",
"read_at": null,
"updated_at": "2023-01-15T21:04:48.000Z",
"created_at": "2023-01-15T21:04:48.000Z"
},
{
"id": 5008,
"owner": {
"id": 42,
"full_name": "John Smith",
"email": "john.smith@example.com"
},
"org": {
"id": 101,
"name": "Acme Corporation",
"email_domain": "acme.com"
},
"access_roles": ["owner"],
"level": "INFO",
"resource_id": 3001,
"resource_type": "SET",
"message_id": 0,
"message": "New datasets available for processing",
"read_at": null,
"updated_at": "2023-01-15T21:05:48.000Z",
"created_at": "2023-01-15T21:05:48.000Z"
}
]
Filtering Notifications
Use advanced filtering to focus on specific types of notifications and events.
Filter by Read Status
Filter notifications by their read status to focus on unread alerts:
- Nexla API
GET /notifications?read=0
Filter by Resource Type
Filter notifications by specific resource types to focus on relevant alerts:
- Nexla API
GET /notifications?resource_type=SOURCE
Filter by Severity Level
Filter notifications by severity level to focus on critical issues:
- Nexla API
GET /notifications?level=ERROR
Filter by Resource ID
Filter notifications for a specific resource to track its status:
- Nexla API
GET /notifications?resource_id=1002
Combined Filtering
Combine multiple filters for precise notification targeting:
- Nexla API
GET /notifications?read=0&resource_type=SOURCE&level=ERROR&resource_id=1002
Time-Based Filtering
Filter notifications by time ranges to focus on recent or historical events.
Filter by Date Range
Filter notifications within specific time periods:
- Nexla API
GET /notifications?from=2023-01-01T00:00:00&to=2023-01-31T23:59:59
Filter by Recent Activity
Focus on notifications from recent time periods:
- Nexla API
GET /notifications?from=2023-01-15T00:00:00
Pagination and Sorting
Manage large numbers of notifications efficiently with pagination and sorting.
Pagination
Use pagination to handle large notification collections:
- Nexla API
GET /notifications?page=1&per_page=50
Sorting Options
Sort notifications by various criteria for better organization:
- Nexla API
GET /notifications?sort_by=created_at&sort_order=DESC
Available Sort Fields
Sort notifications by various attributes:
created_at: Sort by notification creation timeupdated_at: Sort by last update timelevel: Sort by severity levelresource_type: Sort by resource typeread_at: Sort by read status
Search Functionality
Find specific notifications quickly using search capabilities.
Text Search
Search notifications by message content and descriptions:
- Nexla API
GET /notifications?search=connection
Advanced Search
Combine search with other filters for precise results:
- Nexla API
GET /notifications?search=error&level=ERROR&read=0
Notification Response Fields
Understanding the notification response structure helps you effectively process and manage alerts.
Basic Information
Essential notification identification and metadata:
id: Unique notification identifiermessage: Human-readable notification messagelevel: Severity level (DEBUG, INFO, WARN, ERROR)created_at: When the notification was createdupdated_at: When the notification was last updated
Resource Information
Details about the resource associated with the notification:
resource_id: ID of the related resourceresource_type: Type of resource (SOURCE, SET, SINK, FLOW)message_id: Internal message identifier
Status and Access
Notification status and access control information:
read_at: When the notification was marked as read (null if unread)access_roles: User's access level to this notificationowner: User who owns the notificationorg: Organization the notification belongs to
Filtering and Search Parameters
Available query parameters for filtering and searching notifications.
Status Parameters
Filter by notification status:
read: Filter by read status (0 for unread, 1 for read)level: Filter by severity level (DEBUG, INFO, WARN, ERROR)
Resource Parameters
Filter by resource characteristics:
resource_type: Filter by resource type (SOURCE, SET, SINK, FLOW)resource_id: Filter by specific resource ID
Time Parameters
Filter by time ranges:
from: Start time for filtering (ISO 8601 format)to: End time for filtering (ISO 8601 format)
Pagination Parameters
Control result pagination:
page: Page number (default: 1)per_page: Results per page (default: 20, max: 100)
Sorting Parameters
Control result ordering:
sort_by: Field to sort by (default: created_at)sort_order: Sort direction (ASC or DESC, default: DESC)
Search Parameters
Text search capabilities:
search: Search term for message content
Best Practices
To effectively list and manage notifications:
- Use Appropriate Filters: Apply filters to focus on relevant notifications
- Implement Pagination: Use pagination for large notification collections
- Regular Review: Periodically review and respond to notifications
- Search Efficiently: Use search to find specific notifications quickly
- Monitor Trends: Analyze notification patterns for system optimization
Error Handling
Common notification listing issues and solutions:
- Permission Denied: Ensure you have appropriate access rights
- Invalid Parameters: Verify query parameters are correctly formatted
- Resource Not Found: Confirm the specified resource exists
- Pagination Issues: Check page and per_page parameter values
Related Operations
After listing notifications, you may need to:
Update Notification Status
PUT /notifications/{notification_id}/read
PUT /notifications/{notification_id}/unread
Delete Notifications
DELETE /notifications/{notification_id}
Get Notification Counts
GET /notifications/count
View Notification Details
GET /notifications/{notification_id}