deployments
Creates, updates, deletes, gets or lists a deployments
resource.
Overview
Name | deployments |
Type | Resource |
Id | vercel.checks.deployments |
Fields
The following fields are returned by SELECT
queries:
- get_check
- get_all_checks
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
blocking | boolean | |
completedAt | number | |
conclusion | string | |
createdAt | number | |
deploymentId | string | |
detailsUrl | string | |
externalId | string | |
integrationId | string | |
output | object | |
path | string | |
rerequestable | boolean | |
startedAt | number | |
status | string | |
updatedAt | number |
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
completedAt | number | |
conclusion | string | |
createdAt | number | |
detailsUrl | string | |
integrationId | string | |
output | object | |
path | string | |
rerequestable | boolean | |
startedAt | number | |
status | string | |
updatedAt | number |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_check | select | deploymentId , checkId , teamId | Return a detailed response for a single check. | |
get_all_checks | select | deploymentId , teamId | List all of the checks created for a deployment. | |
create_check | insert | deploymentId , teamId , data__name , data__blocking | Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error. | |
_get_all_checks | exec | deploymentId , teamId | List all of the checks created for a deployment. | |
update_check | exec | deploymentId , checkId , teamId | Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error. | |
rerequest_check | exec | deploymentId , checkId , teamId | 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 |
---|---|---|
checkId | string | The check to rerun |
deploymentId | string | The deployment to rerun the check for. |
teamId | string | The Team identifier or slug to perform the request on behalf of. |
SELECT
examples
- get_check
- get_all_checks
Return a detailed response for a single check.
SELECT
id,
name,
blocking,
completedAt,
conclusion,
createdAt,
deploymentId,
detailsUrl,
externalId,
integrationId,
output,
path,
rerequestable,
startedAt,
status,
updatedAt
FROM vercel.checks.deployments
WHERE deploymentId = '{{ deploymentId }}' -- required
AND checkId = '{{ checkId }}' -- required
AND teamId = '{{ teamId }}' -- required
;
List all of the checks created for a deployment.
SELECT
id,
name,
completedAt,
conclusion,
createdAt,
detailsUrl,
integrationId,
output,
path,
rerequestable,
startedAt,
status,
updatedAt
FROM vercel.checks.deployments
WHERE deploymentId = '{{ deploymentId }}' -- required
AND teamId = '{{ teamId }}' -- required
;
INSERT
examples
- create_check
- Manifest
Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
INSERT INTO vercel.checks.deployments (
data__name,
data__path,
data__blocking,
data__detailsUrl,
data__externalId,
data__rerequestable,
deploymentId,
teamId
)
SELECT
'{{ name }}' /* required */,
'{{ path }}',
{{ blocking }} /* required */,
'{{ detailsUrl }}',
'{{ externalId }}',
{{ rerequestable }},
'{{ deploymentId }}',
'{{ teamId }}'
RETURNING
id,
name,
blocking,
completedAt,
conclusion,
createdAt,
deploymentId,
detailsUrl,
externalId,
integrationId,
output,
path,
rerequestable,
startedAt,
status,
updatedAt
;
# Description fields are for documentation purposes
- name: deployments
props:
- name: deploymentId
value: string
description: Required parameter for the deployments resource.
- name: teamId
value: string
description: Required parameter for the deployments resource.
- name: name
value: string
description: |
The name of the check being created
- name: path
value: string
description: |
Path of the page that is being checked
- name: blocking
value: boolean
description: |
Whether the check should block a deployment from succeeding
- name: detailsUrl
value: string
description: |
URL to display for further details
- name: externalId
value: string
description: |
An identifier that can be used as an external reference
- name: rerequestable
value: boolean
description: |
Whether a user should be able to request for the check to be rerun if it fails
Lifecycle Methods
- _get_all_checks
- update_check
- rerequest_check
List all of the checks created for a deployment.
EXEC vercel.checks.deployments._get_all_checks
@deploymentId='{{ deploymentId }}' --required,
@teamId='{{ teamId }}' --required
;
Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
EXEC vercel.checks.deployments.update_check
@deploymentId='{{ deploymentId }}' --required,
@checkId='{{ checkId }}' --required,
@teamId='{{ teamId }}' --required
@@json=
'{
"name": "{{ name }}",
"path": "{{ path }}",
"status": "{{ status }}",
"conclusion": "{{ conclusion }}",
"detailsUrl": "{{ detailsUrl }}",
"output": "{{ output }}",
"externalId": "{{ externalId }}"
}'
;
Rerequest a selected check that has failed.
EXEC vercel.checks.deployments.rerequest_check
@deploymentId='{{ deploymentId }}' --required,
@checkId='{{ checkId }}' --required,
@teamId='{{ teamId }}' --required
;