Querying Logs via API
Overview
MetaRouter offers access to the orchestration layer via API. As a result, any organization can access and read the Audit Logs associated with their organization via API request.
The Audit Logs requested via API request will mirror details available in the MetaRouter web application, returning the user, action, description, and timestamp for each log.
Queries for Audit Logs support filtering, sorting, and pagination.
Authentication
To access the Orchestration API you must authenticate using a Bearer Token generated via MetaRouter's Auth0 tenant.
🔐 Steps to Authenticate
-
Obtain your Client ID and Secret
MetaRouter will provide you with the Client ID and Client Secret associated with your org.
-
Use your Client ID and Secret to request an access token via MetaRouter's Auth0 tenant
curl --request POST \ --url https://metarouter.us.auth0.com/oauth/token \ --header 'Content-Type: application/json' \ --data '{ "grant_type": "client_credentials", "client_id": "your_client_id", "client_secret": "your_client_secret", "audience": "https://ion.metarouter.io" }' -
Extract the
access_tokenfrom the response and use it in subsequent requests to the Metrics API:Authorization: Bearer <your_access_token>
Querying Audit Logs
Endpoint
Use the following endpoint to query Audit Logs:
GET https://ion-api.mr-ui-prod1.gcp-us-central1.metarouter.io/api/v1/audit-logs
Required Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_access_token> |
Content-Type | application/json |
Query Parameters
| Field | Type | Description |
|---|---|---|
?page | number | Results page number to start at |
?perPage | number (1 - 100) | Number of results per page (defaults to 20) |
?action | string | Repeatable param that allows for filtering against particular actions |
?startTime | ISO 8601 | Earliest date time to return results for |
?endTime | ISO 8601 | Latest date time to return results for (must be after startTime) |
?userEmail | string | User email to return logs for |
?sort | asc | desc | Sort direction, executed on timestamp |
Sample Response
{
"data": [
{
"id": "8ba41a73-6105-4c94-8d78-3bcb34d10a05",
"timestamp": "2026-08-16T00:34:40.484943+00:00",
"action": "PIPELINE_DEPLOYED",
"description": "Primary Site",
"userId": "auth0|some-user",
"userName": "[email protected]",
"userEmail": "[email protected]"
}
],
"page": 1,
"perPage": 100,
"total": 1
}Updated about 3 hours ago