> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cantina.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Endpoint to list the GitHub organizations the Cantina App has been installed in.

> # Access control rules

- Any user that belongs to the company.
- Admins can list all companies. Requires `read_all_companies` permissions.



## OpenAPI

````yaml GET /api/v0/companies/{company_id}/github/installations
openapi: 3.1.0
info:
  title: Cantina Client API
  description: >-
    Endpoints available to client organizations. For an overview and
    authentication, see
    https://docs.cantina.xyz/for-organizations/getting-started/api-access.
  license:
    name: Cantina
    identifier: Cantina
  version: 0.1.0
servers: []
security: []
paths:
  /api/v0/companies/{company_id}/github/installations:
    get:
      tags:
        - companies
      summary: >-
        Endpoint to list the GitHub organizations the Cantina App has been
        installed in.
      description: >-
        # Access control rules


        - Any user that belongs to the company.

        - Admins can list all companies. Requires `read_all_companies`
        permissions.
      operationId: github_installations
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: GitHub installations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubInstallationList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '401':
          description: Access not authorised
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '404':
          description: Not found. This can also be due to requester not having permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '500':
          description: Error returning GitHub installations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
components:
  schemas:
    GithubInstallationList:
      type: object
      required:
        - installations
      properties:
        installations:
          type: array
          items:
            $ref: '#/components/schemas/GithubInstallation'
    CantinaError:
      type: object
      description: Error returned by the Cantina API.
      required:
        - type
        - msg
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        msg:
          type: string
          description: Error message for the user.
    GithubInstallation:
      type: object
      required:
        - id
        - companyId
        - isOrganization
        - createdBy
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        companyId:
          type: string
          format: uuid
        installationId:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            The GitHub installation ID. Null when the installation is pending
            org owner approval.
        accountName:
          type:
            - string
            - 'null'
          description: The organisation's login name (username). Null when pending.
        avatarUrl:
          type:
            - string
            - 'null'
          description: The link to the GitHub organisation's avatar. Null when pending.
        htmlUrl:
          type:
            - string
            - 'null'
          description: The link to the organisation's GitHub page. Null when pending.
        isOrganization:
          type: boolean
          description: Whether the account is an organization (true) or a user (false).
        createdBy:
          $ref: '#/components/schemas/UserProfile'
        disabledAt:
          type:
            - string
            - 'null'
          format: date-time
        deletedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
    ErrorType:
      type: string
      description: Type of error.
      enum:
        - email_not_verified
        - auth_invalid
        - auth_expired
        - auth_token_missing
        - auth_id_missing
        - invalid_password
        - disabled_user
        - tc_not_accepted
        - evicted
        - unauthorized
        - bad_request
        - not_found
        - forbidden
        - gone
        - payload_too_large
        - service_unavailable
        - internal_error
    UserProfile:
      type: object
      description: Profile info of a user.
      required:
        - userId
        - name
        - username
        - avatar
      properties:
        userId:
          type: string
          format: uuid
        name:
          type: string
        username:
          type: string
        avatar:
          type: string
        disabledAt:
          type:
            - string
            - 'null'
          format: date-time

````