UiPath Documentation
automation-suite
2021.10
false
Automation Suite API 指南
  • 入门指南
    • 关于本指南
    • 可用资源:
    • API 端点 URL 结构
    • 枚举列表
  • 身份验证
  • 作用域和权限
  • 平台管理 API
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

向组分配许可证

作为组织管理员,请使用此端点向组分配许可证。 为此,您需要创建一个名为PM.License.Write作用域的外部应用程序。

API 端点​

PUT https://{yourDomain}/{organizationName}/lease_/api/account/{accountId}/user-license/group/{groupId}

请求标头​

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

To obtain the {access_token}, make sure to authenticate through the ROPC method described here.

路径参数​

路径参数数据类型描述
accountId

(必填)
字符串租户所在组织的 ID。
groupId

(必填)
字符串要向其分配许可证的组的 ID。

You can retrieve this ID by following these steps.

请求正文​

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

{
    "userBundleCodes": ["string"]
}
{
    "userBundleCodes": ["string"]
}
备注:
  • To see the available user bundle codes you may use in the request body, check out the user license codes.
  • 您可以分配与组织购买的许可证一样多的许可证。

响应​

200 OK​

返回已分配的组许可证。

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

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

请求示例​

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

  • 您的{baseURL}为: https://{yourDomain}/{organizationName} 。
  • 您的 {access_token} 为:1234(出于长度考虑)。
  • 需要分配许可证的租户 {accountId} 为: song-one
  • {groupId} 为:group-01。
  • 您需要按如下方式向组分配用户许可证:

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

curl --location --request POST 'https://https://{yourDomain}/{organizationName}/lease_/api/account/1234/user-license/group/group-01' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userBundleCodes": ["RPADEVPRONU", "IDU", "CTZDEVCU"],
    "useExternalLicense": false
}'
curl --location --request POST 'https://https://{yourDomain}/{organizationName}/lease_/api/account/1234/user-license/group/group-01' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userBundleCodes": ["RPADEVPRONU", "IDU", "CTZDEVCU"],
    "useExternalLicense": false
}'

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

{
  "groupId": "string",
  "organizationId": "string",
  "useExternalLicense": false,
  "userBundleCodes": [
    "string"
  ]
}
{
  "groupId": "string",
  "organizationId": "string",
  "useExternalLicense": false,
  "userBundleCodes": [
    "string"
  ]
}
  • API 端点​
  • 请求标头​
  • 路径参数​
  • 请求正文​
  • 响应​
  • 200 OK​
  • 404​
  • 409​
  • 请求示例​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新