PUT
/
v1
/
alert_sources
/
{id}
curl --request PUT \
  --url https://api.rootly.com/v1/alert_sources/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "alert_sources",
    "attributes": {
      "name": "<string>",
      "source_type": "email",
      "alert_urgency_id": "<string>",
      "alert_template_attributes": {
        "title": "<string>",
        "description": "<string>",
        "external_url": "<string>"
      },
      "alert_source_urgency_rules_attributes": [
        {
          "json_path": "<string>",
          "operator": "is",
          "value": "<string>"
        }
      ],
      "sourceable_attributes": {
        "auto_resolve": true,
        "resolve_state": "<string>",
        "field_mappings_attributes": [
          {
            "field": "external_id",
            "json_path": "<string>"
          }
        ]
      }
    }
  }
}'
{
  "data": {
    "id": "977fd0fa-084b-4483-879e-2c2a380eb91a",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "datadog",
      "status": "setup_incomplete",
      "secret": "36556f9da185b62b292aac4f6ce2722f97d0c067e919c275c6cfe43e3ae8d04e",
      "alert_urgency_id": "f1dbd118-89aa-4d1d-b917-d5bb08ba75bc",
      "created_at": "2025-03-22T22:57:46.705-07:00",
      "updated_at": "2025-03-22T22:57:50.557-07:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/datadog_webhooks/notify/<TYPE>/<ID>",
      "sourceable_attributes": {},
      "alert_template_attributes": {}
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "771cfc0a-cbd0-4346-a5d9-c0369c345d75",
            "alerts_source_id": "977fd0fa-084b-4483-879e-2c2a380eb91a",
            "alert_urgency_id": "a79e1e96-9650-4956-b077-b0c26eb7da3f",
            "json_path": "$.alert.status",
            "operator": "is",
            "value": "Critical",
            "deleted_at": null,
            "created_at": "2025-03-22T22:57:50.558-07:00",
            "updated_at": "2025-03-22T22:57:50.558-07:00"
          }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/vnd.api+json
data
object
required

Response

200
application/vnd.api+json
alert source updated
data
object
required