---
title: "Lists all data centers"
method: GET
path: "/datacenter/all"
tags: ["Data Centers"]
---

# Lists all data centers

`GET /datacenter/all`

## 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/all/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch data about all the data centers.

## Response `200`

Successfully fetched data centers.

- DatacenterResponseFields[]
  - `_key` string: key for the data center
  - `host` string: IP address of the data center.
  - `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` DatacenterResponseLocationInfo: Complete information about the location of data center.
    - `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
    - `url` string: URL for the data center.

## Other responses

- `401`: Failed because you do not have administrator permissions.

---

[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)
