Interacting with your data model through a programmatic interface unlocks exciting options for data developers and engineers. From sharing documentation with data catalogs to automating a CICD pipeline, APIs unlock a world of possibilities for engaging with SqlDBM models.

Our API provides you with the tools to securely extract metadata from SqlDBM and update (coming soon) existing projects with new objects.

📣

Try the API today!

The API is an extention to SqlDBM, available on request. Please reach out to us if you're interested so we can enable it for your account.

Get in touch

Request types

GET API is currently available for project and dbt properties.

POST API is coming soon.

📘

Note

GET - The ability to receive information about project objects and changes in JSON and DDL format.

POST - The ability to update DDL or metadata programatically in SqlDBM projects

Rate limiting

Your app's requests to the REST API are evaluated per method. Currently, the limit for API calls per minute is 100,000 credits. Each REST API method is assigned one of the rate limit weight levels.

If the number of requests exceeds the limit, a standard 429 Too many requests error is returned:

{
  "status": 429,
  "type": "Too many requests",
  "message": "Request rejected due to high inbound volume."
}

Account plans and roles

APIs are only available on the Standard Enterprise plan. You can only access the API with a Modeler or Admin role. The goal of providing these additional capabilities for Enterprise users is to enable a consistent and secure user experience while creating your custom solutions.

Commands

List of commands for getting project metadata, DDL, and alter scripts

CommandDescriptionRate Limit
Get Project ListReturn a list of projects in the SqlDBM account50 requests/5 seconds
Get Revision ListReturn a list of revisions for a given project50 requests/10 seconds
Get revision details (revision)Return JSON for the latest revision ID50 requests/10 seconds
Get revision details (latest)Return JSON for the specific revision ID50 requests/10 seconds
Get DDL (revision)Return DDL for the latest revision ID50 requests/10 seconds
Get DDL (latest)Return DDL for the specific revision ID50 requests/10 seconds
Get EnvironmentsReturn a list of database environments100 requests/1 second
Get alter script (latest)Return an alter script DDL between 2 latest revisions20 requests/10 seconds
Get alterscript (revisions)Return an alter script DDL between specific revisions or environments20 requests/10 seconds
Get object DDL by name (latest)Return DDL for the specific object of the latest revision by name50 requests/10 seconds
Get object DDL by name (revision)Return DDL for the specific object of the specific revision by name50 requests/10 seconds

List of commands for getting dbt Source and Model YAML

CommandDescriptionRate Limit
Get dbt object YAML (latest)Get YAML for a named object for the latest revision. Constraints and data types can be included for Models20 requests/5 seconds
Get dbt object YAML (revision)Get YAML for a named object for a specific revision. Constraints and data types can be included for Models20 requests/5 seconds
Get dbt project YAML (latest)Get YAML for the entire project for the latest revision. Constraints and data types can be included for Models20 requests/5 seconds
Get dbt project YAML (revision)Get YAML for the entire project for a specific revision. Constraints and data types can be included for Models20 requests/5 seconds

Errors

Here is an overview of error codes that you may encounter:

StatusTypeMessage
400Invalid SyntaxThe API call was not formed correctly.
401UnauthorizedThe API call was not made by an authorized agent.
403ForbiddenThe requested resource or operation is forbidden to the calling user.
404Not FoundThe requested object or resource could not be found.
429Too many requestsThe request was rejected due to high inbound volume.
500Server ErrorAn unexpected error has occurred and will require support.

Example:

{
  "status": 400,
  "type": "Invalid Syntax",
  "message": "The API call was not formed correctly."
}