Alaya NeW Cloud

List AI Data Centers

Query the AI Data Centers (AIDCs) available to your enterprise account

GEThttps://api.alayanew.com/api/aidc/v1/list

Authorizations

ParameterTypeInRequiredDescription
AuthorizationStringHeaderAuthenticate using your Open API Key. Format: plain Credential=[YOUR_AK],Signature=[YOUR_SK]

Request examples

curl -X GET 'https://api.alayanew.com/api/aidc/v1/list' \
  -H 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'
import requests

url = "https://api.alayanew.com/api/aidc/v1/list"
headers = {
    "Authorization": "plain Credential=YOUR_AK,Signature=YOUR_SK"
}

response = requests.get(url, headers=headers)
print(response.json())
fetch('https://api.alayanew.com/api/aidc/v1/list', {
  method: 'GET',
  headers: {
    'Authorization': 'plain Credential=YOUR_AK,Signature=YOUR_SK'
  }
})
  .then(res => res.json())
  .then(data => console.log(data));
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://api.alayanew.com/api/aidc/v1/list", nil)
    req.Header.Set("Authorization", "plain Credential=YOUR_AK,Signature=YOUR_SK")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.alayanew.com/api/aidc/v1/list"))
    .header("Authorization", "plain Credential=YOUR_AK,Signature=YOUR_SK")
    .GET()
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());

Response

Status: 200 · application/json

FieldTypeDescription
codeIntResult code: 0 = success, -1 = failure
dataArrayList of AI Data Centers
data[].idStringAIDC ID, e.g. 2
data[].codeStringAIDC code, e.g. dev01-2
data[].nameStringAIDC name (Chinese)
data[].nameEnStringAIDC name (English)
data[].countryStringCountry
data[].addressStringAddress
data[].endpoIntStringAIDC endpoint URL
msgStringError message — present only when code is -1

Response examples

{
  "code": 0,
  "data": [
    {
      "id": 1,
      "code": "cn-beijing-a",
      "name": "北京一区智算中心",
      "nameEn": "Bei Jing AI Data Center",
      "country": "中国",
      "address": "北京市",
      "osmEndpoInt": "https://osm.hd-01.alayanew.com:20443",
      "onlineDate": "2024-03-02 10:00:00",
      "createdTime": null
    },
    {
      "id": 2,
      "code": "dev01-2",
      "name": "北京一区",
      "nameEn": "Bei Jing AI Data Center",
      "country": "中国",
      "address": "北京市",
      "endpoInt": "https://osm.hd-01.alayanew.com:20443"
    }
  ]
}
{
  "code": -1,
  "msg": "Bad Request"
}
{
  "code": -1,
  "msg": "Unauthorized"
}
{
  "code": -1,
  "msg": "Forbidden"
}
{
  "code": -1,
  "msg": "Not Found"
}
{
  "code": -1,
  "msg": "Internal Server Error"
}

Last updated on

Was this page helpful?

On this page