Skip to main content
POST
/
api
/
v1
/
activity-logs
/
search
Search activity log
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    page: 123,
    size: 50,
    types: ['AgentCreated'],
    severities: ['Info'],
    callers: ['User'],
    userEmail: '<string>',
    callIds: ['<string>'],
    agentIds: ['<string>'],
    fromDate: '2023-11-07T05:31:56Z',
    toDate: '2023-11-07T05:31:56Z',
    searchText: '<string>',
    sortField: '<string>',
    sortDirection: 'Ascending'
  })
};

fetch('https://blackbox.dasha.ai/api/v1/activity-logs/search', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "results": [
    {
      "eventId": "<string>",
      "orgId": "<string>",
      "type": "AgentCreated",
      "severity": "Info",
      "message": "<string>",
      "caller": "User",
      "timestamp": "2023-11-07T05:31:56Z",
      "userEmail": "<string>",
      "callId": "<string>",
      "agentId": "<string>",
      "metadata": "<unknown>"
    }
  ],
  "totalCount": 123,
  "page": 123,
  "size": 123,
  "totalPages": 123,
  "executionTimeMs": 123,
  "aggregations": {
    "typeCounts": {},
    "severityCounts": {},
    "callerCounts": {}
  }
}

Search Capabilities

  • Type filtering: Filter by event type (Webhook, ToolCall, ApiRequest, McpCall, Scheduler, WebInterfaceCall)
  • Severity filtering: Filter by severity level (Info, Warning, Error, Critical)
  • Caller filtering: Filter by who initiated the action (User, System)
  • Date range filtering: Filter by event timestamp
  • Agent/Call filtering: Filter by specific agent IDs or call IDs
  • Full-text search: Search across event messages and metadata
  • Aggregations: Get counts grouped by type, severity, and caller

Search Examples

{
  "page": 0,
  "size": 20,
  "sortField": "timestamp",
  "sortDirection": "Descending"
}

Body

Search criteria and options

Search parameters for querying activity log events with filtering, pagination, and sorting.

page
integer<int32>

Page number for pagination, using 0-based indexing. Defaults to 0.

size
integer<int32>

Number of activity log events to return per page. Defaults to 20.

Required range: 1 <= x <= 100
types
enum<string>[] | null

Filter by activity event types (e.g., Webhook, ToolCall, ApiRequest).

Type of activity log event. Describes the specific action that occurred.

Available options:
AgentCreated,
AgentUpdated,
AgentDeleted,
AgentCloned,
CallCreated,
CallBulkScheduled,
CallCanceled,
CallCompleted,
CallFailed,
CallDeadlineExceeded,
CallDispatched,
CallReceived,
CallRejectedByWebhook,
WebhookSuccess,
WebhookFailed,
ToolCallSuccess,
ToolCallFailed,
McpCallExecuted,
ConfigurationCreated,
ConfigurationUpdated,
ConfigurationDeleted
severities
enum<string>[] | null

Filter by severity levels (e.g., Error, Critical).

Severity level of an activity log event.

Available options:
Info,
Warning,
Error,
Critical
callers
enum<string>[] | null

Filter by caller types (User and/or System).

Identifies who initiated the logged action.

Available options:
User,
System
userEmail
string | null

Filter by user email address.

callIds
string[] | null

Filter by one or more call IDs.

agentIds
string[] | null

Filter by one or more agent IDs.

fromDate
string<date-time> | null

Start of date range for filtering by timestamp.

toDate
string<date-time> | null

End of date range for filtering by timestamp.

searchText
string | null

Free-text search query that searches the message and metadata fields.

sortField
string | null

Field name to sort results by. Defaults to "timestamp".

sortDirection
enum<string>

Direction to sort results. Defaults to Descending (newest first).

Available options:
Ascending,
Descending

Response

Returns search results successfully

Search results for activity log events including pagination metadata, aggregations, and performance metrics.

results
object[]
required

Activity log events in the current page.

totalCount
integer<int64>
required

Total number of events matching the search criteria across all pages.

page
integer<int32>
required

Current page number (0-based).

size
integer<int32>
required

Number of results per page.

totalPages
integer<int32>
required

Total number of pages available.

executionTimeMs
integer<int64>
required

Search execution time in milliseconds.

aggregations
object

Aggregated statistics about the search results including counts by type, severity, and caller.