Skip to main content
GET
/
admin
/
analytics
/
summary
Analytics & Logging
curl --request GET \
  --url https://api.example.com/admin/analytics/summary
{
  "totalExecutions": 123,
  "successfulExecutions": 123,
  "failedExecutions": 123,
  "successRate": 123,
  "averageExecutionTime": 123,
  "mostUsedTools": [
    {}
  ],
  "periodStart": {},
  "periodEnd": {},
  "content": [
    {
      "id": 123,
      "toolName": "<string>",
      "toolCode": "<string>",
      "executedAt": {},
      "executionTime": 123,
      "success": true,
      "statusCode": 123,
      "requestPayload": "<string>",
      "responseBody": "<string>",
      "errorMessage": "<string>"
    }
  ],
  "pageable": {},
  "totalElements": 123,
  "totalPages": 123,
  "size": 123,
  "number": 123
}

Get Analytics Summary

Retrieve aggregated metrics about tool execution over a specified time period.

Request

curl -X GET "http://localhost:8080/admin/analytics/summary?days=30" \
  -H "Authorization: Bearer YOUR_TOKEN"

Query Parameters

days
integer
default:"30"
Number of days to include in the summary metrics

Response

Returns an AnalyticsSummaryResponse object with aggregated metrics:
totalExecutions
Long
Total number of tool executions in the specified period
successfulExecutions
Long
Number of successful tool executions
failedExecutions
Long
Number of failed tool executions
successRate
Double
Percentage of successful executions (0-100)
averageExecutionTime
Double
Average execution time in milliseconds
mostUsedTools
array
Array of the most frequently executed tools with usage counts
periodStart
Instant
Start timestamp of the analytics period (ISO-8601)
periodEnd
Instant
End timestamp of the analytics period (ISO-8601)

Example Response

{
  "totalExecutions": 1247,
  "successfulExecutions": 1198,
  "failedExecutions": 49,
  "successRate": 96.07,
  "averageExecutionTime": 342.5,
  "mostUsedTools": [
    {
      "toolName": "GitHub Create Issue",
      "executionCount": 342
    },
    {
      "toolName": "Resend Email",
      "executionCount": 289
    }
  ],
  "periodStart": "2026-02-01T00:00:00Z",
  "periodEnd": "2026-03-03T23:59:59Z"
}
Analytics data is retained based on the log retention policy configured in the system.

Get Execution Logs

Retrieve paginated execution logs for tool calls with detailed request/response information.

Request

curl -X GET "http://localhost:8080/admin/analytics/logs?page=0&size=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

Query Parameters

page
integer
default:"0"
Page number (zero-indexed)
size
integer
default:"20"
Number of records per page
sort
string
default:"executedAt,desc"
Sort order (e.g., “executedAt,desc” or “executionTime,asc”)

Response

Returns a paginated Page<ToolExecutionLogResponse> object:
content
array
Array of tool execution log entries
pageable
object
Pagination information
totalElements
Long
Total number of log entries
totalPages
Integer
Total number of pages
size
Integer
Page size
number
Integer
Current page number

Example Response

{
  "content": [
    {
      "id": 12847,
      "toolName": "GitHub Create Issue",
      "toolCode": "github-create-issue",
      "executedAt": "2026-03-03T15:42:18Z",
      "executionTime": 423,
      "success": true,
      "statusCode": 201,
      "requestPayload": "{\"title\":\"Bug: API timeout\",\"body\":\"...\"}",
      "responseBody": "{\"id\":789,\"number\":42,\"state\":\"open\"}",
      "errorMessage": null
    }
  ],
  "pageable": {
    "pageNumber": 0,
    "pageSize": 20,
    "sort": {
      "sorted": true,
      "unsorted": false
    }
  },
  "totalElements": 1247,
  "totalPages": 63,
  "size": 20,
  "number": 0
}
Use execution logs for debugging tool failures, monitoring API response times, and auditing tool usage.

Use Cases

Monitor Performance

Track average execution times to identify slow endpoints

Debug Failures

Inspect request/response payloads to troubleshoot failed executions

Usage Analytics

Identify most-used tools to optimize caching and scaling

Audit Trail

Maintain compliance logs of all external API interactions

Build docs developers (and LLMs) love