List AI Data Centers
Query the AI Data Centers (AIDCs) available to your enterprise account
GET
https://api.alayanew.com/api/aidc/v1/listAuthorizations
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
Authorization | String | Header | ✅ | Authenticate 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
| Field | Type | Description |
|---|---|---|
code | Int | Result code: 0 = success, -1 = failure |
data | Array | List of AI Data Centers |
data[].id | String | AIDC ID, e.g. 2 |
data[].code | String | AIDC code, e.g. dev01-2 |
data[].name | String | AIDC name (Chinese) |
data[].nameEn | String | AIDC name (English) |
data[].country | String | Country |
data[].address | String | Address |
data[].endpoInt | String | AIDC endpoint URL |
msg | String | Error 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?
