How to Use the Web API for Licensing

A guide to know how to use the web API to do operations related to licenses.

What you can do:

  1. Get all licenses listed in JSON format.

  2. Get specific license information.

  3. Get license bytes by its license key.

  4. Create a new license. For this action, an Access Token is required because only users of Mobilize are allowed to perform this action. Please see the section of Get an Access Token and Create a License.

Get an access token

There are two environments where you can get an access token, one is for production and the other for development purposes (staging and development).

The recommended tool to use this API is POSTMAN.

Click on the desired environment to download it.

Import them to use the variables when you request an access token.

Request an access token

Once the desired environment is imported in POSTMAN set the parameters to get an access token:

  1. Click on the Authorization tab and select OAuth 2.0

2. Set the required parameters in the Postman form using the environment variables and click on the button Get New Access Token

3. Write your user and password of Mobilize and sign in

4. Use the Token provided by the Azure Active Directory

5. Now, the token should be set as a header and you will be able to request an action from the API that requires this authorization token like create a license.

How to Create a License

To do this, postman and an access token is required.

You set the request type to POST.

Then, set the url to: https://licensing.mobilize.net/api/licenses/createlicense if it is for production or https://api-licensing-dev.azurewebsites.net/api/Licenses/CreateLicense for development or https://api-licensing-staging.azurewebsites.net/api/licenses/CreateLicense for staging.

Then, click on the body tab and set the body type as form-data.

Then, write the keys and its values for every required parameter.

The required parameters are:

  • OwnerEmail: The email which will be associated with the license.

  • OwnerName: The owner of the license.

  • OwnerCompany: The name of the company for the license.

  • Product: The name of the product, for example: "SnowConvert".

Optional Parameters:

  • UnitsLimit: -1 by default. The number of lines of code that a license can convert.

  • ExecutionMode: By default "Assessment". Can be changed to "Conversion".

  • AvailableActivations: By default 5. Change this only if it is a special license that needs more or less than 5 activations from the server.

  • ExpirationDate: no expiration date by default, set this value in the next format: yyyy/mm/dd.

The request in Postman should look like this:

Finally, just click on the send button and if nothing goes wrong the response should look like this:

DownloadLicense

GET https://api.licensing.mobilize.net/api/Licenses/DownloadLicense/{LicenseKey}

Gets the license data

Headers

NameTypeDescription

LicenseKey

string

The license key

[]

Get licenses

GET https://api.licensing.mobilize.net/api/Licenses/

Gets the last 100 or specific amount created licenses.

Query Parameters

NameTypeDescription

ExpiresOnOrBefore

string

Filter licenses by the expiration date or before the date specified. The right format is: YYYY/MM/DD

CreatedOnOrAfter

string

Filter licenses by the creation date or after the date specified. The right format is: YYYY/MM/DD

MaxUnitsLimit

string

Get licenses that have the maximum specified amount of units. The number must be greater than 0.

MinUnitsLimit

string

Get licenses that have the minimum specified amount of units. The number must be greater than 0.

OwnerName

string

Filter licenses by owner name.

OwnerEmail

string

Filter licenses by owner email.

OwnerCompany

string

Filter licenses by company.

CreatedBy

string

Filter licenses by who created the license.

Product

string

Filter licenses by name of the product.

Limit

string

How many licenses to retrieve (Default is 100). The number must be greater than 0.

GET https://api.licensing.mobilize.net/api/Licenses/{limit?}

Query Parameters

NameTypeDescription

MinUnitsLimit

string

Get licenses that have the minimum specified amount of units.

GET https://api.licensing.mobilize.net/api/Licenses/{limit?}

Query Parameters

NameTypeDescription

MinUnitsLimit

string

Get licenses that have the minimum specified amount of units.

CreateLicense

POST https://api.licensing.mobilize.net/api/licenses/createlicense/

Creates a new license

Request Body

NameTypeDescription

AvailableActivations

number

A number of available activations. By default, it is 5.

OwnerEmail

string

An email to which license will be linked to.

OwnerName

string

Name of the owner of the license.

OwnerCompany

string

Name of the company to which the license is linked to.

ExpirationDate

string

Expiration date in format yyyy-dd-mm

Product

string

Name of the product.

ExecutionMode

string

Type of execution mode of the application (Conversion or Assessment). By default it is Assessment.

UnitsLimit

number

The number of units limit for the license to convert.

{
    "licenseKey": "zaa11df7-be08-4f1e-81de-21db11fa7acd",
    "createdBy": "aespinoza@mobilize.net",
    "executionMode": "Conversion",
    "ownerEmail": "aespinoza@mobilize.net",
    "ownerName": "Alberto Espinoza",
    "ownerCompany": "Mobilize",
    "product": "SnowConvert",
    "unitsLimit": 15000,
    "availableActivations": 3,
    "timesDownloaded": 0,
    "creationDate": "2021-04-06T15:30:07.4302032Z",
    "startDate": "2021-04-06T15:30:07.4302032Z",
    "expirationDate": "9999-12-31T23:59:59.9999999"
}

Get license information

GET https://api.licensing.mobilize.net/api/licenses/getlicense/{licenseKey}

Gets the information of a specific license

Path Parameters

NameTypeDescription

License key

string

The license key of an existing license

Create Free License

POST https://api-licensing.mobilize.net/api/licenses/CreateFreeProductLicense

This method allows for the creation of free licenses. Only some products allow for the creation of free licenses.

Request Body

NameTypeDescription

Products

array

A string array. Must contain the name of all products supported by the license. They must be products that support free licensing.

CreatedBy

string

The name of the creator of the license.

ExecutionMode

string

Can be "Conversion" or "Assessment".

OwnerCompany

string

The name of the owner's company.

OwnerName

string

The name of the owner.

OwnerEmail

string

The email of the owner.

{
    "ownerEmail": "lumontero@mobilize.net",
    "ownerName": "Luis Alonso Montero Marín",
    "ownerCompany": "Mobilize.Net",
    "unitsLimit": -1,
    "executionMode": "Conversion",
    "availableActivations": 9999,
    "timesDowloaded": 0,
    "createdBy": "Alonso Montero",
    "products": [
        "ProductC"
    ],
    "licenseKey": "7832e204-f819-42c2-9659-a5d603d6031b",
    "expirationDate": "9999-12-31T23:59:59.9999999",
    "dateIssued": "2021-09-28T17:01:27.2295001Z",
    "startDate": "2021-09-28T17:01:27.2132076Z"
}

Download Free License by Property

GET https://api-licensing.mobilize.net/api/licenses/DownloadFreeLicenseByProperty/{productName}/{propertyName}/{propertyValue}

Path Parameters

NameTypeDescription

ProductName

string

The name of the product for which the license will be downloaded.

PropertyName

string

The name of the property. It can be "OwnerIpAddress", "OwnerCompany", "OwnerName", "OwnerEmail" or "Key".

PropertyValue

string

The value for the property.

Last updated