@Generated public class QueriesLegacyAPI extends Object
**Warning**: This API is deprecated. Please see the latest version of the Databricks SQL API. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
| Constructor and Description |
|---|
QueriesLegacyAPI(ApiClient apiClient)
Regular-use constructor
|
QueriesLegacyAPI(QueriesLegacyService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
LegacyQuery |
create(QueryPostContent request)
Creates a new query definition.
|
void |
delete(DeleteQueriesLegacyRequest request)
Moves a query to the trash.
|
void |
delete(String queryId) |
LegacyQuery |
get(GetQueriesLegacyRequest request)
Retrieve a query object definition along with contextual permissions information about the
currently authenticated user.
|
LegacyQuery |
get(String queryId) |
QueriesLegacyService |
impl() |
Iterable<LegacyQuery> |
list(ListQueriesLegacyRequest request)
Gets a list of queries.
|
void |
restore(RestoreQueriesLegacyRequest request)
Restore a query that has been moved to the trash.
|
LegacyQuery |
update(QueryEditContent request)
Modify this query definition.
|
public QueriesLegacyAPI(ApiClient apiClient)
public QueriesLegacyAPI(QueriesLegacyService mock)
public LegacyQuery create(QueryPostContent 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.
**Warning**: This API is deprecated. Please use :method:queries/create instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public void delete(String queryId)
public void delete(DeleteQueriesLegacyRequest request)
**Warning**: This API is deprecated. Please use :method:queries/delete instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public LegacyQuery get(String queryId)
public LegacyQuery get(GetQueriesLegacyRequest request)
**Warning**: This API is deprecated. Please use :method:queries/get instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public Iterable<LegacyQuery> list(ListQueriesLegacyRequest request)
**Warning**: Calling this API concurrently 10 or more times could result in throttling, service degradation, or a temporary ban.
**Warning**: This API is deprecated. Please use :method:queries/list instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public void restore(RestoreQueriesLegacyRequest request)
**Warning**: This API is deprecated. Please see the latest version. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public LegacyQuery update(QueryEditContent request)
**Note**: You cannot undo this operation.
**Warning**: This API is deprecated. Please use :method:queries/update instead. [Learn more]
[Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html
public QueriesLegacyService impl()
Copyright © 2026. All rights reserved.