Kestra Plugin CreateCase

Kestra Plugin CreateCase

Certified

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); if one is found, the triggering execution is attached to it instead of creating a new case.

yaml
type: io.kestra.plugin.kestra.ee.cases.CreateCase

Open a case when a flow fails.

yaml
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
Properties

Actions attached to the case

System flows runnable directly from the case's detail page.

Definitions
flowIdstring

Id of the flow to run

labelstring

Display label for the action

namespacestring

Namespace of the flow to run

SubTypestring

Asset IDs to link to the case

Assignees

Definitions
groupsarray
SubTypestring

Group names

usersarray
SubTypestring

User emails

Select API authentication

Use either an API token or HTTP Basic (username/password); do not provide both.

Definitions
apiTokenstring

API token for bearer auth

autobooleanstring
Defaulttrue

Automatically 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-token to use an API token
  • Set kestra.tasks.sdk.authentication.username and kestra.tasks.sdk.authentication.password for HTTP basic authentication
  • Set kestra.tasks.sdk.authentication.url to also default the Kestra API endpoint (see kestraUrl above) 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.
passwordstring

Password for HTTP Basic auth

usernamestring

Username for HTTP Basic auth

Case description

Supports Markdown.

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.

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.

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 to attach to the case

Labels as a list of Label (key/value pairs) or as a map of string to string.

Defaultfalse

Attach 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 and attaches the triggering execution to it instead of creating a new case.

Namespace the case belongs to

Defaults to the flow's namespace.

Reference (ref) of the pluginDefaults to apply to this task.

Possible Values
CRITICALHIGHMEDIUMLOWUNKNOWN_DEFAULT_OPEN_API

Case severity

Defaults to MEDIUM if not set.

SLA targets for the case

Definitions
acknowledgementstring

Time to acknowledge, counted from case creation

resolutionstring

Time to resolve, counted from case creation

DefaultOPEN
Possible Values
OPENACKNOWLEDGEDINVESTIGATINGRESOLVEDCANCELLEDUNKNOWN_DEFAULT_OPEN_API

Initial case status

Defaults to OPEN.

Override target tenant

Tenant identifier applied to API calls; defaults to the current execution tenant.

Case title

Required unless caseId is set (attaching to an existing case doesn't need a new title).

Watchers

Definitions
groupsarray
SubTypestring

Group names

usersarray
SubTypestring

User emails

The id of the case that was created or attached to

Whether a new case was created

false if the triggering execution was attached to an existing matching case instead.