openapi: 3.1.0 info: title: SqlDBM Cloud Data Modeling Branches API description: 'SqlDBM is a cloud-based data modeling platform. Its public REST API provides programmatic access to projects, revisions, branches, branch revisions, generated DDL and dbt YAML, diagrams, and ALTER scripts. This document models the SqlDBM API as a representative member of the Relational Data Modeling index. Only a subset of endpoints is modeled here, drawn from the public SqlDBM developer documentation at https://developers.sqldbm.com/. See the docs for the full catalog. ' version: 1.4.0 contact: name: SqlDBM Developer Documentation url: https://developers.sqldbm.com/ license: name: SqlDBM Proprietary servers: - url: https://api.sqldbm.com description: SqlDBM API server security: - bearerAuth: [] tags: - name: Branches description: Project branches. paths: /projects/{projectId}/branches: get: tags: - Branches summary: List branches description: List branches for the project. operationId: listBranches parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: A list of branches. content: application/json: schema: type: array items: $ref: '#/components/schemas/Branch' post: tags: - Branches summary: Create a branch description: Create a new branch on the project. operationId: createBranch parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string fromRevisionId: type: string responses: '201': description: Branch created. content: application/json: schema: $ref: '#/components/schemas/Branch' /projects/{projectId}/branches/{branchId}: get: tags: - Branches summary: Get a branch description: Get details for a project branch. operationId: getBranch parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/BranchId' responses: '200': description: Branch details. content: application/json: schema: $ref: '#/components/schemas/Branch' components: schemas: Branch: type: object properties: id: type: string projectId: type: string name: type: string createdAt: type: string format: date-time parameters: BranchId: name: branchId in: path required: true schema: type: string description: Branch identifier within the project. ProjectId: name: projectId in: path required: true schema: type: string description: SqlDBM project identifier. securitySchemes: bearerAuth: type: http scheme: bearer description: 'Bearer token issued from the SqlDBM workspace. See the Authorization section in the SqlDBM developer documentation for details on obtaining and using API credentials. ' externalDocs: description: SqlDBM developer documentation url: https://developers.sqldbm.com/