# Get a single Linear integration

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

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

[[path_param]]
name = "id"
description = "The ID of the Linear 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 Linear integration.'''
body = '''{
  "data": {
    "id": "66368",
    "type": "linear_integration",
    "attributes": {
      "team_id": "t123456",
      "team_name": "My team",
      "applications": [],
      "notifications": {
        "spikes": false,
        "new_errors": true,
        "automatically_reopened": true,
        "occurrence_milestones": false,
        "occurrence_threshold": true,
        "affected_users_threshold": false
      },
      "occurrence_threshold_count": 100,
      "occurrence_threshold_interval": "hour",
      "affected_users_threshold_count": 10,
      "tag_filter": [
        { "tag": "environment", "values": ["production"] }
      ],
      "name": "Platform errors",
      "linear_team_id": "9cfb482a-81e3-4154-b5b9-2c805e70a02d",
      "linear_assignee_id": "",
      "linear_status_id": "5c3a1f8e-2b7d-4e61-9a0c-7d4b8e2f1a36",
      "linear_resolved_status_id": "e2d4f6a8-1b3c-4d5e-8f70-9a1b2c3d4e5f",
      "linear_project_id": "",
      "linear_label_ids": ["0b8f3c2e-6a1d-4f97-b5e4-3c2a1d0e9f8b"],
      "linear_priority": "high",
      "auto_reopen": true,
      "auto_resolve": true,
      "sync_comments": true
    }
  }
}'''

[[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 Linear integration, the same as in the URL of its **Configure** page."

[[param]]
name = "type"
type = "string"
description = "Always `linear_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 issue creation** toggles of the integration's **Configure** page, each `true` when on."

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

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

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

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

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

[[param]]
name = "attributes.notifications.affected_users_threshold"
type = "boolean"
description = "Create an issue when an error reaches `affected_users_threshold_count` affected users in total, or comment on its Linear issue 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 issues 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.linear_team_id"
type = "string"
description = "The ID of the Linear team issues are created in."

[[param]]
name = "attributes.linear_assignee_id"
type = "string"
description = "The ID of the Linear user new issues are assigned to, or an empty string for none."

[[param]]
name = "attributes.linear_status_id"
type = "string"
description = "The ID of the Linear status new issues get, or an empty string for Linear's default."

[[param]]
name = "attributes.linear_resolved_status_id"
type = "string"
description = "The ID of the Linear status issues move to when their error is resolved, or an empty string when not set."

[[param]]
name = "attributes.linear_project_id"
type = "string"
description = "The ID of the Linear project new issues are added to, or an empty string for none."

[[param]]
name = "attributes.linear_label_ids"
type = "array of strings"
description = "The IDs of the Linear labels new issues get."

[[param]]
name = "attributes.linear_priority"
type = "string"
description = "The priority of new issues: `no_priority`, `urgent`, `high`, `medium`, or `low`."

[[param]]
name = "attributes.auto_reopen"
type = "boolean"
description = "Whether to reopen the Linear issue when its error is automatically re-opened, moving it back to `linear_status_id`. Needs `linear_status_id` and `linear_resolved_status_id`."

[[param]]
name = "attributes.auto_resolve"
type = "boolean"
description = "Whether to keep Linear and error resolutions in sync, so resolving either side resolves the other. Needs `linear_resolved_status_id`."

[[param]]
name = "attributes.sync_comments"
type = "boolean"
description = "Whether to sync comments between errors and their Linear issues."
[/params]

#### Example cURL

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