Integrations: Git

🔒 Создание новой интеграции с Git-сервисом (GitLab, GitHub). Для GitHub App требуется installationId и подписанный state из github/install; компания берётся из сессии.

Создание новой интеграции с Git-сервисом (GitLab, GitHub). Для GitHub App требуется installationId и подписанный state из github/install; компания берётся из сессии.

Access: authorized (10 ) · Scope: write

Allows: integration:git (все обязательны; без ресурса)

TypeScript (copy-paste)

POST /integration/git/create

<details open><summary><b>Body</b></summary>
export interface IntegrationGitCreateBody {
  ID?: string | null
  type: GitIntegration_Type
  title?: string | null
  params?: {
  host?: string | null
  port?: number | null
  requestTimeout?: number | null
  token?: string | null
} | null
  installationId?: number | null
  state?: string | null
  autoProvisionUsers?: boolean | null
  adminActions?: {
  blockUsers?: boolean | null
  systemHook?: boolean | null
} | null
}
</details> <details open><summary><b>Response</b></summary>
export type IntegrationGitCreateResponse = IServerResponse<Resp_integration_git_create>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
</details>

Полный файл типов: /docs/types · raw: /docs/api-types.ts

post/integration/git/create

Request

  • Base URL: http://localhost
  • URL: http://localhost/integration/git/create
  • Auth: one of:
    • API key in header sid and API key in header rts and API key in header sig
    • HTTP bearer

Headers

devIDstring uuid required

UUID устройства клиента

tzstring required
Example:Europe/Moscow

Таймзона клиента (IANA или offset)

appstring required
Example:kosmodrom-web

Имя клиентского приложения

appVerstring required
Example:1.0.0

Версия клиента

rKeystring

Уникальный ключ запроса для логов/саппорта

Request body

IDstring uuid nullable
type'GitLab' | 'GitHub' required

gitlab = "GitLab", github = "GitHub"

titlestring nullable
installationIdinteger nullable
statestring nullable
autoProvisionUsersboolean nullable

Response

OK — IServerResponse<Resp_integration_git_create>

codeinteger required
srvTSinteger required

Server timestamp (ms)

rkeystring required

Request key

Example response

{
  "code": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.