平台端分页查询企业存储概览
平台(管理)端按条件分页查询各企业的 NAS 存储开通概览,以企业为粒度返回每家企业的已使用容量、占用容量与已开通实例数,用于运营侧统览各企业的存储占用情况。与企业端分页查询不同,本接口不下钻到单个实例明细。
GET
https://api.alayanew.com/v1/nasStorage/instance/platform/page鉴权(Authorizations)
bearerAuthAuthorizationString必填用户可通过已获取的 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
application/json · 200statusInteger业务状态码,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": {}
}最后更新于
