Licence

The licence that decides how many services and which features the appliance will run.

Licence

GET /licence

Get licence

curl
curl -X GET "https://appliance.example.com/api/v1/licence" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/licence';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/licence", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/licence', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Licence Details",
  "data": {
    "updateType": "full",
    "platform": "vmware",
    "serial": "5df136b976c35",
    "model": "max",
    "daysToExpire": 29,
    "companyName": "Acme Inc",
    "maxVips": 0,
    "maxRips": 0,
    "supportExpireDate": "13/02/2020",
    "modules": [],
    "licenceType": "trial"
  }
}

PUT /licence

Add Licence

This change is staged. Send PUT /services/apply to apply it.

Body parameters
licenceKey string Required
curl
curl -X PUT "https://appliance.example.com/api/v1/licence" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "licenceKey": "<licenceKey>"
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/licence';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'licenceKey' => '<licenceKey>',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "licenceKey": "<licenceKey>"
}

response = requests.put("https://appliance.example.com/api/v1/licence", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/licence', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "licenceKey": "<licenceKey>"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "LicenceAPI Key Installed successfully"
}