Overview
The Celona Network Events API provides REST endpoints to query and retrieve network events from your Celona network infrastructure. This API allows you to search, filter, and analyze network events with powerful querying capabilities.
Base URL: <https://api.celona.io/v2/api/events>
Table of Contents
Query Events
POST /query
Query network events within a specified time interval with optional filtering.
Query Parameters
Parameter | Type | Required | Description |
| integer | Yes | Your unique customer identifier |
| integer | Yes | Start time in Unix timestamp (milliseconds) |
| integer | Yes | End time in Unix timestamp (milliseconds) |
| integer | Yes | Number of records per page (min: 1, max: 1000) |
| integer | No | Page number (default: 1) |
| string | No | Sort order: |
Request Body
Basic Filters
Filter | Type | Description |
| array[string] | Filter by site identifiers |
| array[string] | Filter by cluster identifiers |
| array[string] | Filter by MOXN cluster identifiers |
| array[string] | Filter by Access Point serial numbers |
| array[string] | Filter by IMSI (International Mobile Subscriber Identity) |
| array[string] | Filter by event type |
| array[string] | Filter by event severity |
Advanced Search Filters
Use the search array for more complex filtering with various operators.
Search Filter Structure
{
"context": "field_name",
"value": "search_value",
"operator": "operator_type",
"case-sensitive": false
}
Available Operators
Operator | Description | Value Type | Example |
| Exact match | string |
|
| Not equal to | string |
|
| Value in list | array |
|
| Value not in list | array |
|
| Substring match | string |
|
| Does not contain | string |
|
| Greater than | number |
|
| Greater than or equal | number |
|
| Less than | number |
|
| Less than or equal | number |
|
| Regular expression | regex string |
|
Note: contains and notcontains operators are case-sensitive
Response
Response Fields:
count: Total number of records matching the time range and customer_idfiltered: Number of records after applying filters (only present if filters were used)records: Array of event objects with dynamic properties
Example response
{
"code": 200,
"success": true,
"data": {
"count": 1500,
"filtered": 42,
"records": [
{
"timestamp": 1768900464628,
"type": "ALERT",
"category": "DPALERT",
"platformType": "SITE",
"clusterID": "1-0-1-1234567",
"ip": "10.32.7.25",
"siteID": "1",
"edgeName": "test",
"severity": "CRITICAL",
"dpAlert.alertId": "SASTLSAUTHSTATE",
"cause": "connection with https://test.sas.goog/v1.2/heartbeat failed with --- Post \"https://test.sas.goog/v1.2/heartbeat\": network is unreachable"
},
...
]
},
"error": null
}
Get Search Context
GET /context
Retrieve the list of available search contexts that can be used in filter queries.
Use Case: Call this endpoint first to discover what fields you can filter on in your search queries.
Response
Status 200 - Success
{
"code": 200,
"success": true,
"data": [
"action",
"actualImei",
"alertId",
"allocated",
"appID",
"availableMemoryGB",
"avgCpuPercentage",
...
],
"error": null
}Examples
Example 1: Basic Event Query
Query events from the last 24 hours without filters.
curl -X POST "https://api.celona.io/v2/api/events/query?customer_id=12345&startTime=1737244800000&endTime=1737331200000&pageSize=100&pageIndex=1&order=descending" \
-H "X-API-Key: <your-key>" \
-H "Content-Type: application/json"
Example 2: Filtered Query for different types of events (site,edge,MOXN,Device)
Query events based on platfrom type.
curl -X POST "https://api.celona.io/v2/api/events/query?customer_id=12345&startTime=1737244800000&endTime=1737331200000&pageSize=100" \
-H "X-API-Key: <your-key>" \
-H "Content-Type: application/json" \
-d '{
"search":[
{
"context":"platformType",
"value":["SITE"],
"operator":"in"
}
]
}'
Value for platformType can be one of these 'SITE','PSE' ,'MOCN' or 'DEVICE'
Example 3: Pagination
Retrieve the second page of results.
curl -X POST "https://api.celona.io/v2/api/events/query?customer_id=12345&startTime=1737244800000&endTime=1737331200000&pageSize=100&pageIndex=2" \
-H "X-API-Key: <your-key>" \
-H "Content-Type: application/json"
Example 4: Get Available Search Contexts
curl -X GET "https://api.celona.io/v2/api/events/context" \
-H "X-API-Key: <your-key>"
Example 5: Using Regular Expression Filter
Find events where the message matches a specific pattern.
curl -X POST "https://api.celona.io/v2/api/events/query?customer_id=12345&startTime=1737244800000&endTime=1737331200000&pageSize=100" \
-H "X-API-Key: <your-key>" \
-H "Content-Type: application/json" \
-d '{
"search": [
{"context":"nodeID",
"value":"151a75d0.*",
"operator":"regex"
}
]
}'
Error Handling
The API uses standard HTTP status codes and returns detailed error information.
HTTP Status Codes
Code | Description |
200 | Success |
400 | Bad Request - Invalid parameters or malformed request |
403 | Forbidden - Invalid or missing authentication credentials |
500 | Internal Server Error - Server-side error occurred |
Error Response Format
{
"code": 400,
"success": false,
"data": null,
"error": "Invalid time range: endTime must be greater than startTime"
}
Common Error Scenarios
Invalid Authentication
Status: 403
Cause: Missing or invalid API token/key
Solution: Verify your authentication headers
Invalid Time Range
Status: 400
Cause: endTime <= startTime or timestamps in wrong format
Solution: Ensure endTime is after startTime and both are Unix timestamps in milliseconds
Invalid Page Size
Status: 400
Cause: pageSize < 1 or > 1000
Solution: Keep pageSize between 1 and 1000
Missing Required Parameters
Status: 400
Cause: Missing customer_id, startTime, endTime, or pageSize
Solution: Include all required query parameters
