API reference · Automation
GET/api/v1/automation/rules/{id}

Get automation rule

Returns one automation rule by rule_id for the authenticated tenant with generated links and execution statistics. Authentication uses x-api-key with optional x-tenant-id; RBAC requires automation:read. The service scopes by {rule_id, tenant}. Missing rules currently throw generic Error and surface as 500 rather than 404.

RBAC · automation

Path parameters

idstring <uuid>Required
Automation rule UUID from automation_rules.rule_id.

Response body

Success response 200 · schema AutomationRuleResponse

dataobjectRequired
rule_idstring <uuid>Required
Rule UUID generated with crypto.randomUUID when a rule is created.
tenantstring <uuid>Required
Tenant UUID scoped from API key authentication.
namestringRequired
Rule display name.
descriptionstringNullable
statusstringRequired
Current automation rule status.
Enum: activeinactivedrafterror
prioritystringRequired
Current automation rule priority.
Enum: lownormalhighcritical
trigger_typestringRequired
Trigger type used to start rule execution.
Enum: time_basedevent_basedcondition_basedmanualrecurringwebhook
trigger_configobjectRequired
Trigger configuration object stored with the rule.
conditionsarray of AutomationRuleCondition
Optional additional rule conditions.
itemsobject
fieldstringRequired
Field path evaluated for this condition.
operatorstringRequired
Enum: equalsnot_equalsgreater_thanless_thangreater_than_or_equalless_than_or_equalcontainsnot_containsstarts_withends_withinnot_inexistsnot_existsregex_match
valueany
Condition comparison value.
data_typestring
Enum: stringnumberbooleandatearrayobject
condition_logicstring
Condition combination logic.
Enum: andor
actionsarray of AutomationRuleActionRequired
Ordered action list for this rule.
itemsobject
typestringRequired
Automation action type.
Enum: email_notificationsms_notificationwebhook_calldatabase_updateticket_creationticket_updateproject_updatetime_entry_creationinvoice_generationcustom_scriptworkflow_executionsystem_command
configobjectRequired
Action configuration object. Expected keys depend on action type.
orderintegerRequired
Execution order (1-based).
≥ 1
continue_on_errorboolean
Continue execution after a failed action.
timeout_secondsinteger
Optional per-action timeout in seconds.
≥ 1
retry_attemptsinteger
Optional retry count for this action.
≥ 0 · ≤ 5
max_concurrent_executionsinteger
≥ 1
execution_timeout_minutesinteger
≥ 1
retry_failed_executionsboolean
is_templateboolean
template_categorystringNullable
tagsarray of string
itemsstring
metadataobject
notification_settingsobject
notify_on_successboolean
notify_on_failureboolean
notification_emailsarray of string
itemsstring <email>
notification_webhooksarray of string
itemsstring <uri>
created_bystring <uuid>Nullable
User UUID from API key context that created the rule.
created_atstring <date-time>
updated_atstring <date-time>
execution_countinteger
≥ 0
last_executedstring <date-time>Nullable
execution_statisticsobject
Included on GET /rules/{id} by service lookup helper.
_linksobject
HATEOAS links generated by the automation controller. Some generic links may point to methods not implemented by a route file.

Response codes

200
Automation rule returned successfully.
400
Invalid rule UUID format.
401
API key is missing, invalid, expired, over limit, or the key user was not found.
403
Authenticated user lacks automation:read permission.
404
Intended not-found response for missing rules; current service may surface this as 500.
500
Unexpected failure, including current generic not-found errors.