Skip to main content

connector_project_connections

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

Overview

Nameconnector_project_connections
TypeResource
Idvercel.connect.connector_project_connections

Fields

The following fields are returned by SELECT queries:

The connector project connection.

NameDatatypeDescription
connector_idstringStable scl_ connector ID, even when the request used a UID. (wire: connectorId)
created_atnumberTime when the project connection was created, in epoch milliseconds. (wire: createdAt)
enabled_environmentsarrayEnvironments where the connector is enabled for the project. (wire: enabledEnvironments)
projectobjectVercel project connected to the connector.
updated_atnumberTime when the project connection was last updated, in epoch milliseconds. (wire: updatedAt)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectconnector, project_idteam_id, slugGet the configuration that connects a connector to a project.
listselectconnectorlimit, cursor, team_id, slugList the projects connected to a connector and the environments where each connection is available.
upsertinsertconnector, project_id, environmentsteam_id, slugConnect a connector to a project, or replace the environments on an existing project connection.
deletedeleteconnector, project_idteam_id, slugDisconnect a connector from a project.

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
connectorstringStable connector ID or URL-encoded team-scoped UID. Examples: scl_abc123 or slack%2Fmy-bot.
project_idstringVercel project ID.
cursorstringCursor from pagination.next on the previous response.
limitintegerMaximum number of project connections to return. Defaults to 50.
slugstringThe team slug that scopes the request. Do not send it with teamId. If both are omitted, Vercel uses the team associated with the token or the authenticated user's default team. The request returns 401 if no team can be selected.
team_idstringThe team ID that scopes the request. Do not send it with slug. If both are omitted, Vercel uses the team associated with the token or the authenticated user's default team. The request returns 401 if no team can be selected. (wire: teamId)

SELECT examples

Get the configuration that connects a connector to a project.

SELECT
connector_id,
created_at,
enabled_environments,
project,
updated_at
FROM vercel.connect.connector_project_connections
WHERE connector = '{{ connector }}' -- required
AND project_id = '{{ project_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;

INSERT examples

Connect a connector to a project, or replace the environments on an existing project connection.

INSERT INTO vercel.connect.connector_project_connections (
environments,
connector,
project_id,
team_id,
slug
)
SELECT
'{{ environments }}' /* required */,
'{{ connector }}',
'{{ project_id }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
connector_id,
created_at,
enabled_environments,
project,
updated_at
;

DELETE examples

Disconnect a connector from a project.

DELETE FROM vercel.connect.connector_project_connections
WHERE connector = '{{ connector }}' --required
AND project_id = '{{ project_id }}' --required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;