
Kestra Plugin CreateCase
CertifiedOpen an incident-management Case, or attach the current execution to an already-open matching one
Kestra Plugin CreateCase
Open an incident-management Case, or attach the current execution to an already-open matching one
Creates a new Case in Kestra's incident-management feature, typically from an errors: task so an incident is opened whenever a flow fails. The execution that triggered the task is automatically linked to the case.
When linkMatchingExecutions is true, the task first looks for an active (non-resolved, non-cancelled) case previously created by this same task (same flow + task id), or with the same deduplicationKey when one is set; if one is found, the triggering execution is attached to it instead of creating a new case.
type: io.kestra.plugin.kestra.ee.cases.CreateCaseExamples
Open a case when a flow fails.
id: health_check
namespace: company.team
tasks:
- id: check
type: io.kestra.plugin.core.http.Request
uri: https://example.com/health
errors:
- id: open_incident
type: io.kestra.plugin.kestra.ee.cases.CreateCase
title: "{{ execution.id }} failed for {{ flow.id }}"
caseDescription: "Health check failed."
severity: CRITICAL
sla:
acknowledgement: PT1H
resolution: PT8H
linkMatchingExecutions: true
assignees:
users:
- a@b.c
groups:
- Admins
Open one case per failing flow from a system flow, grouping executions on a deduplication key.
id: open_case_on_failure
namespace: system
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
dependsOn:
- states: [FAILED]
namespace: company.team
tasks:
- id: open_case
type: io.kestra.plugin.kestra.ee.cases.CreateCase
title: "{{ trigger.namespace }}.{{ trigger.flowId }} failed"
namespace: "{{ trigger.namespace }}"
linkMatchingExecutions: true
deduplicationKey: "{{ trigger.namespace }}.{{ trigger.flowId }}"
executionId: "{{ trigger.executionId }}"
Properties
actions array
Actions attached to the case
System flows runnable directly from the case's detail page.
io.kestra.plugin.kestra.ee.cases.CreateCase-CaseActionProperty
Id of the flow to run
Display label for the action
Namespace of the flow to run
assetIds array
Asset IDs to link to the case
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150assignees
Assignees
io.kestra.plugin.kestra.ee.cases.CreateCase-SubjectsProperty
Group names
User emails
auth
Select API authentication
Use either an API token or HTTP Basic (username/password); do not provide both.
io.kestra.plugin.kestra.AbstractKestraTask-Auth
API token for bearer auth
trueAutomatically retrieve credentials from Kestra's configuration if available
The default configuration can be configured globally inside the Kestra configuration file:
- Set
kestra.tasks.sdk.authentication.api-tokento use an API token - Set
kestra.tasks.sdk.authentication.usernameandkestra.tasks.sdk.authentication.passwordfor HTTP basic authentication - Set
kestra.tasks.sdk.authentication.urlto also default the Kestra API endpoint (seekestraUrlabove) The Enterprise edition also provides setting a default configuration at the Namespace or Tenant level by an administrator. Set to false to also opt out of the default URL, and to call a Kestra API that requires no authentication when no credentials are set either.
Password for HTTP Basic auth
Username for HTTP Basic auth
caseDescription string
Case description
Supports Markdown.
caseId string
Attach to an existing case instead of creating one
When set, the triggering execution is attached to this case id instead of creating a new case. Used by the auto-generated "keep attaching matching executions" system flow.
deduplicationKey string
Key identifying which executions belong to the same case
Only used with linkMatchingExecutions. Executions of the tenant that render the same key are attached to the same active case, whatever flow or task they come from, so include a namespace in the key if you want one. Without a key, executions are grouped by the flow and task id of this task, which is only meaningful from an errors block. Fails when the key renders blank or longer than 250 characters.
executionId string
The execution id to link
Defaults to the current task run's own triggering execution. Set this to {{ trigger.executionId }} when this task runs inside a Flow-trigger-driven system flow (e.g. the auto-generated "keep attaching matching executions" flow), so the upstream triggering execution is linked instead of the system flow's own execution.
kestraUrl string
Override Kestra API endpoint
URL used for calls to the Kestra API. When null, falls back to the url configured alongside the default SDK authentication (Namespace or Tenant level, Enterprise edition), then renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.
labels arrayobject
Labels to attach to the case
Labels as a list of Label (key/value pairs) or as a map of string to string.
linkMatchingExecutions booleanstring
falseAttach to a matching open case instead of creating a new one
When true, looks for an active (non-resolved, non-cancelled) case previously created by this same task, or with the same deduplicationKey when one is set, and attaches the triggering execution to it instead of creating a new case.
namespace string
Namespace the case belongs to
Defaults to the flow's namespace.
severity string
CRITICALHIGHMEDIUMLOWUNKNOWN_DEFAULT_OPEN_APICase severity
Defaults to MEDIUM if not set.
sla
SLA targets for the case
io.kestra.plugin.kestra.ee.cases.CreateCase-SlaProperty
Time to acknowledge, counted from case creation
Time to resolve, counted from case creation
status string
OPENOPENACKNOWLEDGEDINVESTIGATINGRESOLVEDCANCELLEDUNKNOWN_DEFAULT_OPEN_APIInitial case status
Defaults to OPEN.
tenantId string
Override target tenant
Tenant identifier applied to API calls; defaults to the current execution tenant.
title string
Case title
Required unless caseId is set (attaching to an existing case doesn't need a new title).
watchers
Watchers
io.kestra.plugin.kestra.ee.cases.CreateCase-SubjectsProperty
Group names
User emails
Outputs
caseId string
The id of the case that was created or attached to
created boolean
Whether a new case was created
false if the triggering execution was attached to an existing matching case instead.