获取多个订单信息(GetLeaseInfos)
基本信息
Action:/qai/aicp/billing/lease_infos
Method: GET
Content-Type:application/json
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
resource_ids |
arrry<string> |
资源 ID 列表 |
no |
user_id |
string |
用户 ID |
yes |
ower |
string |
资源拥有者。 |
yes |
响应参数
此接口包含的公共响应参数,可参见前文内容,其他参数说明如下:
参数 | 类型 | 描述 |
---|---|---|
data.status |
string |
资源当前状态 |
data.lease_time |
string |
资源租约生效时间 |
data.status_expire_time |
null |
状态过期时间 |
data.renewal |
string |
续费模式,auto 表示自动续费 |
data.contract.auto_renew |
integer |
自动续约开关(0 关闭/1 开启) |
data.contract.discount |
integer |
折扣百分比 |
data.contract.charge_mode |
string |
计费模式类型 |
data.contract.start_time |
string |
合约开始时间 |
data.contract.price_info.status |
string |
价格状态 (sale/normal 等) |
data.contract.price_info.memory |
integer |
内存容量(GB) |
data.contract.price_info.aipods_usage |
string |
GPU 设备使用标识 |
data.contract.price_info.sku_id |
string |
商品 SKU 编号 |
data.contract.price_info.network |
integer |
网络带宽配置 |
data.contract.price_info.replicas |
integer |
副本数量 |
data.contract.price_info.aipods_type |
string |
计算资源类型 |
data.contract.price_info.cpu_count |
integer |
CPU 核心数 |
data.contract.price_info.cpu_model |
string |
CPU 型号 |
data.contract.price_info.os_disk |
integer |
系统磁盘容量(GB) |
data.contract.price_info.aipods_scope |
string |
资源使用范围 |
data.contract.price_info.gpu_model |
string |
GPU 型号 |
data.contract.price_info.cpu_manufacturer |
string |
CPU 制造商 |
data.contract.price_info.disk |
integer |
数据磁盘容量(GB) |
data.contract.price_info.nvlink |
string |
NVLink 连接状态 |
data.contract.price_info.gpu_memory |
integer |
单卡显存容量(GB) |
data.contract.price_info.gpu_count |
integer |
GPU 卡数量 |
data.contract.create_time |
string |
合约创建时间 |
data.contract.end_time |
null |
合约结束时间 |
data.contract.next_charge_mode |
null |
下一周期计费模式 |
data.contract.price |
float |
当前价格(货币单位) |
data.contract.duration |
string |
计费周期时长 |
data.unlease_time |
null |
解约时间 |
data.renewal_time |
string |
下次续约时间 |
data.status_time |
string |
状态更新时间 |
trace_id |
string |
请求追踪 ID |
请求示例
curl -X 'GET' \
'https://ai.coreshub.cn/qai/aicp/billing/lease_infos?user_id=%20usr-5HY8cxxx&owner=%20usr-5HY8cxxx' \
-H 'accept: application/json'
响应示例
{
"message": "success",
"meta": {
"X_REQUEST_ID": "f7ed7555",
"X_REQUEST_USER": "usr-5HY8cBJF"
},
"data": [
{
"status": "active",
"user_id": "usr-5HY8cBJF",
"lease_time": "2025-04-10T07:01:24Z",
"zone_id": "xb3",
"status_expire_time": null,
"resource_id": "qai-nb-eiguqichl5hc",
"renewal": "auto",
"contract": {
"price_info": {
"aipods_usage": "CPU_data",
"zone": "xb3a",
"replicas": 0,
"aipods_type": "only_gpu-xb3-1",
"cpu_count": "1",
"cpu_model": "AMD",
"os_disk": "30",
"aipods_scope": "container_instance",
"memory": "2",
"cpu_manufacturer": "amd",
"spec_id": "aipods"
},
"contract_id": "ct-7PJ9DaNZ",
"resource_id": "qai-nb-eiguqichl5hc",
"charge_mode": "elastic",
"start_time": "2025-04-14T01:27:56Z",
"long_resource_id": null,
"console_id": "coreshub",
"duration": "1h",
"auto_renew": 0,
"create_time": "2025-04-14T01:27:56Z",
"end_time": null,
"next_charge_mode": null,
"discount": 100,
"group_id": "0",
"product_id": null,
"price": "0",
"zone_id": "xb3"
},
"console_id": "coreshub",
"renewal_time": "2025-04-14T09:27:56Z",
"root_user_id": "usr-5HY8cBJF",
"lease_type": "default",
"products": [],
"unlease_time": null,
"all_contracts": [
{
"contract_id": "ct-7PJ9DaNZ",
"start_time": "2025-04-14T01:27:56Z",
"discount": 100,
"create_time": "2025-04-14T01:27:56Z",
"end_time": null,
"duration": 3600,
"price": 0,
"product_id": null
}
],
"status_time": "2025-04-10T07:01:49Z",
"group_id": "0"
}
],
"counts": 0,
"ret_code": 0
}