跳转到内容

Account & Quotas

查询钱包余额与云手机用量配额。

Operations

查询账户余额和云手机余量

Request

返回团队钱包余额与云手机使用额度。

  • 前置条件:调用成员需要费用权限。钱包按团队查询,因此这些数字是团队级的,不是成员级的。
  • 副作用:无。只读。可带退避安全重试。
  • 单位:balance 是钱包余额,单位为分,不是元。remainingDuration 是云手机剩余分钟数,remainingConcurrency 是并发槽位数;两者都会被截断到 0,不会为负。
  • 返回内容:只有这三个数字。上游存在冻结金额、已用与赠送时长的拆分、到期时间,但这里刻意不暴露。
  • 说明:钱包或额度查询任一失败,整个调用即失败;它从不返回部分数据。
curl -i -X GET \
  http://127.0.0.1:40000/api/balance

Responses

Request processed; inspect code for the business result

Bodyapplication/json
codeintegerrequired

Business result code; 0 indicates success

Example:0
msgstring or nullrequired

Error message; null when successful

Example:null
requestIdstringrequired

Request ID for troubleshooting

Example:"1d4f3ea968664593860b94b35d4ebf5e"
dataobjectrequired
Response
{ "code": 0, "msg": null, "data": { "balance": 12500, "remainingDuration": "120", "remainingConcurrency": 3 }, "requestId": "1d4f3ea968664593860b94b35d4ebf5e" }