# List

Launch stage: GA

`GET /api/2.1/unity-catalog/metastores`

Gets an array of the available metastores (as __MetastoreInfo__ objects). The caller must be an admin to retrieve this info.
 There is no guarantee of a specific ordering of the elements in the array.

 NOTE: we recommend using max_results=0 to use the paginated version of this API. Unpaginated calls will be deprecated soon.

 PAGINATION BEHAVIOR: When using pagination (max_results >= 0), a page may contain zero results while still providing a next_page_token.
 Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.

API scopes: unity-catalog

## Query parameters

- `max_results` (int32, optional)
  Maximum number of metastores to return.
   - when set to a value greater than 0, the page length is the minimum of this value and a server configured value;
   - when set to 0, the page length is set to a server configured value (recommended);
   - when set to a value less than 0, an invalid parameter error is returned;
   - If not set, all the metastores are returned (not recommended).
   - Note: The number of returned metastores might be less than the specified max_results size, even zero.
     The only definitive indication that no further metastores can be fetched is when the next_page_token is unset from the response.
- `page_token` (string, optional)
  Opaque pagination token to go to next page based on previous query.

## Returns

Returns a list of MetastoreInfo objects.

## Response

```json
{
  "metastores": [
    {
      "name": "string",
      "storage_root": "string",
      "default_data_access_config_id": "string",
      "storage_root_credential_id": "string",
      "delta_sharing_scope": "string",
      "delta_sharing_recipient_token_lifetime_in_seconds": 0,
      "delta_sharing_organization_name": "string",
      "owner": "string",
      "privilege_model_version": "string",
      "region": "string",
      "metastore_id": "string",
      "created_at": 0,
      "created_by": "string",
      "updated_at": 0,
      "updated_by": "string",
      "storage_root_credential_name": "string",
      "cloud": "string",
      "global_metastore_id": "string",
      "external_access_enabled": true
    }
  ],
  "next_page_token": "string"
}
```

