# List Workspaces Public

Launch stage: GA

`GET /api/2.0/accounts/{account_id}/workspaces`

Lists <Databricks> workspaces for an account.

API scopes: provisioning

## Path parameters

- `account_id` (string, optional)

## Returns

- `workspaces` (array of object, optional)
  - `workspace_id` (int64, optional)
    A unique integer ID for the workspace
  - `workspace_name` (string, optional)
    The human-readable name of the workspace.
    Constraints: `[ 1 .. 100 ] characters`
  - `aws_region` (string, optional)
    **AWS:** The AWS region of the workspace data plane (for example, `us-west-2`).
  - `creation_time` (int64, optional)
    Time in epoch milliseconds when the workspace was created.
  - `deployment_name` (string, optional)
    **AWS:** The deployment name defines part of the subdomain for the workspace. The workspace URL for web application and REST APIs is `<deployment-name>.cloud.databricks.com`.
    Constraints: `<= 64 characters`
  - `workspace_status` (string, optional)
    The status of a workspace
    Possible values: `NOT_PROVISIONED`, `PROVISIONING`, `RUNNING`, `FAILED`, `BANNED`, `CANCELLING`
  - `account_id` (string, optional)
    <Databricks> account ID.
  - `credentials_id` (string, optional)
    ID of the workspace's credential configuration object.
  - `storage_configuration_id` (string, optional)
    ID of the workspace's storage configuration object.
  - `workspace_status_message` (string, optional)
    Message describing the current workspace status.
  - `network_id` (string, required)
    If this workspace is BYO VPC, then the network_id will be populated. If this workspace is not
     BYO VPC, then the network_id will be empty.
  - `gcp_managed_network_config` (object, required)
    **GCP:** The network config for GCP workspace with <Databricks> managed network.
    - `subnet_cidr` (string, optional)
      The IP range which will be used to allocate GKE cluster nodes from.
       Note: Pods, services and master IP range must be mutually exclusive.
    - `gke_cluster_pod_ip_range` (string, optional)
      The IP range that will be used to allocate GKE cluster Pods from.
    - `gke_cluster_service_ip_range` (string, optional)
      The IP range that will be used to allocate GKE cluster Services from.
  - `pricing_tier` (string, optional)
    Possible values: `UNKNOWN`, `COMMUNITY_EDITION`, `STANDARD`, `PREMIUM`, `ENTERPRISE`, `DEDICATED`
  - `private_access_settings_id` (string, optional)
    ID of the workspace's private access settings object. Only used for PrivateLink. You must specify this ID if you are using [AWS PrivateLink](https://aws.amazon.com/privatelink/) for either front-end (user-to-workspace connection), back-end (data plane to control plane connection), or both connection types.
    
     Before configuring PrivateLink, read the [<Databricks> article about PrivateLink](https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html).",
  - `managed_services_customer_managed_key_id` (string, optional)
    ID of the key configuration for encrypting managed services.
  - `storage_customer_managed_key_id` (string, optional)
    ID of the key configuration for encrypting workspace storage.
  - `location` (string, optional)
    The Google Cloud region of the workspace data plane in your Google account (for example, `us-east4`).
  - `cloud` (string, optional)
    The cloud name. This field can have values like `azure`, `gcp`.
  - `network` (object, optional)
    The network configuration for the workspace.
     
     DEPRECATED. Use `network_id` instead.
    **GCP:** The network configuration for the workspace.
    
    DEPRECATED. Use `network_id`,  and `gke_config`  instead.
    - `gcp_managed_network_config` (object, required)
      The mutually exclusive network deployment modes. The option decides which network mode the
       workspace will use.
       The network config for GCP workspace with <Databricks> managed network.
       This object is input-only and will not be provided when listing workspaces.
      - `subnet_cidr` (string, optional)
        The IP range which will be used to allocate GKE cluster nodes from.
         Note: Pods, services and master IP range must be mutually exclusive.
      - `gke_cluster_pod_ip_range` (string, optional)
        The IP range that will be used to allocate GKE cluster Pods from.
      - `gke_cluster_service_ip_range` (string, optional)
        The IP range that will be used to allocate GKE cluster Services from.
    - `network_id` (string, required)
      The ID of the network object, if the workspace is a BYOVPC workspace.
       This should apply to workspaces on all clouds in internal services. In accounts-rest-api, user will use
       workspace.network_id for input and output instead.
       Currently (2021-06-19) the network ID is only used by GCP.
    - `gcp_common_network_config` (object, optional)
      The shared network config for GCP workspace.
       This object has common network configurations that are network attributions of a workspace.
       This object is input-only.
      - `gke_connectivity_type` (string, optional)
        The type of network connectivity of the GKE cluster.
        Possible values: `PRIVATE_NODE_PUBLIC_MASTER`, `PUBLIC_NODE_PUBLIC_MASTER`
      - `gke_cluster_master_ip_range` (string, optional)
        The IP range that will be used to allocate GKE cluster master resources from.
         This field must not be set if gke_cluster_type=PUBLIC_NODE_PUBLIC_MASTER.
  - `azure_workspace_info` (object, optional)
    - `resource_group` (string, optional)
      Azure Resource Group name
    - `subscription_id` (string, optional)
      Azure Subscription ID
  - `gke_config` (object, optional)
    **GCP:** The configurations of the GKE cluster used by the GCP workspace.
    - `connectivity_type` (string, optional)
      The type of network connectivity of the GKE cluster.
      Possible values: `PRIVATE_NODE_PUBLIC_MASTER`, `PUBLIC_NODE_PUBLIC_MASTER`
    - `master_ip_range` (string, optional)
      The IP range that will be used to allocate GKE cluster master resources from.
       This field must not be set if gke_cluster_type=PUBLIC_NODE_PUBLIC_MASTER.
  - `cloud_resource_container` (object, optional)
    - `gcp` (object, required)
      **GCP:** The GCP cloud entities in which GCP workspaces are.
      - `project_id` (string, optional)
        **GCP:** The GCP project ID where the dataplane resources will be located in.
  - `custom_tags` (object, optional)
    The custom tags key-value pairing that is attached to this workspace. The key-value pair is a string of utf-8 characters. The value can be an empty string, 
     with maximum length of 255 characters. The key can be of maximum length of 127 characters, and cannot be empty.
  - `network_connectivity_config_id` (string, optional)
    The object ID of network connectivity config.
  - `storage_mode` (string, optional)
    The storage mode of the workspace.
    Possible values: `CUSTOMER_HOSTED`, `DEFAULT_STORAGE`
  - `compute_mode` (string, optional)
    The compute mode of the workspace.
    Possible values: `HYBRID`, `SERVERLESS`

## Response

```json
{
  "workspaces": [
    {
      "workspace_id": 0,
      "workspace_name": "string",
      "aws_region": "string",
      "creation_time": 0,
      "deployment_name": "string",
      "workspace_status": "string",
      "account_id": "string",
      "credentials_id": "string",
      "storage_configuration_id": "string",
      "workspace_status_message": "string",
      "network_id": "string",
      "gcp_managed_network_config": {},
      "pricing_tier": "string",
      "private_access_settings_id": "string",
      "managed_services_customer_managed_key_id": "string",
      "storage_customer_managed_key_id": "string",
      "location": "string",
      "cloud": "string",
      "network": {},
      "azure_workspace_info": {},
      "gke_config": {},
      "cloud_resource_container": {},
      "custom_tags": {},
      "network_connectivity_config_id": "string",
      "storage_mode": "string",
      "compute_mode": "string"
    }
  ]
}
```

