openapi: 3.1.0 info: title: SqlDBM Cloud Data Modeling Branches Revisions 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: Revisions description: Project revisions on the main branch. paths: /projects/{projectId}/revisions: get: tags: - Revisions summary: List revisions description: List all revisions on the project's main branch. operationId: listRevisions parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: A list of revisions. content: application/json: schema: type: array items: $ref: '#/components/schemas/Revision' /projects/{projectId}/revisions/{revisionId}: get: tags: - Revisions summary: Get a revision description: Retrieve metadata for a specific revision. operationId: getRevision parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/RevisionId' responses: '200': description: Revision details. content: application/json: schema: $ref: '#/components/schemas/Revision' post: tags: - Revisions summary: Create a revision from a specific revision description: Create a new revision based on an existing revision. operationId: createRevisionFromRevision parameters: - $ref: '#/components/parameters/ProjectId' - $ref: '#/components/parameters/RevisionId' requestBody: required: true content: application/json: schema: type: object properties: ddl: type: string description: type: string responses: '201': description: Revision created. content: application/json: schema: $ref: '#/components/schemas/Revision' /projects/{projectId}/revisions/last: get: tags: - Revisions summary: Get the latest revision description: Retrieve the latest revision on the project's main branch. operationId: getLatestRevision parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: Latest revision. content: application/json: schema: $ref: '#/components/schemas/Revision' post: tags: - Revisions summary: Create a revision from the latest revision description: Create a new revision based on the latest existing revision. operationId: createRevisionFromLatest parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: type: object properties: ddl: type: string description: type: string responses: '201': description: Revision created. content: application/json: schema: $ref: '#/components/schemas/Revision' components: schemas: Revision: type: object properties: id: type: string projectId: type: string branchId: type: string description: type: string createdAt: type: string format: date-time author: type: string parameters: RevisionId: name: revisionId in: path required: true schema: type: string description: Revision identifier within the project or branch. 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/