SDKClient

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:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
urlstring

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:

ParameterTypeRequiredDescription
statestringYes

Output:

FieldTypeDescription
projectIdstring
userIdstring

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:

ParameterTypeRequiredDescription
installationIdnumberYes

Output:

FieldTypeDescription
repositoriesobject[]

github.listUserInstallations

GitHub App installations already linked to this workspace (reuse without reinstalling).

GET

Usage:

const result = await swirls.client.integrations.github.listUserInstallations()

Output:

FieldTypeDescription
installationsobject[]

Returns the GitHub repo link for a project, if any.

GET

Usage:

const result = await swirls.client.integrations.github.getRepoLink({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

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:

ParameterTypeRequiredDescription
projectIdstringYes
installationIdnumberYes
repositoryFullNamestringYes
rootPathstringNo
defaultBranchstringNo
deploySettingsobjectNo

Output:

FieldTypeDescription
idstring
projectIdstring
installationIdnumber
repositoryFullNamestring
rootPathstring
defaultBranchstring
deploySettingsobject
createdAtunknown
orgIdstring
userIdstring

Update GitHub link settings (root path, default branch, deploy rules).

POST

Usage:

const result = await swirls.client.integrations.github.updateRepoLink({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
rootPathstringNo
defaultBranchstringNo
deploySettingsobjectNo

Output:

FieldTypeDescription
idstring
projectIdstring
installationIdnumber
repositoryFullNamestring
rootPathstring
defaultBranchstring
deploySettingsobject
createdAtunknown
orgIdstring
userIdstring

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:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
successboolean

Remove the GitHub repository link from a project.

POST

Usage:

const result = await swirls.client.integrations.github.deleteRepoLink({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
successboolean

connections.listProviders

List third-party providers configured in Fabric for OAuth connections.

GET

Usage:

const result = await swirls.client.integrations.connections.listProviders()

Output:

FieldTypeDescription
backend"fabric"
providersobject[]

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:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
slotsobject[]

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:

ParameterTypeRequiredDescription
projectIdstringYes
connectionNamestringNo
oauthStatestringNo

Output:

FieldTypeDescription
boundtrue

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:

ParameterTypeRequiredDescription
projectIdstringYes
connectionNamestringYes
returnUrlstringYes

Output:

FieldTypeDescription
statestring
providerstring

connections.unbindConnection

Clear the account bound to a project connection slot.

POST

Usage:

const result = await swirls.client.integrations.connections.unbindConnection({
  projectId: '...',
  connectionName: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
connectionNamestringYes

Output:

FieldTypeDescription
unboundtrue

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:

ParameterTypeRequiredDescription
projectIdstringYes
connectionNamestringYes
providerstringYes
connectionLabelstring | nullNo
requestedScopesstringNo

Output:

FieldTypeDescription
submittedtrue

On this page