curl --request POST \
--url https://developer.synq.io/api/datachecks/sqltests/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sqlTests": [
{
"id": "<string>",
"name": "<string>",
"platform": {
"bigquery": {
"project": "<string>"
}
},
"description": "<string>",
"severity": "SEVERITY_UNSPECIFIED",
"sqlExpression": "<string>",
"recurrenceRule": "<string>",
"annotations": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"saveFailures": true,
"template": {
"identifier": {
"airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
}
},
"acceptedValuesTest": {
"columnName": "<string>",
"acceptedValues": [
{
"stringLiteral": "<string>",
"expression": "<string>"
}
]
}
},
"configId": "<string>",
"source": "SOURCE_APP"
}
],
"sqlTestIdsToReset": [
"<string>"
]
}
'{
"createdIds": [
"<string>"
],
"updatedIds": [
"<string>"
],
"errors": [
{
"id": "<string>",
"reason": "<string>"
}
]
}Upsert SqlTests based on a unique ID.
curl --request POST \
--url https://developer.synq.io/api/datachecks/sqltests/v1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sqlTests": [
{
"id": "<string>",
"name": "<string>",
"platform": {
"bigquery": {
"project": "<string>"
}
},
"description": "<string>",
"severity": "SEVERITY_UNSPECIFIED",
"sqlExpression": "<string>",
"recurrenceRule": "<string>",
"annotations": [
{
"name": "<string>",
"values": [
"<string>"
]
}
],
"saveFailures": true,
"template": {
"identifier": {
"airflowDag": {
"integrationId": "<string>",
"dagId": "<string>"
}
},
"acceptedValuesTest": {
"columnName": "<string>",
"acceptedValues": [
{
"stringLiteral": "<string>",
"expression": "<string>"
}
]
}
},
"configId": "<string>",
"source": "SOURCE_APP"
}
],
"sqlTestIdsToReset": [
"<string>"
]
}
'{
"createdIds": [
"<string>"
],
"updatedIds": [
"<string>"
],
"errors": [
{
"id": "<string>",
"reason": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
List of SqlTests to upsert. The upsert is performed based on the unique path provided for each SqlTest.
Show child attributes
Unique resource identifier for the SqlTest. This is externally maintained and can be used to fetch/update/delete this test.
Human friendly name.
Identifier for the data platform which the SqlTest would be executed on.
Description of purpose and motivation.
SEVERITY_UNSPECIFIED, SEVERITY_WARNING, SEVERITY_ERROR, SEVERITY_INFO A valid SQL expression which is the test.
Recurrence rule for the execution schedule of the SqlTest.
Annotations for the given SqlTest.These help filter the SqlTests for later operations like listing by API, selection in UI, analytics, etc.
Boolean flag to to toggle saving of failure runs.
Template for the SqlTest. required when sql_expression is not provided
Show child attributes
Read-only path of matched entity. This is a unique path that can be used to access the entity in the Synq's UI.
Show child attributes
Validates that column values are within an allowed set (e.g., status in ['active', 'inactive', 'pending'])
Show child attributes
Name of the column to validate
List of allowed values for the column
1Represents a value that can be either a literal (to be quoted in SQL) or a SQL expression (to be used as plain text).
Show child attributes
Literal value that should be quoted in SQL (e.g., '2025-05-12', 'active')
SQL expression, numbers to be used as plain text (e.g., NOW(), COUNT(*), true, 1.1)
Config ID for the SqlTest.
SOURCE_APP, SOURCE_API List of SqlTest IDs to reset. Some updates might require resetting the SqlTest to a fresh state.
Success
IDs for which SqlTests were created without error.
IDs for which SqlTests were updated without error.