openapi: 3.0.0 info: title: Lightdash AiAgents Github API version: 0.3156.1 description: 'Open API documentation for all public Lightdash API endpoints. # Authentication Before you get started, you might need to create a Personal Access Token to authenticate via the API. You can create a token by following this guide: https://docs.lightdash.com/references/personal_tokens ' license: name: MIT contact: name: Lightdash Support email: support@lightdash.com url: https://docs.lightdash.com/help-and-contact/contact/contact_info/ servers: - url: / tags: - name: Github paths: /api/v1/github/install: get: operationId: installGithubAppForOrganization responses: '302': description: Not found description: Install the Lightdash GitHub App and link to an organization summary: Install GitHub App security: [] parameters: [] tags: - Github /api/v1/github/user/authorize: get: operationId: authorizeGithubUser responses: '302': description: Redirect to GitHub description: 'Link the authenticated user''s personal GitHub account so write-backs can be authored as them instead of the Lightdash GitHub App' summary: Link GitHub account security: [] parameters: - description: Optional path to return to after authorization in: query name: redirect required: false schema: type: string tags: - Github /api/v1/github/user: get: operationId: getGithubUserCredential responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/ApiGithubUserCredentialResponse' description: Get the authenticated user's linked GitHub account, if any summary: Get linked GitHub account security: [] parameters: [] tags: - Github delete: operationId: unlinkGithubUser responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/ApiSuccessEmpty' description: Unlink the authenticated user's GitHub account and revoke its token summary: Unlink GitHub account security: [] parameters: [] tags: - Github /api/v1/github/config: get: operationId: configurationGithubAppForOrganization responses: '200': description: '' content: application/json: schema: properties: results: $ref: '#/components/schemas/GitIntegrationConfiguration' status: type: string enum: - ok nullable: false required: - results - status type: object description: Get GitHub App configuration for the organization summary: Get GitHub App configuration security: [] parameters: [] tags: - Github /api/v1/github/oauth/callback: get: operationId: githubOauthCallback responses: '204': description: No content description: Callback URL for GitHub App Authorization also used for GitHub App Installation with combined Authorization summary: GitHub OAuth callback security: [] parameters: - description: authorization code from GitHub in: query name: code required: false schema: type: string - description: oauth state parameter in: query name: state required: false schema: type: string - description: installation id from GitHub in: query name: installation_id required: false schema: type: string - description: setup action from GitHub in: query name: setup_action required: false schema: type: string tags: - Github /api/v1/github/uninstall: delete: operationId: uninstallGithubAppForOrganization responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/ApiSuccessEmpty' description: Uninstall the GitHub App from the organization summary: Uninstall GitHub App security: [] parameters: [] tags: - Github /api/v1/github/repos/list: get: operationId: getGithubListRepositories responses: '200': description: '' content: application/json: schema: properties: results: items: $ref: '#/components/schemas/GitRepo' type: array status: type: string enum: - ok nullable: false required: - results - status type: object description: List GitHub repositories accessible via the installed app summary: List GitHub repositories security: [] parameters: [] tags: - Github /api/v1/github/repos: post: operationId: createGithubRepository responses: '201': description: Created content: application/json: schema: properties: results: properties: defaultBranch: type: string fullName: type: string repo: type: string owner: type: string required: - defaultBranch - fullName - repo - owner type: object status: type: string enum: - ok nullable: false required: - results - status type: object description: Create a new GitHub repository via the installed app summary: Create GitHub repository security: [] parameters: [] requestBody: required: true content: application/json: schema: properties: isPrivate: type: boolean description: type: string name: type: string required: - name type: object tags: - Github components: schemas: GitRepo: properties: defaultBranch: type: string ownerLogin: type: string fullName: type: string name: type: string required: - defaultBranch - ownerLogin - fullName - name type: object GitIntegrationConfiguration: properties: installationId: type: string enabled: type: boolean required: - enabled type: object ApiGithubUserCredentialResponse: properties: results: allOf: - $ref: '#/components/schemas/GithubUserCredential' nullable: true status: type: string enum: - ok nullable: false required: - results - status type: object ApiSuccessEmpty: properties: results: {} status: type: string enum: - ok nullable: false required: - status type: object GithubUserCredential: properties: createdAt: type: string format: date-time githubLogin: type: string required: - createdAt - githubLogin type: object description: 'A user''s personally linked GitHub account. When present, write-backs are authored as this user instead of the Lightdash GitHub App bot.' securitySchemes: session_cookie: type: apiKey in: cookie name: connect.sid api_key: type: apiKey in: header name: Authorization description: Value should be 'ApiKey '