# Get a single Jira integration

Returns a single Jira integration with the settings of its **Configure** page.

[endpoint]
base_url = "https://errors.betterstack.com"
path = "/api/v1/jira-integrations/{id}"
method = "GET"

[[path_param]]
name = "id"
description = "The ID of the Jira integration, the number in the URL of its **Configure** page."
required = true
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns the requested Jira integration.'''
body = '''{
  "data": {
    "id": "31174",
    "type": "jira_integration",
    "attributes": {
      "team_id": "t123456",
      "team_name": "My team",
      "applications": [
        { "application_id": 1234, "environments": [] }
      ],
      "notifications": {
        "spikes": false,
        "new_errors": false,
        "automatically_reopened": false,
        "occurrence_milestones": false,
        "occurrence_threshold": false,
        "affected_users_threshold": true
      },
      "occurrence_threshold_count": 10,
      "occurrence_threshold_interval": "minute",
      "affected_users_threshold_count": 25,
      "tag_filter": [],
      "name": "Ops errors",
      "jira_site_url": "https://example.atlassian.net",
      "jira_project_key": "OPS",
      "jira_issue_type_id": "10002",
      "jira_fields": {
        "labels": ["errors"]
      }
    }
  }
}'''

[[response]]
status = 401
description = '''Unauthorized'''
body = '''{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}'''

[[response]]
status = 404
description = '''Not Found'''
body = '''{
  "errors": "Resource with the provided ID was not found"
}'''
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the Jira integration, the same as in the URL of its **Configure** page."

[[param]]
name = "type"
type = "string"
description = "Always `jira_integration`."

[[param]]
name = "attributes.team_id"
type = "string"
description = "The ID of the team the integration belongs to, like `t123`."

[[param]]
name = "attributes.team_name"
type = "string"
description = "The name of the team the integration belongs to."

[[param]]
name = "attributes.applications"
type = "array of objects"
description = "The applications whose errors the integration handles. Empty means any application."

[[param]]
name = "attributes.applications[].application_id"
type = "integer"
description = "The ID of the error tracking application."

[[param]]
name = "attributes.applications[].environments"
type = "array of strings"
description = "The environments of the application the integration handles. Empty means every environment."

[[param]]
name = "attributes.notifications"
type = "object"
description = "The **Automatic work item creation** toggles of the integration's **Configure** page, each `true` when on."

[[param]]
name = "attributes.notifications.spikes"
type = "boolean"
description = "Create a work item when an application has a spike in errors."

[[param]]
name = "attributes.notifications.new_errors"
type = "boolean"
description = "Create a work item when a new error occurs."

[[param]]
name = "attributes.notifications.automatically_reopened"
type = "boolean"
description = "Create a work item when a resolved error reoccurs."

[[param]]
name = "attributes.notifications.occurrence_milestones"
type = "boolean"
description = "Create a work item when an error reaches an occurrence milestone: 10, 100, 200, 500 and so on, or comment on its work item when it has one."

[[param]]
name = "attributes.notifications.occurrence_threshold"
type = "boolean"
description = "Create a work item when an error occurs `occurrence_threshold_count` times within one `occurrence_threshold_interval`, or comment on its work item when it has one."

[[param]]
name = "attributes.notifications.affected_users_threshold"
type = "boolean"
description = "Create a work item when an error reaches `affected_users_threshold_count` affected users in total, or comment on its work item when it has one."

[[param]]
name = "attributes.occurrence_threshold_count"
type = "integer"
description = "How many occurrences within `occurrence_threshold_interval` trigger `notifications.occurrence_threshold`."

[[param]]
name = "attributes.occurrence_threshold_interval"
type = "string"
description = "The interval of the occurrence threshold: `minute`, `hour`, `day`, or `week`."

[[param]]
name = "attributes.affected_users_threshold_count"
type = "integer"
description = "How many affected users in total trigger `notifications.affected_users_threshold`."

[[param]]
name = "attributes.tag_filter"
type = "array of objects"
description = "Create work items only for errors whose exceptions have matching tags. Empty means every error."

[[param]]
name = "attributes.tag_filter[].tag"
type = "string"
description = "The tag to match, like `level` or `environment`."

[[param]]
name = "attributes.tag_filter[].values"
type = "array of strings"
description = "The values the tag matches. Any of them matches."

[[param]]
name = "attributes.name"
type = "string"
description = "The name that identifies the integration in Better Stack."

[[param]]
name = "attributes.jira_site_url"
type = "string"
description = "The Jira site work items are created in. Read-only."

[[param]]
name = "attributes.jira_project_key"
type = "string"
description = "The key of the Jira space work items are created in."

[[param]]
name = "attributes.jira_issue_type_id"
type = "string"
description = "The ID of the Jira work type new work items get."

[[param]]
name = "attributes.jira_fields"
type = "object"
description = "The values of other Jira fields new work items get, keyed by Jira field ID."
[/params]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://errors.betterstack.com/api/v1/jira-integrations/31174 \
  --header "Authorization: Bearer $TOKEN"
```
