Skip to content
betterstack-alchemyUnofficial

Errors.JiraIntegration

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

An Error tracking Jira integration: which errors are filed as Jira work items, in which Jira space, and with which work type and fields.

The API cannot create or delete one: connect Jira in the Better Stack web app first (it needs Atlassian’s OAuth consent), then this resource takes over the integration named by integrationId and applies the settings you declare. Destroying the resource only forgets it; the integration and its settings stay in Better Stack. A missing integrationId fails the deploy.

applications and tagFilter are replaced as a whole on update; notifications changes only the toggles sent, and only the toggles you declare are compared with what the API answers. Changing jiraProjectKey needs jiraIssueTypeId in the same deploy, and clears jiraFields unless they are declared too.

File production errors of one application as Jira bugs

const errors = yield* BetterStack.Errors.Application("api-errors", {
platform: "bun_errors",
});
yield* BetterStack.Errors.JiraIntegration("jira", {
integrationId: "12345",
applications: [{ applicationId: errors.id, environments: ["production"] }],
jiraProjectKey: "OPS",
jiraIssueTypeId: "10004",
occurrenceThresholdCount: 10,
occurrenceThresholdInterval: "hour",
});

integrationId string required

The id of the Jira integration to take over: one connected in the Better Stack web app (Errors → Integrations → Jira), from List Jira integrations. Changing it takes over that integration instead; the previous one keeps its settings.

affectedUsersThresholdCount number

Total number of affected users for notifications.affected_users_threshold. A positive whole number.

applications UpdateErrorsJiraIntegrationRequestApplicationsItem[]

Applications this integration files work items for, each with its environments. Empty means any application. An update replaces the whole list.

jiraFields UpdateErrorsJiraIntegrationRequestJiraFieldsMap

More Jira fields set on new work items, keyed by Jira field ID. 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

The ID of the Jira work type new work items get.

jiraProjectKey string

The key of the Jira space work items are created in. When you change it, send jira_issue_type_id in the same request. A change also clears jira_fields unless you send them too.

name string

Integration name.

notifications ErrorsJiraIntegrationNotifications

Which events file a Jira work item, as under Automatic work item creation in the web app. An update changes only the toggles sent.

occurrenceThresholdCount number

Number of occurrences for notifications.occurrence_threshold. A positive whole number.

occurrenceThresholdInterval "minute" | "hour" | "day" | "week" | string

Time window for notifications.occurrence_threshold.

tagFilter UpdateErrorsJiraIntegrationRequestTagFilterItem[]

The tags an error must have to get a work item. An error matches when one of its exceptions has every tag listed, each set to one of the tag's values. Empty means every error. You can list up to 10 tags, each once, with up to 50 values each. A tag or value can be up to 200 characters. An update replaces the whole list.

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 errors_jira_integration's id.

affectedUsersThresholdCount number

Total number of affected users for notifications.affected_users_threshold. A positive whole number.

applications UpdateErrorsJiraIntegrationRequestApplicationsItem[]

Applications whose errors this integration posts, each with its environments (ids as strings).

jiraFields ErrorsJiraIntegrationJiraFieldsMap

More Jira fields set on new work items, keyed by Jira field ID. 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

The ID of the Jira work type new work items get.

jiraProjectKey string

The key of the Jira space work items are created in.

jiraSiteUrl string | null

Jira site the integration is connected to.

name string

Integration name.

notifications ErrorsJiraIntegrationNotifications

Which events file a Jira work item, as under Automatic work item creation in the web app. An update changes only the toggles sent.

occurrenceThresholdCount number

Number of occurrences for notifications.occurrence_threshold. A positive whole number.

occurrenceThresholdInterval "minute" | "hour" | "day" | "week"

Time window for notifications.occurrence_threshold.

tagFilter ErrorsJiraIntegrationTagFilterItem[]

The tags an error must have to get a work item. An error matches when one of its exceptions has every tag listed, each set to one of the tag's values. Empty means every error. You can list up to 10 tags, each once, with up to 50 values each. A tag or value can be up to 200 characters. An update replaces the whole list.

teamId string

ID of the team that owns the integration, such as t123.

teamName string

Name of the team that owns the 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.