A AuthMS API Wiki API Reference iam.tianv.com →

POST /internal/billing/quota/check

服务间内部调用:检查租户资源配额是否超出限制(如用户数、存储、API调用),供其他微服务在资源操作前进行配额校验

计费服务 - 内部接口 None application/json

Request Body

Schema: dto.QuotaCheckInternalRequest

FieldTypeRequiredExampleConstraintsDescription
requested_amount integer Yes 100
resource_type string Yes api_calls
app_id string No app_001

Responses

StatusDescriptionSchema
200配额检查成功dto.QuotaCheckDetailResponse
400请求参数错误object
401未授权object
500服务器内部错误object

Referenced Schemas

dto.QuotaCheckDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.QuotaCheckResponse No
message string No
timestamp string No

dto.QuotaCheckResponse

FieldTypeRequiredExampleConstraintsDescription
allowed boolean No True
current integer No 5000
limit integer No 10000
message string No
remaining integer No 5000
resource_type string No api_calls