Windmill Git Sync API

The Git Sync API from Windmill — 7 operation(s) for git sync.

OpenAPI Specification

windmill-git-sync-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.694.0
  title: Windmill admin Git Sync API
  contact:
    name: Windmill Team
    email: contact@windmill.dev
    url: https://windmill.dev
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-logo:
    url: https://windmill.dev/img/windmill.svg
servers:
- url: /api
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: Git Sync
paths:
  /github_app/connected_repositories:
    get:
      summary: Get Connected Repositories
      operationId: getGlobalConnectedRepositories
      tags:
      - Git Sync
      parameters:
      - name: page
        in: query
        description: Page number for pagination (default 1)
        required: false
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: connected repositories
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubInstallations'
  /w/{workspace}/github_app/install_from_workspace:
    post:
      tags:
      - Git Sync
      summary: Install a GitHub Installation from Another Workspace
      operationId: installFromWorkspace
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_workspace_id:
                  type: string
                  description: The ID of the workspace containing the installation to copy
                installation_id:
                  type: number
                  description: The ID of the GitHub installation to copy
              required:
              - source_workspace_id
              - installation_id
      responses:
        '200':
          description: Installation successfully copied
  /w/{workspace}/github_app/installation/{installation_id}:
    delete:
      summary: Delete a GitHub Installation from a Workspace
      operationId: deleteFromWorkspace
      description: Removes a GitHub installation from the specified workspace. Requires admin privileges.
      tags:
      - Git Sync
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      - name: installation_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        description: The ID of the GitHub installation to delete
      responses:
        '200':
          description: Installation successfully deleted
  /w/{workspace}/github_app/export/{installationId}:
    get:
      summary: Export GitHub Installation JWT Token
      description: Exports the JWT token for a specific GitHub installation in the workspace
      operationId: exportInstallation
      tags:
      - Git Sync
      parameters:
      - name: workspace
        in: path
        required: true
        schema:
          type: string
      - name: installationId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Successfully exported the JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt_token:
                    type: string
  /w/{workspace}/github_app/import:
    post:
      summary: Import GitHub Installation from JWT Token
      description: Imports a GitHub installation from a JWT token exported from another instance
      operationId: importInstallation
      tags:
      - Git Sync
      parameters:
      - name: workspace
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jwt_token
              properties:
                jwt_token:
                  type: string
      responses:
        '200':
          description: Successfully imported the installation
  /w/{workspace}/github_app/ghes_installation_callback:
    post:
      summary: GHES Installation Callback
      description: Register a self-managed GitHub App installation from GitHub Enterprise Server
      operationId: ghesInstallationCallback
      tags:
      - Git Sync
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - installation_id
              properties:
                installation_id:
                  type: integer
                  format: int64
                  description: The GitHub App installation ID from GHES
      responses:
        '200':
          description: GHES installation registered successfully
  /github_app/ghes_config:
    get:
      summary: Get GHES App Config
      description: Returns the GitHub Enterprise Server app configuration (without private key) for constructing the installation URL
      operationId: getGhesConfig
      tags:
      - Git Sync
      responses:
        '200':
          description: GHES app configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  base_url:
                    type: string
                  app_slug:
                    type: string
                  client_id:
                    type: string
                  app_owner:
                    type: string
                    nullable: true
                required:
                - base_url
                - app_slug
                - client_id
components:
  parameters:
    WorkspaceId:
      name: workspace
      in: path
      required: true
      schema:
        type: string
  schemas:
    GithubInstallations:
      type: array
      items:
        type: object
        properties:
          workspace_id:
            type: string
          installation_id:
            type: number
          account_id:
            type: string
          repositories:
            type: array
            items:
              type: object
              properties:
                name:
                  type: string
                url:
                  type: string
              required:
              - name
              - url
          total_count:
            type: number
            description: Total number of repositories available for this installation
          per_page:
            type: number
            description: Number of repositories loaded per page
          error:
            type: string
            description: Error message if token retrieval failed
        required:
        - installation_id
        - account_id
        - repositories
        - total_count
        - per_page
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: token
externalDocs:
  description: documentation portal
  url: https://windmill.dev