Skip to content

GET   /tickets/automation-rules/{id}/executions

Get rule execution history

Retrieve execution history for a specific automation rule

Required Parameters

id   path string

Rule ID

Optional Parameters

Click here to view an exhaustive list of all available parameters
page   query integer

pageSize   query integer

includeStats   query boolean

Include execution statistics

executionStatus   query string

Filter by execution status

ticketId   query string

Filter by ticket ID

trigger   query string

Filter by trigger event

dateFrom   query string

Filter executions from this date

dateTo   query string

Filter executions up to this date

Try it out

Loading...

Output:

Responses

Description

Execution history retrieved successfully

{
"data": [
{
"id": "string",
"ruleId": "string",
"ruleName": "string",
"ticketId": "string",
"trigger": "string",
"conditionsMatched": false,
"actionsPerformed": [
{
"type": "string",
"status": "string",
"priority": "string",
"userId": "string",
"teamId": "string"
}
],
"success": false,
"errorMessage": "string",
"executedAt": "string",
"executionTime": 0
}
],
"page": 0,
"pageSize": 0,
"total": 0,
"totalPages": 0,
"statistics": {
"totalExecutions": 0,
"successfulExecutions": 0,
"failedExecutions": 0,
"lastExecutedAt": "string"
}
}

References

#/components/schemas/RuleAction

type: object
properties:
type:
type: string
enum:
- change_status
- change_priority
- assign_to_user
- assign_to_team
description: Action type
status:
type: string
description: New status (for change_status action)
priority:
type: string
description: New priority (for change_priority action)
userId:
type: string
description: User ID to assign to (for assign_to_user action)
teamId:
type: string
description: Team ID to assign to (for assign_to_team action)
required:
- type

#/components/schemas/RuleExecution

type: object
properties:
id:
type: string
ruleId:
type: string
ruleName:
type: string
ticketId:
type: string
trigger:
type: string
enum:
- ticket_created
- ticket_updated
- status_changed
- priority_changed
- assigned
- comment_added
conditionsMatched:
type: boolean
description: Whether conditions were met
actionsPerformed:
type: array
items:
$ref: "#/components/schemas/RuleAction"
description: Actions that were executed
success:
type: boolean
description: Overall execution success
errorMessage:
type: string
nullable: true
description: Error message if execution failed
executedAt:
type: string
format: date-time
executionTime:
type: number
description: Execution duration in milliseconds

Route Source Code

Check out the source code for this route entrypoint here: /tickets/automation-rules/[id]/executions/route.ts

Or the swagger.yaml spec this documentation was generated from: /tickets/automation-rules/swagger.yaml