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

  1. Obtain your Client ID and Secret

    MetaRouter will provide you with the Client ID and Client Secret associated with your org.

  2. 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"
      }'
  3. Extract the access_token from 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

HeaderValue
AuthorizationBearer <your_access_token>
Content-Typeapplication/json

Query Parameters

FieldTypeDescription
?pagenumberResults page number to start at
?perPagenumber (1 - 100)Number of results per page (defaults to 20)
?actionstringRepeatable param that allows for filtering against particular actions
?startTimeISO 8601Earliest date time to return results for
?endTimeISO 8601Latest date time to return results for (must be after startTime)
?userEmailstringUser email to return logs for
?sortasc | descSort 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
}