九章智算云

平台端分页查询企业存储概览

平台(管理)端按条件分页查询各企业的 NAS 存储开通概览,以企业为粒度返回每家企业的已使用容量、占用容量与已开通实例数,用于运营侧统览各企业的存储占用情况。与企业端分页查询不同,本接口不下钻到单个实例明细。

GEThttps://api.alayanew.com/v1/nasStorage/instance/platform/page

鉴权(Authorizations)

AuthorizationString必填

用户可通过已获取的 Open API Key 做验证。例如:Bearer [YOUR_API_KEY]

Query Parameters

pageNoInteger

页码,从 1 开始。例如:1

pageSizeInteger

每页行数。例如:20

tenantIdString

按企业(租户)ID 精确过滤。例如:ca78d6b9-e196-5a0f-b1be-ab036b3cb91a

tenantNameString

按企业名称模糊查询。例如:tenant-001

storageTypeString

按存储类型过滤。例如:nas-performance(性能型)、nas-capacity(大容量型)。

aidcIdInteger

按智算中心(AIDC)ID 过滤。例如:1

Response

statusInteger

业务状态码,200 表示成功。

messageString

接口响应信息。例如:"OK"

dataObject

分页数据对象,包含各企业存储概览列表与分页信息。

显示 properties
recordsArray

企业存储概览列表。

显示 properties
tenantIdString

企业(租户)ID。例如:"4d7119bd-8e71-49a9-a319-f84d165f79d9"

tenantNameString

企业名称。例如:"算法部"

usedCapacityNumber

该企业已使用容量(GB)。例如:120.5

occupiedCapacityNumber

该企业占用(已开通)容量(GB)。即所有实例配额之和,通常不小于 usedCapacity。例如:500

activatedInstanceCountInteger

该企业已开通实例数量。例如:3

pageNoInteger

当前页码。例如:1

pageSizeInteger

每页行数。例如:20

totalRowsInteger

总行数。例如:120

curl -X 'GET' \
  'https://api.alayanew.com/v1/nasStorage/instance/platform/page?pageNo=1&pageSize=20&tenantName=tenant-001&storageType=nas-performance&aidcId=1' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer [YOUR_API_KEY]'
import requests

url = "https://api.alayanew.com/v1/nasStorage/instance/platform/page"
params = {
    "pageNo": 1,
    "pageSize": 20,
    "tenantName": "tenant-001",
    "storageType": "nas-performance",
    "aidcId": 1
}
headers = {
    "accept": "application/json",
    "Authorization": "Bearer [YOUR_API_KEY]"
}

response = requests.get(url, params=params, headers=headers)
print(response.json())
const params = new URLSearchParams({
  pageNo: '1',
  pageSize: '20',
  tenantName: 'tenant-001',
  storageType: 'nas-performance',
  aidcId: '1'
});

fetch(`https://api.alayanew.com/v1/nasStorage/instance/platform/page?${params}`, {
  method: 'GET',
  headers: {
    'accept': 'application/json',
    'Authorization': 'Bearer [YOUR_API_KEY]'
  }
})
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);
{
  "status": 200,
  "message": "OK",
  "data": {
    "records": [
      {
        "tenantId": "4d7119bd-8e71-49a9-a319-f84d165f79d9",
        "tenantName": "算法部",
        "usedCapacity": 120.5,
        "occupiedCapacity": 500,
        "activatedInstanceCount": 3
      }
    ],
    "pageNo": 1,
    "pageSize": 20,
    "totalRows": 120
  }
}
{
  "status": 403,
  "message": "Forbidden",
  "data": {}
}
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}

最后更新于