private-test-cloud
2.2510
true
私有 Test Cloud API 指南
- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
用于在私有 Test Cloud 中为 Organization 分配许可证的 API 参考,包括端点、请求字段和响应。
作为主机管理员,您可以使用端点根据组织 ID 向组织分配许可证。
重要提示:
要将许可证分配给组织和租户,您需要使用主机凭据进行身份验证。
API 端点
PUT https://{yourDomain}/lrm/api/host/{hostAccountID}/organization/{organizationId}/license
请求标头
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
备注:
要获取{access_token} ,请确保通过ROPC 身份验证中描述的 ROPC 方法进行身份验证。
路径参数
| 路径参数 | 数据类型 | 描述 |
|---|---|---|
|
(必填) | 字符串 | 分配许可证的主持人帐户的 ID。 feb0dd79-85b6-483b-b297-0e49a1aa5b7d |
|
(必填) | 字符串 | 要向其分配许可证的组织的 ID。 |
请求正文
请求正文包含各种产品的许可证代码数组及其相应的数量。
{
"productQuantities":
[
{ "code": "string", "quantity": 0 }
]
}
{
"productQuantities":
[
{ "code": "string", "quantity": 0 }
]
}
备注:
- 要查看可在请求正文中使用的许可证代码,请查看许可证代码。
- 您可以分配与组织购买的许可证一样多的许可证。
响应
200 OK
返回已分配的许可证。
404
主机许可证不存在或内部部署流的功能标志已关闭。
409
不允许分配许可证,因为已分配数量超出了主机许可证数量。
请求示例
假设您收集了构建 API 调用所需的所有信息。
- 您的
{baseURL}为:https://tom-jones-server.com - 您的
{access_token}为:1234(出于长度考虑)。 - 您的
{hostAccountId}为:j0ne5 - 需要分配许可证的
{organizationId}是:y-y-y-delilah - 您想要向组织分配产品许可证,如下所示:
调用应类似于以下示例 (cURL):
curl --location --request POST 'https://tom-jones-server.com/lrm/api/host/j0ne5/organization/y-y-y-delilah/license' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"productQuantities":
[
{ "code": "UNATT", "quantity": 2 },
{ "code": "AIG", "quantity": 1 },
{ "code": "TAUNATT", "quantity": 3 }
]
}'
curl --location --request POST 'https://tom-jones-server.com/lrm/api/host/j0ne5/organization/y-y-y-delilah/license' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"productQuantities":
[
{ "code": "UNATT", "quantity": 2 },
{ "code": "AIG", "quantity": 1 },
{ "code": "TAUNATT", "quantity": 3 }
]
}'
以下是成功分配许可证的响应正文:
{
"accountId": "y-y-y-delilah",
"bundleCode": "string",
"endDate": 0,
"gracePeriod": 0,
"licenseCode": "string",
"licenseStatus": "string",
"products": [
{
"code": "string",
"quantity": 0,
"type": "string",
"features": [
{
"code": "string",
"type": "string",
"value": "string"
}
]
}
],
"templates": [
{
"productCode": "string",
"products": [
{
"code": "string",
"type": "string"
}
]
}
],
"startDate": 0,
"subscriptionCode": "string",
"subscriptionPlan": "string",
"payload": "string",
"type": "string",
"parentLicenseCode": "string"
}
{
"accountId": "y-y-y-delilah",
"bundleCode": "string",
"endDate": 0,
"gracePeriod": 0,
"licenseCode": "string",
"licenseStatus": "string",
"products": [
{
"code": "string",
"quantity": 0,
"type": "string",
"features": [
{
"code": "string",
"type": "string",
"value": "string"
}
]
}
],
"templates": [
{
"productCode": "string",
"products": [
{
"code": "string",
"type": "string"
}
]
}
],
"startDate": 0,
"subscriptionCode": "string",
"subscriptionPlan": "string",
"payload": "string",
"type": "string",
"parentLicenseCode": "string"
}