Tutorial: Manage Subscription License Keys Using the Access Server Web API (OpenAPI)
Learn how to manage Access Server subscription license keys using the Web API — including how to validate, activate, check the status of, and remove a subscription license key.
Overview
This tutorial shows you how to manage subscription license keys in OpenVPN Access Server using the Web API with the sacli apicall command.
Tip
This tutorial uses the sacli apicall command, but you can also use cURL or the Swagger UI. Refer to Tutorial: Test the New Web API (OpenAPI) in Access Server 3.0.
Prerequisites
Access Server 3.1.0 or newer.
Root access to your Access Server's console.
Access Server portal access.
(Optional) A remote system for running API calls.
Important
The API specification can change between Access Server versions. Verify the API specification for your version before using these commands.
Refer to: View the API specification.
Placeholder values used in this tutorial
Replace the following placeholder with the value for your environment:
Placeholder | Description |
|---|---|
| Your subscription license key. |
Sign in to the Access Server portal.
Select Subscriptions.
Copy the activation key for the target subscription.
Connect to the console and get root privileges.
Run the following command to retrieve the details and status of your subscription license key:
sacli --method POST --url 'api/license/subscription/test' --value '{"subscription": "<SUBSCRIPTION_KEY>"}' apicall
Connect to the console and get root privileges.
Run the following command to activate your subscription license key:
sacli --method POST --url 'api/license/subscription' --value '{"subscription": "<SUBSCRIPTION_KEY>"}' apicall
Connect to the console and get root privileges.
Run the following command to check the license status of the activated subscription on your Access Server:
sacli --method GET --url 'api/license/info' --value '' apicall
Connect to the console and get root privileges.
Run the following command to remove the subscription license currently activated on your Access Server:
sacli --method DELETE --url 'api/license/subscription' --value '' apicall
Tip
This removes the subscription license from your Access Server only. It doesn't delete the subscription or affect any recurring charges. The subscription license remains active in the Access Server portal.