Skip to content

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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the group, distributor, reseller or tenant

URL/Query parameters ​

ParameterTypeDescriptionRequired?
page_sizeintegerUsed for pagination, determines the maximum number of records on one page of results (defaults to 10)no
nextstringA token used to get the next records in the list. This token is taken back from the results of the previous callno

Response ​

Status codes ​

ParameterDescription
200One or more customer's licenses found
400Error while processing the request
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
resultsintegerTotal number of results from the queryno
pagesintegerTotal number of pages according to pagination settingsno
pageintegerCurrent displayed page from the set of pagesno
nextstringA 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 continuedyes
licensesarrayList containing all the Customer's license objects for the groupno
Customer's License Object ​
ParameterTypeDescriptionConditional?
descriptionstringDescription of the customer's licenseno
idintegerID of the customer's license in databaseno
namestringName of the customer's licenseno
skustringStock keeping unit uniquely identifying the customer's licenseno
statusstringStatus of the customer's licenseno
Example ​
json
{
    "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
idintegerID of the customer's license in database as returned by this API

URL/Query parameters ​

N/A

Response ​

Status codes ​

ParameterDescription
200Details of the customer license
404Customer license not found
400Error while processing the request
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
namestringName of the customer licenseno
descriptionstringDescription of the customer licenseno
skustringStock keeping unit uniquely identifying the customer licenseno
statusstringStatus of the customer licenseno
Example ​
json
{
    "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringSystem 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 ​
ParameterTypeDescriptionRequired
namestringName of the customer's licenseyes
descriptionstringDescription of the customer's licenseno
skustringStock keeping unit uniquely identifying the customer's licenseyes
statusstringStatus of the customer's license. Possible values are:
  • enabled(default),
  • disabled.
no

Example ​

json
{
    "description": "Test description",
    "name": "Test name",
    "sku": "test-sku",
    "status": "enabled"
}

Response ​

Status codes ​

ParameterDescription
200The customer's license was correctly created
400Error while creating the customer's license
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success ​

Body ​
ParameterTypeDescriptionConditional?
idintegerID of the customer's license in databaseno
Example ​
json
{
    "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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringSystem generated universal unique ID (UUID) identifying the group for which you want to modify an existing customer's license
idintegerID of the customer's license in database as returned by this API

URL/Query parameters ​

N/A

Body ​
ParameterTypeDescriptionRequired
namestringName of the customer's license.no
descriptionstringDescription of the customer's license.no
statusstringStatus of the customer's license. Possible values are:
  • enabled(default),
  • disabled.
.
no

Example ​

json
{
    "description": "New test description",
    "name": "New test name",
    "status": "disabled"
}

Response ​

Status codes ​

ParameterDescription
204The customer's license was correctly modified
400Error while modifying the customer's license
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched 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 ​

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringSystem generated universal unique ID (UUID) identifying the group for which you want to delete an existing customer's license
idintegerID of the customer's license in database as returned by this API

URL/Query parameters ​

N/A

Body ​

N/A

Response ​

Status codes ​

ParameterDescription
204The customer's license was correctly deleted
400Error while deleting the customer's license
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success ​

Body ​

N/A