@Generated public interface QueriesLegacyService
**Note**: A new version of the Databricks SQL API is now available. Please see the latest version. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
This is the high-level interface, that contains generated methods.
Evolving: this interface is under development. Method signatures may change.
| Modifier and Type | Method and Description |
|---|---|
LegacyQuery |
create(QueryPostContent queryPostContent)
Create a new query definition.
|
void |
delete(DeleteQueriesLegacyRequest deleteQueriesLegacyRequest)
Delete a query.
|
LegacyQuery |
get(GetQueriesLegacyRequest getQueriesLegacyRequest)
Get a query definition.
|
QueryList |
list(ListQueriesLegacyRequest listQueriesLegacyRequest)
Get a list of queries.
|
void |
restore(RestoreQueriesLegacyRequest restoreQueriesLegacyRequest)
Restore a query.
|
LegacyQuery |
update(QueryEditContent queryEditContent)
Change a query definition.
|
LegacyQuery create(QueryPostContent queryPostContent)
Creates a new query definition. Queries created with this endpoint belong to the authenticated user making the request.
The `data_source_id` field specifies the ID of the SQL warehouse to run this query against. You can use the Data Sources API to see a complete list of available SQL warehouses. Or you can copy the `data_source_id` from an existing query.
**Note**: You cannot add a visualization until you create the query.
**Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/create instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
void delete(DeleteQueriesLegacyRequest deleteQueriesLegacyRequest)
Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and they cannot be used for alerts. The trash is deleted after 30 days.
**Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/delete instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
LegacyQuery get(GetQueriesLegacyRequest getQueriesLegacyRequest)
Retrieve a query object definition along with contextual permissions information about the currently authenticated user.
**Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/get instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
QueryList list(ListQueriesLegacyRequest listQueriesLegacyRequest)
Gets a list of queries. Optionally, this list can be filtered by a search term.
**Warning**: Calling this API concurrently 10 or more times could result in throttling, service degradation, or a temporary ban.
**Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/list instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
void restore(RestoreQueriesLegacyRequest restoreQueriesLegacyRequest)
Restore a query that has been moved to the trash. A restored query appears in list views and searches. You can use restored queries for alerts.
**Note**: A new version of the Databricks SQL API is now available. Please see the latest version. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
LegacyQuery update(QueryEditContent queryEditContent)
Modify this query definition.
**Note**: You cannot undo this operation.
**Note**: A new version of the Databricks SQL API is now available. Please use :method:queries/update instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
Copyright © 2025. All rights reserved.