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.
Review the request types below and try them directly from this page or find a link to our Swagger index here: https://api.sqldbm.com/swagger/index.html
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
Command | Description | Rate Limit |
---|---|---|
Get Project List | Return a list of projects in the SqlDBM account | 50 requests/5 seconds |
Get Revision List | Return a list of revisions for a given project | 50 requests/10 seconds |
Get revision details (revision) | Return JSON for the latest revision ID | 50 requests/10 seconds |
Get revision details (latest) | Return JSON for the specific revision ID | 50 requests/10 seconds |
Get DDL (revision) | Return DDL for the latest revision ID | 50 requests/10 seconds |
Get DDL (latest) | Return DDL for the specific revision ID | 50 requests/10 seconds |
Get Environments | Return a list of database environments | 100 requests/1 second |
Get alter script (latest) | Return an alter script DDL between 2 latest revisions | 20 requests/10 seconds |
Get alterscript (revisions) | Return an alter script DDL between specific revisions or environments | 20 requests/10 seconds |
Get object DDL by name (latest) | Return DDL for the specific object of the latest revision by name | 50 requests/10 seconds |
Get object DDL by name (revision) | Return DDL for the specific object of the specific revision by name | 50 requests/10 seconds |
List of commands for getting dbt Source and Model YAML
Command | Description | Rate Limit |
---|---|---|
Get dbt object YAML (latest) | Get YAML for a named object for the latest revision. Constraints and data types can be included for Models | 20 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 Models | 20 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 Models | 20 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 Models | 20 requests/5 seconds |
List of commands for managing of Transformational Projects
Command | Description | Rate Limit |
---|---|---|
Returns Tx Flow list | Returns Tx Flow list. | 50 requests/5 seconds |
Returns Tx Flow for Tx project by ID | Returns Tx Flow for Tx project by ID. | 50 requests/5 seconds |
Returns Tx Runs list | Returns Tx Runs list. | 50 requests/5 seconds |
Returns Tx Run by ID | Returns Tx Run by ID. | 50 requests/5 seconds |
Returns Tx Run status by ID | Returns Tx Run status by ID. | 50 requests/5 seconds |
Triggers new run by flow ID | Triggers new run by flow ID. | 50 requests/5 seconds |
Cancel existing run by run ID | Cancel existing run by run ID. | 50 requests/5 seconds |
Returns Tx Environment details for particular Tx project | Returns Tx Environment details for particular Tx project. | 50 requests/5 seconds |
Returns Tx objects list | Returns Tx objects list. | 50 requests/5 seconds |
Returns Tx object details by name for particular Tx project | Returns Tx object details by name for particular Tx project. | 50 requests/5 seconds |
Errors
Here is an overview of error codes that you may encounter:
Status | Type | Message |
---|---|---|
400 | Invalid Syntax | The API call was not formed correctly. |
401 | Unauthorized | The API call was not made by an authorized agent. |
403 | Forbidden | The requested resource or operation is forbidden to the calling user. |
404 | Not Found | The requested object or resource could not be found. |
429 | Too many requests | The request was rejected due to high inbound volume. |
500 | Server Error | An unexpected error has occurred and will require support. |
Example:
{
"status": 400,
"type": "Invalid Syntax",
"message": "The API call was not formed correctly."
}