Integrations API
Integrations API to connect GitHub, GitLab, and Bitbucket repos to a Scalix Cloud project, manage the GitHub App, and mint installation tokens.
REST API endpoints for Integrations. 8 operations.
List source-control integrations
GET /v1/integrationsReturns all GitHub/GitLab/Bitbucket integrations attached to the caller's project.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | All integrations for the caller's project |
400 | API key must be project-scoped |
401 | Missing or invalid credentials |
500 | Internal error |
operationId: listIntegrations
Create a source-control integration
POST /v1/integrationsAttaches a Git provider repo to the caller's project and returns the created integration plus the webhook URL and secret to configure on the provider.
Auth: Bearer API key
Request body
application/json (required) — schema CreateIntegrationBody.
Request body for POST /v1/integrations.
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | One of github, gitlab, bitbucket. |
repo_url | string | Yes | |
branch_filter | string | null | No | |
auto_build | boolean | null | No | |
auto_deploy | boolean | null | No | |
service_id | string | null | No | |
function_id | string | null | No | Function deploy target: every later build PUTs the fresh image onto this function (drains its warm pool + re-warms the new revision). Mutually exclusive with service_id — one repo deploys one thing, and the tenant chooses which. |
preview_enabled | boolean | null | No | |
preview_ttl_hours | integer | null (int32) | No |
Responses
| Status | Description |
|---|---|
201 | Integration created; returns webhook URL + secret |
400 | Invalid provider or duplicate integration |
401 | Missing or invalid credentials |
500 | Internal error |
operationId: createIntegration
Delete a source-control integration
DELETE /v1/integrations/{id}Detaches a Git provider repo from the caller's project and deletes the integration record.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Integration id (UUID) |
Responses
| Status | Description |
|---|---|
204 | Integration deleted |
401 | Missing or invalid credentials |
404 | Integration not found |
500 | Internal error |
operationId: deleteIntegration
Get a source-control integration
GET /v1/integrations/{id}Returns a single integration by id, scoped to the caller's project.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Integration id (UUID) |
Responses
| Status | Description |
|---|---|
200 | The integration |
401 | Missing or invalid credentials |
404 | Integration not found |
500 | Internal error |
operationId: getIntegration
Update a source-control integration
PUT /v1/integrations/{id}Updates an integration's build/deploy settings (branch filter, auto-build, auto-deploy, preview, status) and returns the updated record.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Integration id (UUID) |
Request body
application/json (required) — schema UpdateIntegrationBody.
Request body for PUT /v1/integrations/{id}.
| Field | Type | Required | Description |
|---|---|---|---|
branch_filter | string | null | No | |
auto_build | boolean | null | No | |
auto_deploy | boolean | null | No | |
service_id | string | null | No | |
function_id | string | null | No | Tri-state like the functions crate's cron_expression: absent = keep the current link, null = clear it (the console's "None" option), and a string = set it. A plain Option cannot tell "clear" from "not sent", which made an un-picked function target impossible to remove. serde's derive alone is not enough: with a plain Option<Option<String>>, JSON null also deserializes to None (reads as "absent"), so the custom deserializer below lifts a present field — null included — into the outer Some. |
preview_enabled | boolean | null | No | |
preview_ttl_hours | integer | null (int32) | No | |
status | string | null | No |
Responses
| Status | Description |
|---|---|
200 | The updated integration |
401 | Missing or invalid credentials |
404 | Integration not found |
500 | Internal error |
operationId: updateIntegration
List GitHub App installations
GET /v1/integrations/github/installationsReturns the GitHub App installations registered to the caller's project.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | GitHub App installations for the project |
401 | Missing or invalid credentials |
500 | Internal error |
operationId: listGithubInstallations
Mint an installation token
POST /v1/integrations/github/installations/{installation_id}/tokenReturns a short-lived GitHub App installation access token for an installation owned by the caller's project.
Auth: Bearer API key
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
installation_id | path | integer (int64) | Yes | GitHub App installation id |
Responses
| Status | Description |
|---|---|
200 | A short-lived installation access token |
401 | Missing or invalid credentials |
404 | Installation not found or not owned by this project |
500 | Internal error |
operationId: createGithubInstallationToken
List accessible GitHub repos
GET /v1/integrations/github/reposReturns the repositories the project's GitHub App installations can access, aggregated across all active installations.
Auth: Bearer API key
Responses
| Status | Description |
|---|---|
200 | Repositories accessible across the project's installations |
401 | Missing or invalid credentials |
500 | Internal error |
operationId: listGithubRepos