API Integration
Send asset updates via API
Prerequisite: You need an API token to use Datascale’s API. Contact your account administrator or reach out to our team to get started.
Overview
Datascale’s API allows you to programmatically ingest and update your data assets, making it easy to keep your data lineage up-to-date as your systems evolve. This integration is perfect for:
- Automating lineage updates as part of CI/CD pipelines
- Syncing changes from version control systems
- Building custom integrations with your internal tools
Authentication
All API requests require authentication using a Bearer token in the Authorization header:
Keep your API tokens secure and never expose them in client-side code or public repositories.
Integration Examples
Request Parameters
The SQL script, schema definition, or other content to be ingested. For SQL scripts, this should include CREATE TABLE statements, views, or other DDL/DML statements.
The platform or database type the content is from. Examples include “snowflake”, “postgres”, “bigquery”, “redshift”, etc.
Additional configuration options for processing the content.
Response Format
A successful API call will return a 200 status code and a JSON response with details about the ingested assets:
Error Handling
If an error occurs, the API will return an appropriate HTTP status code and an error message:
Common error codes include:
AUTHENTICATION_ERROR
: Invalid or missing API tokenPARSER_ERROR
: Error parsing the provided contentINVALID_INPUT
: Missing or invalid request parametersSERVER_ERROR
: Internal server error
Rate Limits
The API is rate-limited to 100 requests per 5-minute. If you exceed this limit, you’ll receive a 429 Too Many Requests status code.
Webhooks
For advanced integrations, Datascale supports webhooks that can notify your systems on custom events such as lineage updates or asset changes, or trigger your own workflows based on specific conditions. Contact our team to set up webhooks for your account.