Customer's licenses
Customer's licenses are customer's sepcific resources identified by their SKU (Stock Keeping Unit ID) and can be assigned to MS Users and MS Resource Accounts.
Get the list of the customer's licenses
List all the customer's licenses.
Request
Endpoint
GET
/api/v01/draas/{draas_instance}/groups/{uuid}/customer_licenses
GET
/api/v01/draas/{draas_instance}/distributors/{uuid}/customer_licenses
GET
/api/v01/draas/{draas_instance}/resellers/{uuid}/customer_licenses
GET
/api/v01/draas/{draas_instance}/tenants/{uuid}/customer_licenses
Authorization
Required role
groups.instance.customer_licenses.list
distributors.instance.customer_licenses.list
resellers.instance.customer_licenses.list
tenants.instance.customer_licenses.list
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
URL/Query parameters
Parameter | Type | Description | Required? |
---|---|---|---|
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
next | string | A token used to get the next records in the list. This token is taken back from the results of the previous call | no |
Response
Status codes
Parameter | Description |
---|---|
200 | One or more customer's licenses found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
results | integer | Total number of results from the query | no |
pages | integer | Total number of pages according to pagination settings | no |
page | integer | Current displayed page from the set of pages | no |
next | string | A token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list of customer's licenses has to be continued | yes |
licenses | array | List containing all the Customer's license objects for the group | no |
Customer's License Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
description | string | Description of the customer's license | no |
id | integer | ID of the customer's license in database | no |
name | string | Name of the customer's license | no |
sku | string | Stock keeping unit uniquely identifying the customer's license | no |
status | string | Status of the customer's license | no |
Example
{
"licenses": [
{
"description": "Test Description",
"id": 1,
"name": "Test Name",
"sku": "test-sku",
"status": "enabled"
}
],
"next": "cGFnZV9zaXplPTEmcGFnZT0y",
"page": 1,
"pages": 2,
"results": 1
}
Get the details of a customer's license
Returns the customer's license details.
Request
Endpoint
GET
/api/v01/draas/{draas_instance}/groups/{uuid}/customer_licenses/{id}
Authorization
Required role
groups.instance.customer_licenses.instance.read
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
id | integer | ID of the customer's license in database as returned by this API |
URL/Query parameters
N/A
Response
Status codes
Parameter | Description |
---|---|
200 | Details of the customer license |
404 | Customer license not found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
name | string | Name of the customer license | no |
description | string | Description of the customer license | no |
sku | string | Stock keeping unit uniquely identifying the customer license | no |
status | string | Status of the customer license | no |
Example
{
"description": "Test description",
"name": "Test name",
"sku": "test-sku",
"status": "enabled"
}
Create a new customer's license
This endpoint allows to add a new customer's license.
Request
Endpoint
POST
/api/v01/draas/{draas_instance}/groups/{uuid}/customer_licenses
Authorization
Required role
groups.instance.customer_license.create
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the group for which you want to add a new customer's license |
URL/Query parameters
N/A
Body
Parameter | Type | Description | Required |
---|---|---|---|
name | string | Name of the customer's license | yes |
description | string | Description of the customer's license | no |
sku | string | Stock keeping unit uniquely identifying the customer's license | yes |
status | string | Status of the customer's license. Possible values are:
| no |
Example
{
"description": "Test description",
"name": "Test name",
"sku": "test-sku",
"status": "enabled"
}
Response
Status codes
Parameter | Description |
---|---|
200 | The customer's license was correctly created |
400 | Error while creating the customer's license |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | ID of the customer's license in database | no |
Example
{
"id": 29
}
Modify an existing customer's license
This endpoint allows to modify an existing customer's license.
Request
Endpoint
PUT
/api/v01/draas/{draas_instance}/groups/{uuid}/customer_licenses/{id}
Authorization
Required role
groups.instance.customer_license.instance.update
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the group for which you want to modify an existing customer's license |
id | integer | ID of the customer's license in database as returned by this API |
URL/Query parameters
N/A
Body
Parameter | Type | Description | Required |
---|---|---|---|
name | string | Name of the customer's license. | no |
description | string | Description of the customer's license. | no |
status | string | Status of the customer's license. Possible values are:
| no |
Example
{
"description": "New test description",
"name": "New test name",
"status": "disabled"
}
Response
Status codes
Parameter | Description |
---|---|
204 | The customer's license was correctly modified |
400 | Error while modifying the customer's license |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A
Delete an existing customer's license
This endpoint allows to delete an existing customer's license.
Request
Endpoint
DELETE
/api/v01/draas/{draas_instance}/groups/{uuid}/customer_licenses/{id}
Authorization
Required role
groups.instance.customer_license.instance.delete
Path Parameters
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | System generated universal unique ID (UUID) identifying the group for which you want to delete an existing customer's license |
id | integer | ID of the customer's license in database as returned by this API |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
Parameter | Description |
---|---|
204 | The customer's license was correctly deleted |
400 | Error while deleting the customer's license |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A