---
title: "Get list of data centers"
method: GET
path: "/v1/data-centers"
tags: ["Data centers"]
---

# Get list of data centers

`GET /v1/data-centers`

## Request

- Base URL: `https://api.emma.ms/external`
- URL: `https://api.emma.ms/external/v1/data-centers`
- Auth: HTTP bearer

Returns a list of data centers from cloud providers. All compute instances are created in data centers. The data center ID is necessary for creating any compute instance. Use this endpoint to find the provider's data centers.

## Query parameters

- `dataCenterName` string
- `locationId` integer
- `providerName` string
- `projectId` integer

## Response `200`

Successful operation

- DataCenter[]
  - `id` string: ID of the cloud provider's data center
  - `name` string: Name of the cloud provider's data center
  - `providerId` integer: ID of the cloud provider that owns the datacenter
  - `providerName` string: Name of the cloud provider that owns the datacenter
  - `locationId` integer: ID of the data center location
  - `locationName` string: Name of the data center location (city or state)

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal server error

---

[API](https://skmtc.dev/emma/apis/public-emma-api.md) - [All operations](https://skmtc.dev/emma/apis/public-emma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/emma/apis/public-emma-api/revisions/9e55f0920078?raw)
