Skip to content
betterstack-alchemyUnofficial

Incidents.JiraIntegration

Kind ResourceType id BetterStack.Incidents.JiraIntegrationSource src/Incidents/JiraIntegration.tsOffline only Tested against the offline mock only: the lifecycle runs against the offline mock only (test/Incidents/JiraIntegration.test.ts).

A Jira integration creates Jira issues for your incidents and keeps them in sync. Take-over resource: the API cannot create or delete a Jira integration, because connecting one signs in to Jira with OAuth in a browser. Connect it once in the Better Stack web app, then name it here by integrationId: deploying configures that integration (project, issue type, extra fields, automatic issue creation), and destroying only forgets it — the integration stays connected, with the settings it had last.

Deploying fails when no integration has that id (it is never created). Every setting updates in place; changing integrationId or teamId moves management to another integration. Removing a setting from the config leaves its current value.

Issues in the OPS project for every incident

yield* BetterStack.Incidents.JiraIntegration("jira", {
integrationId: "12345",
automaticIssueCreation: true,
jiraProjectKey: "OPS",
jiraIssueTypeId: "10004",
jiraFields: { labels: [{ label: "incident", value: "incident" }] },
});

integrationId string required

Id of a Jira integration already connected in the Better Stack web app (Integrations → Jira, which signs in to Jira with OAuth). Get it from the integration's URL or JiraIntegration.lookup/the list API. Changing it manages another integration; the previous one is left as it is.

automaticIssueCreation boolean

Whether to create a Jira issue for every incident automatically.

jiraFields UpdateIncidentsJiraIntegrationRequestJiraFieldsMap

Extra Jira fields to set on created issues, keyed by Jira field ID. Set the integration up in the app, then use the jira_fields from Get a Jira integration as a template. Each value has the shape of its Jira field type. A list field such as labels accepts a list of {label, value} objects, for example {"labels": [{"label": "outage", "value": "outage"}]}. A text field accepts a string, for example {"customfield_10042": "Checkout"}. A user, team or parent field accepts one {label, value} object, and a single-select or priority field the option's ID as a string. A number field accepts a number, and a date picker field an ISO 8601 time such as 2026-12-01T09:00:00Z.

jiraIssueTypeId string | null

ID of the Jira issue type for created issues. Get the ID via the Get issue types for project endpoint of Jira's REST API.

jiraProjectKey string | null

Key of the Jira project that issues are created in. Get the key from your Jira issue keys, such as ABC in ABC-123. A key that isn't found is refused, and the error lists the available keys.

name string | null

Integration name. null while the integration is still being connected.

teamId string

Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.

id string always set

The incidents_jira_integration's id.

automaticIssueCreation boolean

Whether to create a Jira issue for every incident automatically.

jiraFields IncidentsJiraIntegrationJiraFieldsMap

Extra Jira fields to set on created issues, keyed by Jira field ID. Set the integration up in the app, then use the jira_fields from Get a Jira integration as a template. Each value has the shape of its Jira field type. A list field such as labels accepts a list of {label, value} objects, for example {"labels": [{"label": "outage", "value": "outage"}]}. A text field accepts a string, for example {"customfield_10042": "Checkout"}. A user, team or parent field accepts one {label, value} object, and a single-select or priority field the option's ID as a string. A number field accepts a number, and a date picker field an ISO 8601 time such as 2026-12-01T09:00:00Z.

jiraIssueTypeId string | null

ID of the Jira issue type for created issues. Get the ID via the Get issue types for project endpoint of Jira's REST API.

jiraProjectKey string | null

Key of the Jira project that issues are created in. Get the key from your Jira issue keys, such as ABC in ABC-123. A key that isn't found is refused, and the error lists the available keys.

name string | null

Integration name. null while the integration is still being connected.

teamId string

Team that owns this integration, such as t123.

teamName string

Name of the team that owns this integration.

JiraIntegration.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.

id string required

The integration's id.

teamId string

Team that owns it, such as t123. Defaults to the credentials' team.