View source: R/clusters_list.R
clusters_list | R Documentation |
Fetches all of the details for clusters in the authenticated workspace.
clusters_list(workspace, token = NULL, verbose = T)
workspace |
A string representing the web workspace of your Databricks instance. E.g., "https://eastus2.azuredatabricks.net" or "https://demo.cloud.databricks.com". |
token |
A valid authentication token generated via User Settings in Databricks or via the Databricks REST API 2.0. If none is provided, netrc will be used. |
verbose |
If true, will pretty print the success or failure of the request. Defaults to TRUE. |
The API endpoint for running a job is '2.0/clusters/list'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.
A list with two elements:
response - The full API response, including status code.
response_df - The JSON result transformed into a dataframe.
clusters <- clusters_list(workspace = "https://eastus2.azuredatabricks.net", token = "dapiafoi32984320890d9asaf1") ## Get active clusters df <- clusters$df active <- df[df$state == "RUNNING", c("cluster_id", "state")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.