License Feature Check
Last updated
Was this helpful?
Was this helpful?
type LicenseFeatureCheckRequestParams = ({
// for key-based licenses:
license_key: string
} | {
// for user-based licenses:
username: string
}) & {
// required properties:
hardware_id: string
product: string
feature: string
// optional properties:
license_id?: number | undefined
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"allOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"license_key": { "type": "string" }
},
"required": ["license_key"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"username": { "type": "string" }
},
"required": ["username"],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"hardware_id": { "type": "string" },
"product": { "type": "string" },
"feature": { "type": "string" },
"license_id": { "type": ["number", "null"] }
},
"required": ["hardware_id", "product", "feature"],
"additionalProperties": false
}
]
}curl --location --request GET '/api/v4/check_license_feature?hardware_id=string&product=string&feature=string&license_key=string' \
--header 'Accept: application/json' \
--header 'Date: string' \
--header 'Authorization: string'var request = require('request');
var options = {
method: 'GET',
url: '/api/v4/check_license_feature?hardware_id=string&product=string&feature=string&license_key=string',
headers: {
'Accept': 'application/json',
'Date': 'string',
'Authorization': 'string'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Date", "string");
myHeaders.append("Authorization", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/v4/check_license_feature?hardware_id=string&product=string&feature=string&license_key=string", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));import requests
url = "/api/v4/check_license_feature?hardware_id=string&product=string&feature=string&license_key=string"
headers = {
"Accept": "application/json",
"Date": "string",
"Authorization": "string"
}
response = requests.get(url, headers=headers)
print(response.text)require "uri"
require "net/http"
url = URI("/api/v4/check_license_feature?hardware_id=string&product=string&feature=string&license_key=string")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Date"] = "string"
request["Authorization"] = "string"
response = http.request(request)
puts response.read_bodytype LicenseFeatureCheckResponseBody = {
allow_negative_consumptions: boolean,
allow_overages: boolean,
allow_unlimited_consumptions: boolean,
code: string,
consumption_period: string,
expiry_date: null | string,
feature_type: string,
id: number,
is_floating_cloud: boolean,
is_floating: boolean,
license_id: number,
max_consumption: number,
max_overages: number,
metadata: JSON,
name: string,
reset_consumption: boolean,
total_consumptions: number,
// the following property is only present on floating and floating cloud features:
floating_in_use_devices?: number,
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"allow_negative_consumptions": { "type": "boolean" },
"allow_overages": { "type": "boolean" },
"allow_unlimited_consumptions": { "type": "boolean" },
"code": { "type": "string" },
"consumption_period": { "type": "string" },
"expiry_date": { "type": ["string", "null"] },
"feature_type": { "type": "string" },
"id": { "type": "number" },
"is_floating_cloud": { "type": "boolean" },
"is_floating": { "type": "boolean" },
"license_id": { "type": "number" },
"max_consumption": { "type": "number" },
"max_overages": { "type": "number" },
"metadata": { "type": "object" },
"name": { "type": "string" },
"reset_consumption": { "type": "boolean" },
"total_consumptions": { "type": "number" },
"floating_in_use_devices": { "type": "number" }
},
"required": [
"allow_negative_consumptions",
"allow_overages",
"allow_unlimited_consumptions",
"code",
"consumption_period",
"expiry_date",
"feature_type",
"id",
"is_floating_cloud",
"is_floating",
"license_id",
"max_consumption",
"max_overages",
"metadata",
"name",
"reset_consumption",
"total_consumptions"
],
"additionalProperties": false
}{
status: number,
code: string,
message: string
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"status": { "type": "number" },
"code": { "type": "string" },
"message": { "type": "string" }
},
"required": [
"status",
"code",
"message"
],
"additionalProperties": false
}