Skip to main content

Bulk retrieval of audit logs

Use this API to retrieve detailed audit logs of user activity within Promethium. The API supports pagination, date range filtering, and filtering by individual user.

Initial Request (First Page)

Endpoint

POST https://api.prod.promethium.ai/audits/logs/search

Headers

Header NameValueRequiredDescription
Content-Typeapplication/jsonSpecifies the format of the request body
idtoken<authentication_id_token>Bearer token obtained via login

Request Body

{
"size": 1000,
"sort_value": "desc",
"advance_options": {
"user_name": "jane.doe@company.com"
},
"start": 1704067200,
"end": 1706745600
}
FieldTypeRequiredDescription
sizeintegerNumber of results to return (max: 3000)
sort_valueenumSort direction: asc or desc
advance_options.user_namestringFilter logs for a specific user (email address)
startintegerStart of time range in epoch timestamp
endintegerEnd of time range in epoch timestamp

Example Response

✅ Success (200 OK)

{
"total": 1496,
"data": [
{
"timestamp": 1704067200,
"user": "jane.doe@company.com",
"action": "CREATE_DATAMAP",
"target": "Customer Churn Datamap",
"metadata": {
"datamap_id": "dm_87f9ad129f",
"sql": "SELECT * FROM ..."
}
}
],
"next_page_token": "eyJwYWdlIjoyfQ=="
}
  • total: Total number of audit logs matching the request
  • data: List of individual log records (see your schema)
  • next_page_token: Token used to fetch the next page of results

Paginating Results

To retrieve the next page, issue a GET request with the next_page_token returned from the previous response. This token is valid for 120 seconds.

Endpoint

GET https://api.prod.promethium.ai/audits/logs/search?page_token=<next_page_token>

Headers

Header NameValueRequiredDescription
idtoken<authentication_id_token>

Example Response

✅ Success (200 OK)

{
"total": 1496,
"data": [
{
"timestamp": 1704067250,
"user": "jane.doe@company.com",
"action": "PUBLISH_DATAMAP",
"target": "Customer Churn Datamap",
"metadata": {
"datamap_id": "dm_87f9ad129f"
}
}
],
"next_page_token": "eyJwYWdlIjozfQ=="
}

Continue paginating using next_page_token until is not present in the response.

Example: curl

First Request

curl -X POST https://api.prod.promethium.ai/audits/logs/search \
-H "Content-Type: application/json" \
-H "idtoken: YOUR_ID_TOKEN_HERE" \
-d '{
"size": 1000,
"sort_value": "desc",
"advance_options": {
"user_name": "jane.doe@company.com"
},
"start": 1704067200,
"end": 1706745600
}'

Next Page Request

curl -X GET "https://api.prod.promethium.ai/audits/logs/search?page_token=eyJwYWdlIjozfQ==" \
-H "idtoken: YOUR_ID_TOKEN_HERE"

✅ Success (200 OK)

{
"total": 1496,
"data": [
{
"timestamp": 1704067200,
"user": "jane.doe@company.com",
"action": "CREATE_DATAMAP",
"target": "Customer Churn Datamap",
"metadata": {
"datamap_id": "dm_87f9ad129f",
"sql": "SELECT * FROM ..."
}
}
],
"next_page_token": "eyJwYWdlIjoyfQ=="
}