Skip to main content
POST
/
api
/
alerts
/
v1
Create
curl --request POST \
  --url https://developer.synq.io/api/alerts/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "trigger": {
    "parts": [
      {
        "operand": "QUERY_OPERAND_UNSPECIFIED",
        "parts": [
          {
            "identifierList": {
              "identifiers": [
                {
                  "airflowDag": {
                    "integrationId": "<string>",
                    "dagId": "<string>"
                  }
                }
              ]
            }
          }
        ]
      }
    ]
  },
  "settings": {
    "entityFailure": {
      "ongoing": {
        "disabled": {}
      },
      "severities": [
        "SEVERITY_UNSPECIFIED"
      ],
      "notifyUpstream": true,
      "allowSqlTestAuditLink": true
    }
  },
  "name": "<string>",
  "fqn": "<string>",
  "targets": [
    {
      "email": {
        "recipientEmails": [
          "[email protected]"
        ]
      }
    }
  ],
  "owner": {
    "ownerPath": "<string>",
    "ownershipId": "<string>"
  }
}
'
{
  "alert": {
    "trigger": {
      "parts": [
        {
          "operand": "QUERY_OPERAND_UNSPECIFIED",
          "parts": [
            {
              "identifierList": {
                "identifiers": [
                  {
                    "airflowDag": {
                      "integrationId": "<string>",
                      "dagId": "<string>"
                    }
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    "settings": {
      "entityFailure": {
        "ongoing": {
          "disabled": {}
        },
        "severities": [
          "SEVERITY_UNSPECIFIED"
        ],
        "notifyUpstream": true,
        "allowSqlTestAuditLink": true
      }
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "id": "<string>",
    "name": "<string>",
    "fqn": "<string>",
    "targets": [
      {
        "email": {
          "recipientEmails": [
            "[email protected]"
          ]
        }
      }
    ],
    "owner": {
      "ownerPath": "<string>",
      "ownershipId": "<string>"
    },
    "isDisabled": true
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

CreateRequest creates a new alert configuration.

trigger
EntityGroupQuery · object
required

Query that defines which entities can trigger this alert.

settings
entity_failure · object
required

Additional settings for the specific alert type.

name
string

Human-readable name for the alert configuration.

Required string length: 1 - 255
fqn
string

User-provided fully qualified name for the alert config. This is a unique identifier that users can specify to reference the alert.

Required string length: 1 - 500
targets
(email · object | ms_teams · object | owner · object | slack · object | webhook · object)[]

Targets where alerts will be sent.

Minimum array length: 1

AlertingTarget represents a destination where alert notifications will be sent. Each target type has its own specific configuration requirements.

owner
Owner · object

Optional owner information for the alert configuration.

Response

200 - application/json

Success

CreateResponse returns the created alert configuration.

alert
Alert · object
required

The alert configuration that was created.