The addLicense operation handles configuration related to License model. This API call is not allowed on the standby unit in an HA pair.
POST /api/fdm/v3/license/smartlicenses
Parameter | Required | Type | Description | ||
---|---|---|---|---|---|
count | True | integer | A mandatory Integer object, must be 1, specifies the number of Licenses for a particular License Type. Field level constraints: cannot be null, must be between 1 and 1 (inclusive). (Note: Additional constraints might exist) | ||
compliant | False | boolean | A read only Boolean object, TRUE or FALSE. The value TRUE indicates if the license exists in the account. The value FALSE indicates if the license is expired or there are not enough of that license type in the account. | ||
licenseType | True | string | A mandatory enum that specifies the type of Licensing. The values can be one of the following. You can use any of the AnyConnect Licenses: PLUS, APEX or VPNOnly for enabling RA VPN. BASE - Default license that comes with the device and all features not covered by the optional term licenses. MALWARE - Enables the file policies that check for malware. THREAT - Enables Intrusion detection and prevention. URLFILTERING - Enables Category and reputation-based URL filtering. APEX - Enables licensing for RAVPN. PLUS - Enables licensing for RAVPN. VPNOnly - Enables licensing for RAVPN. Field level constraints: cannot be null. (Note: Additional constraints might exist) | ||
type | True | string | A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name. |
curl -X POST \ --header "Accept: application/json" \ --header "Authorization: Bearer $" \ --header "Content-Type: application/json" \ -d '< "compliant": true, "count": 0, "id": "string", "licenseType": "BASE", "type": "license", "version": "string" >' \ "https://$:$/api/fdm/v3/license/smartlicenses"
from bravado.requests_client import RequestsClient from bravado.client import SwaggerClient def get_client(host, token): http_client = RequestsClient() http_client.ssl_verify = False http_client.set_api_key( host, "Bearer <>".format(token), param_name="Authorization", param_in="header" ) return SwaggerClient.from_url( "https://<>/apispec/ngfw.json".format(host), http_client=http_client, config= < "validate_responses": False, "validate_swagger_spec": False >) def add_license(client, body): return client.SmartLicensing.addLicense( body=body ).response().result if __name__ == "__main__": host = "ftd.example.com" token = "access_token" client = get_client(host, token) body = add_license(client, body)