automation-suite
2023.4
false
- Getting started
- Authentication
- Scopes and permissions
- Platform Management APIs
- License Codes
- Allocate Licenses to an Organization
- Allocate Licenses to a Tenant
- Allocate Licenses to a Group
- Allocate Licenses to a User
Allocate Licenses to a User
Automation Suite API Guide
Last updated Jul 12, 2024
Allocate Licenses to a User
As an organization admin, use this endpoint to allocate licenses to a user, based on the user ID.
--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 param |
Data type |
Description |
---|---|---|
(required) |
String |
The ID of the organization in which your user resides. |
The request body contains the array of license codes for various products and their corresponding quantity.
{
"userIds": ["string"],
"userBundleCodes": ["string"],
"useExternalLicense": true
}
{
"userIds": ["string"],
"userBundleCodes": ["string"],
"useExternalLicense": true
}
Note:
- To see the available user bundle codes you may use in the request body, check out the user license codes.
- You may allocate as many licenses as the organization has purchased.
- Each user consumes a license unit.
Let's say you gathered all the information needed to build the API call.
- Your
{baseURL}
is:https://music-server.com
- Your
{access_token}
is:1234
(for length considerations). - The
{accountId}
of the tenant that needs license allocation is:song-one
- You have three users that need licenses:
- User 1 with the
userId
=singer-77
- User 2 with the
userId
=singer-88
- User 3 with the
userId
=singer-111
- User 1 with the
- You want to allocate the following user licences:
- RPA Developer - Named user (the license code is
RPADEVNU
) - Attended - Named user (the license code is
ATTUNU
) - Tester - Named user (the license code is
TSTNU
)
- RPA Developer - Named user (the license code is
The call should look like below (cURL):
curl --location --request POST 'https://music-server.com/lease_/api/account/song_one/user-license' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"userIds": ["singer-77", "singer-88", "singer-111"]
"userBundleCodes": ["RPADEVNU", "ATTUNU", "TSTNU"],
"useExternalLicense": true
}
curl --location --request POST 'https://music-server.com/lease_/api/account/song_one/user-license' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"userIds": ["singer-77", "singer-88", "singer-111"]
"userBundleCodes": ["RPADEVNU", "ATTUNU", "TSTNU"],
"useExternalLicense": true
}
Here's the response body for a successful license allocation:
[
{
"userId": "string",
"organizationId": "string",
"useExternalLicense": true,
"userBundleCodes": [
"string"
]
}
]
[
{
"userId": "string",
"organizationId": "string",
"useExternalLicense": true,
"userBundleCodes": [
"string"
]
}
]