deployment_checks
Creates, updates, deletes, gets or lists a deployment_checks resource.
Overview
| Name | deployment_checks |
| Type | Resource |
| Id | vercel.checks.deployment_checks |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
deployment_id | string | (wire: deploymentId) |
external_id | string | (wire: externalId) |
integration_id | string | (wire: integrationId) |
blocking | boolean | (false, true) |
completed_at | number | (wire: completedAt) |
conclusion | string | (canceled, failed, neutral, skipped, stale, succeeded) |
created_at | number | (wire: createdAt) |
details_url | string | (wire: detailsUrl) |
output | object | |
path | string | |
rerequestable | boolean | (false, true) |
started_at | number | (wire: startedAt) |
status | string | (completed, registered, running) |
updated_at | number | (wire: updatedAt) |
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
integration_id | string | (wire: integrationId) |
blocking | boolean | (false, true) |
completed_at | number | (wire: completedAt) |
conclusion | string | (canceled, failed, neutral, skipped, stale, succeeded) |
created_at | number | (wire: createdAt) |
details_url | string | (wire: detailsUrl) |
output | object | |
path | string | |
rerequestable | boolean | (false, true) |
started_at | number | (wire: startedAt) |
status | string | (completed, registered, running) |
updated_at | number | (wire: updatedAt) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | deployment_id, check_id | team_id, slug | Return a detailed response for a single check. |
list | select | deployment_id | team_id, slug | List all of the checks created for a deployment. |
create | insert | deployment_id, name, blocking | team_id, slug | Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error. |
update | update | deployment_id, check_id | team_id, slug | Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error. |
rerequest | exec | deployment_id, check_id | autoUpdate, teamId, slug | Rerequest a selected check that has failed. |
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.
| Name | Datatype | Description |
|---|---|---|
check_id | string | The check to rerun |
deployment_id | string | The deployment to rerun the check for. |
autoUpdate | boolean | Mark the check as running |
slug | string | The Team slug to perform the request on behalf of. |
teamId | string | The Team identifier to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- get
- list
Return a detailed response for a single check.
SELECT
id,
name,
deployment_id,
external_id,
integration_id,
blocking,
completed_at,
conclusion,
created_at,
details_url,
output,
path,
rerequestable,
started_at,
status,
updated_at
FROM vercel.checks.deployment_checks
WHERE deployment_id = '{{ deployment_id }}' -- required
AND check_id = '{{ check_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
List all of the checks created for a deployment.
SELECT
id,
name,
integration_id,
blocking,
completed_at,
conclusion,
created_at,
details_url,
output,
path,
rerequestable,
started_at,
status,
updated_at
FROM vercel.checks.deployment_checks
WHERE deployment_id = '{{ deployment_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- create
- Manifest
Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
INSERT INTO vercel.checks.deployment_checks (
name,
path,
blocking,
details_url,
external_id,
rerequestable,
deployment_id,
team_id,
slug
)
SELECT
'{{ name }}' /* required */,
'{{ path }}',
{{ blocking }} /* required */,
'{{ details_url }}',
'{{ external_id }}',
{{ rerequestable }},
'{{ deployment_id }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id,
name,
deployment_id,
external_id,
integration_id,
blocking,
completed_at,
conclusion,
created_at,
details_url,
output,
path,
rerequestable,
started_at,
status,
updated_at
;
# Description fields are for documentation purposes
- name: deployment_checks
props:
- name: deployment_id
value: "{{ deployment_id }}"
description: Required parameter for the deployment_checks resource.
- name: name
value: "{{ name }}"
description: |
The name of the check being created
- name: path
value: "{{ path }}"
description: |
Path of the page that is being checked
- name: blocking
value: {{ blocking }}
description: |
Whether the check should block a deployment from succeeding
- name: details_url
value: "{{ details_url }}"
description: |
URL to display for further details
- name: external_id
value: "{{ external_id }}"
description: |
An identifier that can be used as an external reference
- name: rerequestable
value: {{ rerequestable }}
description: |
Whether a user should be able to request for the check to be rerun if it fails
- name: team_id
value: "{{ team_id }}"
description: The Team identifier to perform the request on behalf of.
description: The Team identifier to perform the request on behalf of.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.
UPDATE examples
- update
Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
UPDATE vercel.checks.deployment_checks
SET
name = '{{ name }}',
path = '{{ path }}',
status = '{{ status }}',
conclusion = '{{ conclusion }}',
details_url = '{{ details_url }}',
output = '{{ output }}',
external_id = '{{ external_id }}'
WHERE
deployment_id = '{{ deployment_id }}' --required
AND check_id = '{{ check_id }}' --required
AND team_id = '{{ team_id}}'
AND slug = '{{ slug}}'
RETURNING
id,
name,
deployment_id,
external_id,
integration_id,
blocking,
completed_at,
conclusion,
created_at,
details_url,
output,
path,
rerequestable,
started_at,
status,
updated_at;
Lifecycle Methods
EXEC variables use wire (API) names.
- rerequest
Rerequest a selected check that has failed.
EXEC vercel.checks.deployment_checks.rerequest
@deployment_id='{{ deployment_id }}' --required,
@check_id='{{ check_id }}' --required,
@autoUpdate={{ autoUpdate }},
@teamId='{{ teamId }}',
@slug='{{ slug }}'
;