Automation Suite
2021.10
false
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
Automation Suite API Guide
Last updated 2024年6月17日

Allocate Licenses to a Tenant

As a host admin, use this endpoint to allocate licenses to a tenant, based on the tenant ID.

Important: To allocate licenses to organizations and tenants, you need to authenticate using the host credentials.

API Endpoint

docs image

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

Note: To allocate licenses to every enabled service of the tenant, you need to make a separate API call for each service.

Request Headers

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Note: To obtain the {access_token}, make sure to authenticate through the ROPC method described here.

Path Parameters

Path param

Data type

Description

accountId

(required)

String

The ID of the organization in which your tenant resides.

serviceScopeId

(required)

String

The ID of the tenant you want to allocate licenses to.

serviceType

(required)

String

The service type.

Request Body

The request body contains the array of license codes for various products and their corresponding quantity.

{
      "tenantName": "string",
      "products": 
        [
          { "code": "string", "quantity": 0 } 
        ]
    }    {
      "tenantName": "string",
      "products": 
        [
          { "code": "string", "quantity": 0 } 
        ]
    }
Note:
  • To see the available license codes you may use in the request body, check out License codes.
  • You may allocate as many licenses as the organization has purchased.

Responses

200 OK

Returns the allocated service licenses.
{
  "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

No account license is allocated for the indicated organization.

409

The license allocation is not allowed because it exceeds the account license quantities.

Example Request

Let's say you gathered all the information needed to build the API call.

  • Your {baseURL} is: https://tom-jones-server.com
  • Your {access_token} is: 1234 (for length considerations).
  • The {accountId} of the tenant that needs license allocation is: y-y-y-delilah
  • The {serviceScopeId} is: y1968. The tenant has the Document Understand service enabled.
  • You want to allocate product licenses to the above organization as follows:

The call should look like below (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 }      
        ]
}'

Here's the response body for a successful license allocation:

{
  "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 Endpoint
  • Request Headers
  • Path Parameters
  • Request Body
  • Responses
  • 200 OK
  • 404
  • 409
  • Example Request

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。