企业存储用量概览
查询当前企业在指定智算中心的 NAS 存储用量概览,按存储类型分别统计已使用容量、已占用(已开通)容量、可开通限额与已开通实例数,常用于企业控制台的存储看板。返回的 data 是一个映射,键为存储类型(如 nas-capacity、nas-performance),值为该类型的统计对象。
GET
https://api.alayanew.com/v1/nasStorage/instance/tenant/statistics鉴权(Authorizations)
bearerAuthAuthorizationString必填用户可通过已获取的 Open API Key 做验证。例如:Bearer [YOUR_API_KEY]。
Query Parameters
aidcIdInteger必填智算中心(AIDC)ID,统计该智算中心内本企业的存储用量。例如:1。
tenantIdString企业(租户)ID。不传时默认按当前 API Key 所属企业统计。例如:ca78d6b9-e196-5a0f-b1be-ab036b3cb91a。
Response
application/json · 200statusInteger业务状态码,200 表示成功。
messageString接口响应信息。例如:"OK"。
dataObject存储用量统计映射。每个键为一种存储类型(如 nas-capacity、nas-performance),对应的值为该类型的用量统计对象。
显示 properties
Additional propertiesObject以存储类型(如 nas-capacity、nas-performance)为键的统计对象。
显示 properties
usedCapacityNumber企业在该类型下的总已使用容量(GB)。例如:120.5。
occupiedCapacityNumber企业在该类型下的总占用(已开通)容量(GB)。即所有实例配额之和,通常不小于 usedCapacity。例如:500。
limitCapacityNumber企业在该类型下可开通的总限额容量(GB)。例如:2048。
minLimitCapacityNumber企业在该类型下单次开通的最低限额容量(GB)。例如:10。
activatedInstanceCountInteger该类型下已开通的实例数量。例如:3。
curl -X 'GET' \
'https://api.alayanew.com/v1/nasStorage/instance/tenant/statistics?aidcId=1&tenantId=ca78d6b9-e196-5a0f-b1be-ab036b3cb91a' \
-H 'accept: application/json' \
-H 'Authorization: Bearer [YOUR_API_KEY]'import requests
url = "https://api.alayanew.com/v1/nasStorage/instance/tenant/statistics"
params = {
"aidcId": 1,
"tenantId": "ca78d6b9-e196-5a0f-b1be-ab036b3cb91a"
}
headers = {
"accept": "application/json",
"Authorization": "Bearer [YOUR_API_KEY]"
}
response = requests.get(url, params=params, headers=headers)
print(response.json())const params = new URLSearchParams({
aidcId: '1',
tenantId: 'ca78d6b9-e196-5a0f-b1be-ab036b3cb91a'
});
fetch(`https://api.alayanew.com/v1/nasStorage/instance/tenant/statistics?${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": {
"additionalProp1": {
"usedCapacity": 0.1,
"occupiedCapacity": 0.1,
"limitCapacity": 0.1,
"minLimitCapacity": 0.1,
"activatedInstanceCount": 9007199254740991
},
"additionalProp2": {
"usedCapacity": 0.1,
"occupiedCapacity": 0.1,
"limitCapacity": 0.1,
"minLimitCapacity": 0.1,
"activatedInstanceCount": 9007199254740991
},
"additionalProp3": {
"usedCapacity": 0.1,
"occupiedCapacity": 0.1,
"limitCapacity": 0.1,
"minLimitCapacity": 0.1,
"activatedInstanceCount": 9007199254740991
}
}
}{
"status": 403,
"message": "Forbidden",
"data": {}
}{
"status": 500,
"message": "Internal Server Error",
"data": {}
}Last updated on
