project_checks
Creates, updates, deletes, gets or lists a project_checks resource.
Overview
| Name | project_checks |
| Type | Resource |
| Id | vercel.checks.project_checks |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
owner_id | string | (wire: ownerId) |
project_id | string | (wire: projectId) |
source_integration_configuration_id | string | (wire: sourceIntegrationConfigurationId) |
blocks | string | (build-start, deployment-alias, deployment-promotion, deployment-start, none) |
created_at | number | (wire: createdAt) |
deleted_at | number | (wire: deletedAt) |
is_rerequestable | boolean | (false, true) (wire: isRerequestable) |
requires | string | (build-ready, deployment-url, none) |
source | object | |
source_kind | string | (git-provider, integration, vercel, webhook, integration, webhook, git-provider) (wire: sourceKind) |
targets | array | |
timeout | number | |
updated_at | number | (wire: updatedAt) |
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
owner_id | string | (wire: ownerId) |
project_id | string | (wire: projectId) |
source_integration_configuration_id | string | (wire: sourceIntegrationConfigurationId) |
blocks | string | (build-start, deployment-alias, deployment-promotion, deployment-start, none) |
created_at | number | (wire: createdAt) |
deleted_at | number | (wire: deletedAt) |
is_rerequestable | boolean | (false, true) (wire: isRerequestable) |
requires | string | (build-ready, deployment-url, none) |
source | | |
source_kind | string | (git-provider, integration, vercel, webhook, integration, webhook, git-provider) (wire: sourceKind) |
targets | array | |
timeout | number | |
updated_at | number | (wire: updatedAt) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id_or_name, check_id | team_id, slug | Return a detailed response for a single check. |
list | select | project_id_or_name | blocks, team_id, slug | List all checks for a project, optionally filtered by target. |
create | insert | project_id_or_name, name, requires | team_id, slug | Creates a new check for a project. |
update | update | project_id_or_name, check_id | team_id, slug | Update an existing check. |
delete | delete | project_id_or_name, check_id | team_id, slug | Delete 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.
| Name | Datatype | Description |
|---|---|---|
check_id | string | |
project_id_or_name | string | |
blocks | string | |
slug | string | The Team slug 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,
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 }}'
;
List all checks for a project, optionally filtered by target.
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 blocks = '{{ blocks }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: project_checks
props:
- name: project_id_or_name
value: "{{ project_id_or_name }}"
description: Required parameter for the project_checks resource.
- name: name
value: "{{ name }}"
- name: is_rerequestable
value: {{ is_rerequestable }}
- name: requires
value: "{{ requires }}"
valid_values: ['build-ready', 'deployment-url', 'none']
default: deployment-url
- name: targets
value:
- "{{ targets }}"
- name: blocks
value: "{{ blocks }}"
valid_values: ['build-start', 'deployment-start', 'deployment-alias', 'deployment-promotion', 'none']
default: deployment-alias
- name: source
value:
kind: "{{ kind }}"
externalResourceId: "{{ externalResourceId }}"
webhookId: "{{ webhookId }}"
externalCheckName: "{{ externalCheckName }}"
provider: "{{ provider }}"
- name: timeout
value: {{ timeout }}
default: 300
- 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.
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
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 }}'
;