Checkout License from the Local License Server

This API allow checkout of a license from a AutoPass License Server visible on the network segment, which has an appropriate product license pool. The API is asynchronous and has two stages:

  1. Checkout request
  2. Get checkout operation status

Checkout License

This API initiates checkout of a license.

Body:

checkoutParameters - The configuration of the checkout operation; it includes:

  • Product ID
  • Duration in seconds
  • IP of the local AutoPass License Server

Return Value:

Request

JSON

URL http://ip:port/shunra/api /license/checkout
HTTP Method POST
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{
    "productKey": "43",
    "duration": 1036800,
    "ip": "172.30.2.30"
}

XML

URL http://ip:port/shunra/api /license/checkout
HTTP Method POST
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body
<checkoutParameters>
    <productKey>66</productKey>
    <ip>172.30.2.30</ip>
    <duration>1036800</duration>
</checkoutParameters>

 

Response

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

Accept-Ranges: bytes

HTTP Body None

Checkout Status

The API validates the status of the license currently being checked out.

Parameters:

productid - The ID of the Network Virtualization product for which the checkout is going to occur.

Return Value:

LicenseModificationStatus - the status and the error description (if an error occurred during the checkout). The possible statuses are:

// a job still has not been started
Idle(0),

// a job started
Started(1),

// a job finished
Finished(2),

// a job failed
Failed(3);

Request

JSON

URL http://ip:port/shunra/api/license/checkout/{productkey}
HTTP Method GET
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body None

Response

JSON

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

Content-Type: application/json; charset=UTF-8

Accept-Ranges: bytes

HTTP Body
{
    "statusDescription": null,
    "licenseStatus": "Finished"
}

XML

HTTP Response Code 200 - OK
HTTP Headers

Date: Thu, 15 Mar 2014 15:36:11 GMT

Content-Type: application/xml; charset=UTF-8

Accept-Ranges: bytes

HTTP Body
<licenseModificationStatus>
    <licenseStatus>Finished</licenseStatus>
</licenseModificationStatus>