Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

DBLab Engine API

Directory contents

  • swagger-spec – OpenAPI 3.0 specification of DBLab API
  • swagger-ui – Swagger UI to see the API specification (embedded in DBLab, available at :2345 or :2346/api)
  • postman – Postman collection and environment files used to test the API in CI/CD pipelines via newman

Design principles

Work in progress: https://gitlab.com/postgres-ai/database-lab/-/merge_requests/744

API docs

We use ReadMe.io to host the API documentation: https://dblab.readme.io/. Once a new API spec is ready, upload it as a new documentation version and publish.

Postman, newman, and CI/CD tests

The Postman collection is generated from the OpenAPI spec file using Portman.

  1. Install and initialize portman.
  2. Generate a new version of the Postman collection:
    portman --cliOptionsFile engine/api/postman/portman-cli.json
  3. Review and adjust the collection:
    • Ensure object creation occurs before its deletion and pass the new object's ID between requests (TODO: provide example).
    • Review and update tests as needed (TODO: details).
  4. Commit, push, and ensure Newman's CI/CD testing passes.