View source: R/get_library_statuses.R
get_library_statuses | R Documentation |
Get a list of libraries and their statuses for Databricks clusters.
get_library_statuses( cluster_id = NULL, workspace, token = NULL, verbose = T, ... )
cluster_id |
A string containing the unique id for an online Databricks cluster |
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 print the API response to the console. Defaults to FALSE. |
... |
Additional options to be passed |
By default will return library statuses for *all* clusters. If a 'cluster_id' is supplied, will return the status for that cluster alone. You can locate the cluster ID in the URL of the cluster configuration page. For example:
https://mycompany.cloud.databricks.com/#/setting/clusters/xxxx-xxxxx-xxxxxx/
Where xxxx-xxxxx-xxxxxx is the cluster ID.
The API endpoints for getting library statuses are '2.0/libraries/all-cluster-statuses' and '2.0/libraries/cluster-status'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.
A list with three elements:
response - The full API response, including status code.
response_list - The JSON result transformed into a list.
response_df - The JSON result transformed into a dataframe.
If the details of jobs are not needed, use the response_tidy dataframe.
# For all clusters library_statuses <- get_library_statuses(workspace = workspace) # For a single cluster cluster_id <- "0818-155203-cheese22" library_statuses <- get_library_statuses(cluster_id = cluster_id, workspace = workspace)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.