Integrations
SDK reference for integrations — Link GitHub repositories and manage provider connections.
Link GitHub repositories and manage provider connections.
github.getInstallUrl
Returns the GitHub App installation URL with signed state for the current project.
POST
Usage:
const result = await swirls.client.integrations.github.getInstallUrl({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
url | string |
github.verifyInstallState
Validates the state query param returned from GitHub after app installation.
POST
Usage:
const result = await swirls.client.integrations.github.verifyInstallState({
state: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
projectId | string | |
userId | string |
github.listInstallationRepos
Lists repositories visible to a GitHub App installation (for linking after install).
POST
Usage:
const result = await swirls.client.integrations.github.listInstallationRepos({
installationId: 1,
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
installationId | number | Yes |
Output:
| Field | Type | Description |
|---|---|---|
repositories | object[] |
github.listUserInstallations
GitHub App installations already linked to this workspace (reuse without reinstalling).
GET
Usage:
const result = await swirls.client.integrations.github.listUserInstallations()Output:
| Field | Type | Description |
|---|---|---|
installations | object[] |
github.getRepoLink
Returns the GitHub repo link for a project, if any.
GET
Usage:
const result = await swirls.client.integrations.github.getRepoLink({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
github.createRepoLink
Link a GitHub repository to a Swirls project for push-triggered deploys.
POST
Usage:
const result = await swirls.client.integrations.github.createRepoLink({
projectId: '...',
installationId: 1,
repositoryFullName: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
installationId | number | Yes | |
repositoryFullName | string | Yes | |
rootPath | string | No | |
defaultBranch | string | No | |
deploySettings | object | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
installationId | number | |
repositoryFullName | string | |
rootPath | string | |
defaultBranch | string | |
deploySettings | object | |
createdAt | unknown | |
orgId | string | |
userId | string |
github.updateRepoLink
Update GitHub link settings (root path, default branch, deploy rules).
POST
Usage:
const result = await swirls.client.integrations.github.updateRepoLink({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
rootPath | string | No | |
defaultBranch | string | No | |
deploySettings | object | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
installationId | number | |
repositoryFullName | string | |
rootPath | string | |
defaultBranch | string | |
deploySettings | object | |
createdAt | unknown | |
orgId | string | |
userId | string |
github.triggerManualDeploy
Deploy the latest commit on the linked repo default branch without a new push.
POST
Usage:
const result = await swirls.client.integrations.github.triggerManualDeploy({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
success | boolean |
github.deleteRepoLink
Remove the GitHub repository link from a project.
POST
Usage:
const result = await swirls.client.integrations.github.deleteRepoLink({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
success | boolean |
connections.listProviders
List third-party providers configured in Fabric for OAuth connections.
GET
Usage:
const result = await swirls.client.integrations.connections.listProviders()Output:
| Field | Type | Description |
|---|---|---|
backend | "fabric" | |
providers | object[] |
connections.listProjectSlots
List connection slots declared by the project’s active deployment, with binding status.
GET
Usage:
const result = await swirls.client.integrations.connections.listProjectSlots({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
slots | object[] |
connections.bindConnection
Confirm a project connection slot is bound after OAuth (auto-bind runs on Fabric callback).
POST
Usage:
const result = await swirls.client.integrations.connections.bindConnection({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
connectionName | string | No | |
oauthState | string | No |
Output:
| Field | Type | Description |
|---|---|---|
bound | true |
connections.startOAuth
Start Fabric OAuth for a project connection slot; returns authorize URL.
POST
Usage:
const result = await swirls.client.integrations.connections.startOAuth({
projectId: '...',
connectionName: '...',
returnUrl: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
connectionName | string | Yes | |
returnUrl | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
state | string | |
provider | string |
connections.unbindConnection
Clear the account bound to a project connection slot.
POST
Usage:
const result = await swirls.client.integrations.connections.unbindConnection({
projectId: '...',
connectionName: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
connectionName | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
unbound | true |
connections.requestIntegrationSupport
Email Swirls support with a request to enable an unavailable integration.
POST
Usage:
const result = await swirls.client.integrations.connections.requestIntegrationSupport({
projectId: '...',
connectionName: '...',
provider: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
connectionName | string | Yes | |
provider | string | Yes | |
connectionLabel | string | null | No | |
requestedScopes | string | No |
Output:
| Field | Type | Description |
|---|---|---|
submitted | true |