Update a Jira integration

Updates the settings of a Jira integration, the same settings as its Configure page. Send only the parameters you wish to change.

Connect the integration in Errors → Integrations first, since connecting Jira needs you to authorize Better Stack in Jira.

PATCH https://errors.betterstack.com/api/v1/jira-integrations/{id}

URL parameters

id
required string

Headers

Authorization
required string
Content-Type
required string

Body parameters

applications
array of objects
notifications
object
occurrence_threshold_count
integer
occurrence_threshold_interval
string
affected_users_threshold_count
integer
tag_filter
array of objects
name
string
jira_project_key
string
jira_issue_type_id
string
jira_fields
object
200

Response 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"
        ]
      }
    }
  }
}
401

Response 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"
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
422

Response body

{
  "errors": "Pass jira_issue_type_id with a new jira_project_key: work types belong to a space."
}

Example cURL

Create work items in another space Create work items for errors that affect 25 users
curl --request PATCH \
  --url https://errors.betterstack.com/api/v1/jira-integrations/31174 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "jira_project_key": "OPS",
    "jira_issue_type_id": "10002",
    "jira_fields": {
      "labels": ["errors"]
    }
  }'
curl --request PATCH \
  --url https://errors.betterstack.com/api/v1/jira-integrations/31174 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "notifications": {
      "affected_users_threshold": true
    },
    "affected_users_threshold_count": 25
  }'