UiPath Documentation
private-test-cloud
2.2510
true
私有 Test Cloud API 指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

向租户分配许可证

用于在私有 Test Cloud 中为租户分配许可证的 API 参考,包括端点、请求字段和响应。

作为主机管理员,请使用此端点根据租户 ID 向租户分配许可证。

重要提示:

要将许可证分配给组织和租户,您需要使用主机凭据进行身份验证。

API 端点

PUT https://{yourDomain}/lrm/api/account/{accountId}/service-license/{serviceScopeId}/{serviceType}

备注:

要将许可证分配给租户的每个已启用的服务,您需要为每个服务进行单独的 API 调用。

请求标头

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
备注:

要获取{access_token} ,请确保通过ROPC 身份验证中描述的 ROPC 方法进行身份验证。

路径参数

路径参数数据类型描述
accountId (必填)字符串租户所在组织的 ID。
serviceScopeId (必填)字符串要向其分配许可证的租户 ID。
serviceType (必填)字符串服务类型。

请求正文

请求正文包含各种产品的许可证代码数组及其相应的数量。

    {
      "tenantName": "string",
      "products": 
        [
          { "code": "string", "quantity": 0 } 
        ]
    }
    {
      "tenantName": "string",
      "products": 
        [
          { "code": "string", "quantity": 0 } 
        ]
    }
备注:
  • 要查看可在请求正文中使用的许可证代码,请查看许可证代码
  • 您可以分配与组织购买的许可证一样多的许可证。

响应

200 OK

返回已分配的服务许可证。

{
  "accountId": "string",
  "serviceScopeId": "string",
  "serviceType": "string",
  "license": {
    "licenseCode": "string",
    "bundleCode": "string",
    "subscriptionCode": "string",
    "licenseStatus": "string",
    "startDate": 0,
    "endDate": 0,
    "gracePeriod": 0,
    "products": [
      {
        "code": "string",
        "quantity": 0,
        "type": "string",
        "features": [
          {
            "code": "string",
            "type": "string",
            "value": "string"
          }
        ]
      }
    ],
    "templates": [
      {
        "productCode": "string",
        "products": [
          {
            "code": "string",
            "type": "string"
          }
        ]
      }
    ],
    "payload": "string",
    "boonLicenseCode": "string"
  },
  "userLicensingEnabled": true,
  "accountLicenseCode": "string"
}
{
  "accountId": "string",
  "serviceScopeId": "string",
  "serviceType": "string",
  "license": {
    "licenseCode": "string",
    "bundleCode": "string",
    "subscriptionCode": "string",
    "licenseStatus": "string",
    "startDate": 0,
    "endDate": 0,
    "gracePeriod": 0,
    "products": [
      {
        "code": "string",
        "quantity": 0,
        "type": "string",
        "features": [
          {
            "code": "string",
            "type": "string",
            "value": "string"
          }
        ]
      }
    ],
    "templates": [
      {
        "productCode": "string",
        "products": [
          {
            "code": "string",
            "type": "string"
          }
        ]
      }
    ],
    "payload": "string",
    "boonLicenseCode": "string"
  },
  "userLicensingEnabled": true,
  "accountLicenseCode": "string"
}

404

未为指定组织分配帐户许可证。

409

不允许分配许可证,因为它超出了帐户许可证数量。

请求示例

假设您收集了构建 API 调用所需的所有信息。

  • 您的 {baseURL} 为:https://tom-jones-server.com
  • 您的 {access_token} 为:1234(出于长度考虑)。
  • 需要分配许可证的租户 {accountId} 为: y-y-y-delilah
  • {serviceScopeId} 为: y1968。 租户已启用 Document Understanding 服务。
  • 您想要向组织分配产品许可证,如下所示:

调用应类似于以下示例 (cURL):

curl --location --request POST 'https://tom-jones-server.com/lrm/api/account/y-y-y-delilah/service-license/y1968/?????' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productQuantities": 
        [
          { "code": "UNATT", "quantity": 5 },
          { "code": "NONPR", "quantity": 4 },
          { "code": "TIE", "quantity": 2 }      
        ]
}'
curl --location --request POST 'https://tom-jones-server.com/lrm/api/account/y-y-y-delilah/service-license/y1968/?????' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productQuantities": 
        [
          { "code": "UNATT", "quantity": 5 },
          { "code": "NONPR", "quantity": 4 },
          { "code": "TIE", "quantity": 2 }      
        ]
}'

以下是成功分配许可证的响应正文:

{
  "accountId": "y-y-y-delilah",
  "serviceScopeId": "y1968",
  "serviceType": "string",
  "license": {
    "licenseCode": "string",
    "bundleCode": "string",
    "subscriptionCode": "string",
    "licenseStatus": "string",
    "startDate": 0,
    "endDate": 0,
    "gracePeriod": 0,
    "products": [
      {
        "code": "string",
        "quantity": 0,
        "type": "string",
        "features": [
          {
            "code": "string",
            "type": "string",
            "value": "string"
          }
        ]
      }
    ],
    "templates": [
      {
        "productCode": "string",
        "products": [
          {
            "code": "string",
            "type": "string"
          }
        ]
      }
    ],
    "payload": "string",
    "boonLicenseCode": "string"
  },
  "userLicensingEnabled": true,
  "accountLicenseCode": "string"
}
{
  "accountId": "y-y-y-delilah",
  "serviceScopeId": "y1968",
  "serviceType": "string",
  "license": {
    "licenseCode": "string",
    "bundleCode": "string",
    "subscriptionCode": "string",
    "licenseStatus": "string",
    "startDate": 0,
    "endDate": 0,
    "gracePeriod": 0,
    "products": [
      {
        "code": "string",
        "quantity": 0,
        "type": "string",
        "features": [
          {
            "code": "string",
            "type": "string",
            "value": "string"
          }
        ]
      }
    ],
    "templates": [
      {
        "productCode": "string",
        "products": [
          {
            "code": "string",
            "type": "string"
          }
        ]
      }
    ],
    "payload": "string",
    "boonLicenseCode": "string"
  },
  "userLicensingEnabled": true,
  "accountLicenseCode": "string"
}
  • API 端点
  • 请求标头
  • 路径参数
  • 请求正文
  • 响应
  • 200 OK
  • 404
  • 409
  • 请求示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新