---
title: "List all available data centers."
method: GET
path: "/datacenter/_tenant/{tenant-name}"
tags: ["Data Centers"]
---

# List all available data centers.

`GET /datacenter/_tenant/{tenant-name}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/datacenter/_tenant/:tenant-name/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch data for all data centers for tenant identified by *tenant-name*.

## Path parameters

- `tenant-name` string, string, required

## Response `200`

Successfully fetched data center.

- object[]
  - `tenant` string: Tenant name
  - `dcInfo` object[]
    - `_id` string: ID of the data center.
    - `_key` string: key associated with data center.
    - `_rev` string: _rev value of the data center.
    - `host` string: Data center cluster IP.
    - `local` boolean: If *true*, the data center is a regional data center for the request else *false*.
    - `name` string: Name of the data center.
    - `spot_region` boolean: If true, the data center is on-spot capable.
    - `status` integer: If *0*, the data center is online else data center is having connectivity problem.
    - `tags` DatacenterResponseTags: Tag values associated with data center.
      - `api` string: API URL for the data center.
      - `url` string: URL for the data center
    - `locationInfo` object: Complete information about the location of data center.
      - `_id` string: ID of the location info.
      - `_key` string: key for the location info.
      - `_rev` string: The document revision.
      - `city` string: The city of the data center.
      - `countrycode` string: The country code of the data center.
      - `countryname` string: The country name of the data center
      - `latitude` string: The latitude of the data center.
      - `longitude` string: The latitude of the data center
      - `host` string: Data center cluster IP.
      - `status` integer: If *0*, the data center is online else data center is having connectivity problem.
      - `url` string: URL for the data center.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed to validate because you do not have access to the server.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
