Datasource APIs
Delete Datasource
Delete a datasource from your organization. This action cannot be undone and will remove all associated configurations.
DELETE
Permanently delete a datasource from your organization. This will remove the datasource and all its associated configurations, including cached schemas.
This action is irreversible. Once a datasource is deleted, all its configurations and cached schemas will be permanently removed. Ensure no datamarts or other resources depend on this datasource before deletion.
Endpoint
Self-hosted Databrain Endpoint
Authentication
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:- In Settings page, navigate to the Service Tokens section.
- Click the “Generate Token” button to create a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token.
Query Parameters
The name of the datasource to delete. Must match exactly as it was created.
Response
The ID of the deleted datasource for confirmation.
Success message confirming the deletion: “Datasource deleted successfully”.
Error field, null when successful. Not included in successful responses.
Examples
Error Codes
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid datasourceName parameter |
DATASOURCE_NAME_ERROR | 400 | Datasource not found |
DATASOURCE_IN_USE | 400 | Datasource is being used by other resources |
AUTHENTICATION_ERROR | 401 | Invalid or missing service token |
INTERNAL_SERVER_ERROR | 500 | Server error occurred |
Next Steps
Create Datasource
Create a new datasource to replace the deleted one
List Datasources
View all remaining datasources in your organization
Update Datasource
Update datasource credentials instead of deleting
Create Datamart
Create datamarts using your remaining datasources

