connector_project_connections
Creates, updates, deletes, gets or lists a connector_project_connections resource.
Overview
| Name | connector_project_connections |
| Type | Resource |
| Id | vercel.connect.connector_project_connections |
Fields
The following fields are returned by SELECT queries:
- get
- list
The connector project connection.
| Name | Datatype | Description |
|---|---|---|
connector_id | string | Stable scl_ connector ID, even when the request used a UID. (wire: connectorId) |
created_at | number | Time when the project connection was created, in epoch milliseconds. (wire: createdAt) |
enabled_environments | array | Environments where the connector is enabled for the project. (wire: enabledEnvironments) |
project | object | Vercel project connected to the connector. |
updated_at | number | Time when the project connection was last updated, in epoch milliseconds. (wire: updatedAt) |
A page of project connections for the connector.
| Name | Datatype | Description |
|---|---|---|
connector_id | string | Stable scl_ connector ID, even when the request used a UID. (wire: connectorId) |
created_at | number | Time when the project connection was created, in epoch milliseconds. (wire: createdAt) |
enabled_environments | array | Environments where the connector is enabled for the project. (wire: enabledEnvironments) |
project | object | Vercel project connected to the connector. |
updated_at | number | Time when the project connection was last updated, in epoch milliseconds. (wire: updatedAt) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | connector, project_id | team_id, slug | Get the configuration that connects a connector to a project. |
list | select | connector | limit, cursor, team_id, slug | List the projects connected to a connector and the environments where each connection is available. |
upsert | insert | connector, project_id, environments | team_id, slug | Connect a connector to a project, or replace the environments on an existing project connection. |
delete | delete | connector, project_id | team_id, slug | Disconnect 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.
| Name | Datatype | Description |
|---|---|---|
connector | string | Stable connector ID or URL-encoded team-scoped UID. Examples: scl_abc123 or slack%2Fmy-bot. |
project_id | string | Vercel project ID. |
cursor | string | Cursor from pagination.next on the previous response. |
limit | integer | Maximum number of project connections to return. Defaults to 50. |
slug | string | The 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_id | string | The 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
- list
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 }}'
;
List the projects connected to a connector and the environments where each connection is available.
SELECT
connector_id,
created_at,
enabled_environments,
project,
updated_at
FROM vercel.connect.connector_project_connections
WHERE connector = '{{ connector }}' -- required
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- upsert
- Manifest
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
;
# Description fields are for documentation purposes
- name: connector_project_connections
props:
- name: connector
value: "{{ connector }}"
description: Required parameter for the connector_project_connections resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the connector_project_connections resource.
- name: environments
value: "{{ environments }}"
description: |
One or more built-in environment names or stable custom environment IDs that belong to the project. Duplicate values are accepted and removed.
- name: team_id
value: "{{ team_id }}"
description: The 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.
description: The 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.
- name: slug
value: "{{ slug }}"
description: The 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.
description: The 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.
DELETE examples
- delete
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 }}'
;