Skip to main content

check_runs

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

Overview

Namecheck_runs
TypeResource
Idvercel.checks.check_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_for_checkselectproject_id_or_name, check_idteam_id, slugList all runs associated with a given check.
getselectdeployment_id, check_run_idteam_id, slugReturn a detailed response for a single check run.
listselectdeployment_idteam_id, slugList all check runs for a deployment.
createinsertdeployment_id, check_idteam_id, slugCreates a new check run for a deployment.
updateupdatedeployment_id, check_run_idteam_id, slugUpdate an existing check run for a deployment.

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_idstringThe ID of the resource that will be updated.
check_run_idstring
deployment_idstring
project_id_or_namestring
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

List all runs associated with a given check.

SELECT
*
FROM vercel.checks.check_runs
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 run for a deployment.

INSERT INTO vercel.checks.check_runs (
check_id,
deployment_id,
team_id,
slug
)
SELECT
'{{ check_id }}' /* required */,
'{{ deployment_id }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id,
name,
check_id,
deployment_id,
external_id,
owner_id,
project_id,
blocks,
completed_at,
conclusion,
conclusion_text,
created_at,
external_url,
output,
requires,
source,
status,
targets,
timeout,
updated_at
;

UPDATE examples

Update an existing check run for a deployment.

UPDATE vercel.checks.check_runs
SET
external_id = '{{ external_id }}',
external_url = '{{ external_url }}',
status = '{{ status }}',
output = '{{ output }}',
completed_at = {{ completed_at }},
conclusion = '{{ conclusion }}',
conclusion_text = '{{ conclusion_text }}'
WHERE
deployment_id = '{{ deployment_id }}' --required
AND check_run_id = '{{ check_run_id }}' --required
AND team_id = '{{ team_id}}'
AND slug = '{{ slug}}'
RETURNING
id,
name,
check_id,
deployment_id,
external_id,
owner_id,
project_id,
blocks,
completed_at,
conclusion,
conclusion_text,
created_at,
external_url,
output,
requires,
source,
status,
targets,
timeout,
updated_at;