# List

Launch stage: GA

`GET /api/2.0/libraries/cluster-status`

Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API
 or the libraries UI.
 The order of returned libraries is as follows:
 1. Libraries set to be installed on this cluster, in the order that the libraries were added
     to the cluster, are returned first.
 2. Libraries that were previously requested to be installed on this cluster or,
     but are now marked for removal, in no particular order, are returned last.

API scopes: libraries

## Query parameters

- `cluster_id` (string, optional)
  Unique identifier of the cluster whose status should be retrieved.

## Returns

- `cluster_id` (string, optional)
  Unique identifier for the cluster.
- `library_statuses` (array of object, optional)
  Status of all libraries on the cluster.
  - `library` (object, optional)
    Unique identifier for the library.
    - `jar` (string, required)
      URI of the JAR library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs.
       For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }` or
       `{ "jar": "s3://my-bucket/library.jar" }`.
       If S3 is used, please make sure the cluster has read access on the library. You may need to
       launch the cluster with an IAM role to access the S3 URI.
      **Azure:** URI of the JAR library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and ADLS URIs.
      For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }` or
      `{ "jar": "abfss://my-bucket/library.jar" }`.
      If ADLS is used, please make sure the cluster has read access on the library. You may need to
      launch the cluster with a Microsoft Entra ID service principal to access the ADLS URI.
      **GCP:** URI of the jar library to be installed. Supported URIs include Workspace path, UC Volumes path, and GCS URIs.
      For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }` or
      `{ "jar": "gs://my-bucket/library.jar" }`.
      If GCS is used, please make sure the cluster has read access on the library. You may need to
      launch the cluster with an IAM service account to access the GCS URI.
    - `egg` (string, required)
      Deprecated. URI of the egg library to install. Installing Python egg files is deprecated and is not supported in Databricks Runtime 14.0 and above.
    - `pypi` (object, required)
      Specification of a PyPi library to be installed. For example:
       `{ "package": "simplejson" }`
      - `package` (string, optional)
        The name of the pypi package to install. An optional exact version specification is also
         supported. Examples: "simplejson" and "simplejson==3.8.0".
      - `repo` (string, optional)
        The repository where the package can be found. If not specified, the default pip index is
         used.
    - `maven` (object, required)
      Specification of a maven library to be installed. For example:
       `{ "coordinates": "org.jsoup:jsoup:1.7.2" }`
      - `coordinates` (string, optional)
        Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2".
      - `repo` (string, optional)
        Maven repo to install the Maven package from. If omitted, both Maven Central Repository
         and Spark Packages are searched.
      - `exclusions` (array of string, optional)
        List of dependences to exclude. For example: `["slf4j:slf4j", "*:hadoop-client"]`.
        
         Maven dependency exclusions:
         https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html.
    - `cran` (object, required)
      Specification of a CRAN library to be installed as part of the library
      - `package` (string, optional)
        The name of the CRAN package to install.
      - `repo` (string, optional)
        The repository where the package can be found. If not specified, the default CRAN repo is used.
    - `whl` (string, required)
      URI of the wheel library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs.
       For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }` or
       `{ "whl": "s3://my-bucket/library.whl" }`.
       If S3 is used, please make sure the cluster has read access on the library. You may need to
       launch the cluster with an IAM role to access the S3 URI.
      **Azure:** URI of the wheel library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and ADLS URIs.
      For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }` or
      `{ "whl": "abfss://my-bucket/library.whl" }`.
      If ADLS is used, please make sure the cluster has read access on the library. You may need to
      launch the cluster with a Microsoft Entra ID service principal to access the ADLS URI.
      **GCP:** URI of the wheel library to be installed. Supported URIs include Workspace path, UC Volumes path, and GCS URIs.
      For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }` or
      `{ "whl": "gs://my-bucket/library.egg" }`.
      If GCS is used, please make sure the cluster has read access on the library. You may need to
      launch the cluster with an IAM service account to access the GCS URI.
    - `requirements` (string, required)
      URI of the requirements.txt file to install. Only Workspace paths and Unity Catalog Volumes paths are supported.
       For example: `{ "requirements": "/Workspace/path/to/requirements.txt" }` or `{ "requirements" : "/Volumes/path/to/requirements.txt" }`
  - `status` (string, optional)
    Status of installing the library on the cluster.
    Possible values: `PENDING`, `RESOLVING`, `INSTALLING`, `INSTALLED`, `FAILED`, `UNINSTALL_ON_RESTART`, `SKIPPED`, `RESTORED`
  - `messages` (array of string, optional)
    All the info and warning messages that have occurred so far for this library.
  - `is_library_for_all_clusters` (boolean, optional)
    Whether the library was set to be installed on all clusters via the libraries UI.

## Response

```json
{
  "cluster_id": "1234-56789-abcde",
  "library_statuses": [
    {
      "is_library_for_all_clusters": false,
      "library": {
        "pypi": {
          "package": "numpy",
          "repo": "http://my-pypi-repo.com"
        }
      },
      "status": "INSTALLED"
    },
    {
      "is_library_for_all_clusters": false,
      "library": {
        "jar": "/Workspace/path/to/library.jar"
      },
      "status": "INSTALLED"
    },
    {
      "is_library_for_all_clusters": false,
      "library": {
        "whl": "/Workspace/path/to/library.whl"
      },
      "status": "PENDING"
    },
    {
      "is_library_for_all_clusters": false,
      "library": {
        "maven": {
          "coordinates": "com.databricks:spark-csv_2.11:1.5.0",
          "exclusions": [
            "org.slf4j:slf4j-log4j12"
          ],
          "repo": "http://my-maven-repo.com"
        }
      },
      "status": "UNINSTALL_ON_RESTART"
    },
    {
      "is_library_for_all_clusters": false,
      "library": {
        "cran": {
          "package": "ggplot2",
          "repo": "http://cran.us.r-project.org"
        }
      },
      "message": "Error message",
      "status": "FAILED"
    },
    {
      "library": {
        "requirements": "/Workspace/path/to/requirements.txt"
      },
      "status": "INSTALLING"
    }
  ]
}
```

