Git Integration
Git integration allows your workspace to connect to GitHub via the Dooor GitHub App. Once installed, you can browse repositories and branches to configure app deployments.
Get Install URL
/workspaces/{wsId}/git/install-urlReturns a GitHub App installation URL with a signed state parameter. Redirect the user to this URL to begin the GitHub App installation flow.
url value. GitHub will call back to your configured redirect URI after the user approves the installation.Response
{
"url": "https://github.com/apps/dooor-os/installations/new?state=eyJhbGci..."
}curl -X GET "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/install-url" \
-H "Authorization: Bearer dor_sk_your_key_here"Connect GitHub
/workspaces/{wsId}/git/connectCompletes the GitHub App installation by persisting the installation details returned from the GitHub callback. Call this endpoint after GitHub redirects back to your app.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| installationId | string | required | The GitHub App installation ID returned in the callback query params |
| setupAction | string | optional | Action that triggered the callback. Usually "install" or "update". Optional. |
Response
{
"id": "ghi_01hx...",
"provider": "github",
"accountLogin": "my-org",
"accountType": "Organization",
"installationId": "123456",
"status": "active",
"createdAt": "2025-04-17T12:00:00Z"
}curl -X POST "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/connect" \
-H "Authorization: Bearer dor_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"installationId": "123456",
"setupAction": "install"
}'List Installations
/workspaces/{wsId}/git/installationsReturns a paginated list of GitHub App installations connected to this workspace.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | optional | Page number, starting at 1. Default: 1 |
| limit | integer | optional | Items per page. Default: 20, max: 100 |
Response
{
"data": [
{
"id": "ghi_01hx...",
"provider": "github",
"accountLogin": "my-org",
"accountType": "Organization",
"status": "active"
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}
}curl -X GET "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/installations?page=1&limit=20" \
-H "Authorization: Bearer dor_sk_your_key_here"List Repositories
/workspaces/{wsId}/git/reposReturns repositories accessible to a specific GitHub App installation. Use the installationId from a connected installation.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| installationId | string | required | ID of the connected GitHub App installation |
| page | integer | optional | Page number, starting at 1. Default: 1 |
| limit | integer | optional | Items per page. Default: 20, max: 100 |
Response
[
{
"id": 123456789,
"name": "my-api",
"fullName": "my-org/my-api",
"private": true,
"defaultBranch": "main",
"updatedAt": "2025-04-10T09:00:00Z"
}
]curl -X GET "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/repos?installationId=123&page=1&limit=20" \
-H "Authorization: Bearer dor_sk_your_key_here"List Branches
/workspaces/{wsId}/git/repos/{owner}/{repo}/branchesReturns the list of branches for a repository accessible via the given installation.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| installationId | string | required | ID of the connected GitHub App installation |
Response
[
{ "name": "main", "protected": true },
{ "name": "develop", "protected": false },
{ "name": "feat/new-api", "protected": false }
]curl -X GET "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/repos/my-org/my-api/branches?installationId=123" \
-H "Authorization: Bearer dor_sk_your_key_here"Remove Installation
/workspaces/{wsId}/git/installations/{installationId}Deactivates a GitHub App installation from the workspace. Existing apps linked to this installation will no longer receive automatic deploys.
Response
{
"id": "ghi_01hx...",
"status": "inactive",
"deactivatedAt": "2025-04-17T15:00:00Z"
}curl -X DELETE "https://os-develop.dooor.ai/api/v1/workspaces/{wsId}/git/installations/{installationId}" \
-H "Authorization: Bearer dor_sk_your_key_here"