POST /tickets/automation-rules/{id}/test
Test automation rule
Test how an automation rule would perform against a ticket without executing actions (dry-run mode)
Required Parameters
id
path string Rule ID
Request Body
{ "ticketId": "string"}{ "ticketId": "string", "trigger": "string"}Try it out
Loading...
Output:
Responses
Description
Rule test completed successfully
{ "wouldExecute": false, "conditionsMatched": false, "actionsToPerform": [ { "type": "string", "status": "string", "priority": "string", "userId": "string", "teamId": "string" } ], "conditionResults": [ { "field": "string", "operator": "string", "value": null, "actualValue": null, "matched": false } ]}Description
Invalid test data
Description
Insufficient permissions
Description
Rule or ticket not found
References
#/components/schemas/RuleAction
type: objectrequired: - typeproperties: 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)|export interface RuleAction { /** Action type */ type: | "change_status" | "change_priority" | "assign_to_user" | "assign_to_team"; /** New status (for change_status action) */ status?: string; /** New priority (for change_priority action) */ priority?: string; /** User ID to assign to (for assign_to_user action) */ userId?: string; /** Team ID to assign to (for assign_to_team action) */ teamId?: string;}Route Source Code
Check out the source code for this route entrypoint here: /tickets/automation-rules/[id]/test/route.ts
Or the swagger.yaml spec this documentation was generated from:
/tickets/automation-rules/swagger.yaml