Skip to main content
POST
/
v1
/
projects
/
{project}
/
releases:check
cURL
curl --request POST \
  --url https://api.example.com/v1/projects/{project}/releases:check \
  --header 'Content-Type: application/json' \
  --data '
{
  "parent": "<string>",
  "release": {
    "title": "<string>",
    "files": [
      {
        "id": "<string>",
        "path": "<string>",
        "type": "TYPE_UNSPECIFIED",
        "version": "<string>",
        "enableGhost": true,
        "sheet": "<string>",
        "statement": "<string>"
      }
    ],
    "vcsSource": {
      "vcsType": "VCS_TYPE_UNSPECIFIED",
      "url": "<string>"
    },
    "digest": "<string>"
  },
  "targets": [
    "<string>"
  ],
  "customRules": "<string>"
}
'
{
  "results": [
    {
      "file": "<string>",
      "target": "<string>",
      "advices": [
        {
          "status": "STATUS_UNSPECIFIED",
          "code": 123,
          "title": "<string>",
          "content": "<string>",
          "startPosition": {
            "line": 123,
            "column": 123
          },
          "endPosition": {
            "line": 123,
            "column": 123
          }
        }
      ],
      "affectedRows": "<string>",
      "riskLevel": "RISK_LEVEL_UNSPECIFIED"
    }
  ],
  "affectedRows": "<string>",
  "riskLevel": "RISK_LEVEL_UNSPECIFIED"
}

Path Parameters

project
string
required

The project id.

Body

application/json
parent
string
required

Format: projects/{project}

release
object
required

The release to check.

targets
string[]

The targets to dry-run the release. Can be database or databaseGroup. Format: projects/{project}/databaseGroups/{databaseGroup} instances/{instance}/databases/{database}

customRules
string

Custom linting rules in natural language for AI-powered validation. Each rule should be a clear statement describing the desired schema constraint. Example: "All tables must have a primary key" Example: "VARCHAR columns should specify a maximum length"

Response

OK

results
object[]

The check results for each file and target combination.

affectedRows
string

The total affected rows across all checks.

riskLevel
enum<string>

The aggregated risk level of the check.

Available options:
RISK_LEVEL_UNSPECIFIED,
LOW,
MODERATE,
HIGH