Skip to main content

project_checks

Creates, updates, deletes, gets or lists a project_checks resource.

Overview

Nameproject_checks
TypeResource
Idvercel.checks.project_checks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
namestring
owner_idstring (wire: ownerId)
project_idstring (wire: projectId)
source_integration_configuration_idstring (wire: sourceIntegrationConfigurationId)
blocksstring (build-start, deployment-alias, deployment-promotion, deployment-start, none)
created_atnumber (wire: createdAt)
deleted_atnumber (wire: deletedAt)
is_rerequestableboolean (false, true) (wire: isRerequestable)
requiresstring (build-ready, deployment-url, none)
sourceobject
source_kindstring (git-provider, integration, vercel, webhook, integration, webhook, git-provider) (wire: sourceKind)
targetsarray
timeoutnumber
updated_atnumber (wire: updatedAt)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject_id_or_name, check_idteam_id, slugReturn a detailed response for a single check.
listselectproject_id_or_nameblocks, team_id, slugList all checks for a project, optionally filtered by target.
createinsertproject_id_or_name, name, requiresteam_id, slugCreates a new check for a project.
updateupdateproject_id_or_name, check_idteam_id, slugUpdate an existing check.
deletedeleteproject_id_or_name, check_idteam_id, slugDelete an existing check and all of its runs.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
check_idstring
project_id_or_namestring
blocksstring
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)

SELECT examples

Return a detailed response for a single check.

SELECT
id,
name,
owner_id,
project_id,
source_integration_configuration_id,
blocks,
created_at,
deleted_at,
is_rerequestable,
requires,
source,
source_kind,
targets,
timeout,
updated_at
FROM vercel.checks.project_checks
WHERE project_id_or_name = '{{ project_id_or_name }}' -- required
AND check_id = '{{ check_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

INSERT examples

Creates a new check for a project.

INSERT INTO vercel.checks.project_checks (
name,
is_rerequestable,
requires,
targets,
blocks,
source,
timeout,
project_id_or_name,
team_id,
slug
)
SELECT
'{{ name }}' /* required */,
{{ is_rerequestable }},
'{{ requires }}' /* required */,
'{{ targets }}',
'{{ blocks }}',
'{{ source }}',
{{ timeout }},
'{{ project_id_or_name }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id,
name,
owner_id,
project_id,
source_integration_configuration_id,
blocks,
created_at,
deleted_at,
is_rerequestable,
requires,
source,
source_kind,
targets,
timeout,
updated_at
;

UPDATE examples

Update an existing check.

UPDATE vercel.checks.project_checks
SET
name = '{{ name }}',
is_rerequestable = {{ is_rerequestable }},
requires = '{{ requires }}',
targets = '{{ targets }}',
blocks = '{{ blocks }}',
timeout = {{ timeout }}
WHERE
project_id_or_name = '{{ project_id_or_name }}' --required
AND check_id = '{{ check_id }}' --required
AND team_id = '{{ team_id}}'
AND slug = '{{ slug}}'
RETURNING
id,
name,
owner_id,
project_id,
source_integration_configuration_id,
blocks,
created_at,
deleted_at,
is_rerequestable,
requires,
source,
source_kind,
targets,
timeout,
updated_at;

DELETE examples

Delete an existing check and all of its runs.

DELETE FROM vercel.checks.project_checks
WHERE project_id_or_name = '{{ project_id_or_name }}' --required
AND check_id = '{{ check_id }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;