License Management
API7 Gateway requires a valid license to operate. The license controls which features are available (e.g., API Gateway, Developer Portal) and defines the maximum number of data plane CPU cores your deployment can use.
License Properties
Each license contains the following properties:
| Property | Description |
|---|---|
| Serial Number | Unique identifier for the license |
| Customer | Organization name |
| Effective Date | When the license becomes active |
| Expiration Date | When the license expires |
| Max DP Cores | Maximum total CPU cores across all data plane instances |
| Feature List | Licensed features (e.g., API7 Gateway, API7 Portal) |
| Deployment ID | Ties the license to a specific deployment |
| Free Trial | Whether this is a trial license |
Upload a License
Using the Dashboard
- Log in to the API7 Dashboard.
- If no license is active, you are prompted to upload one on login.
- Upload the license file and click Activate.
Using the Admin API
Upload a license via the Admin API:
If you are not running locally, replace localhost with your Dashboard or Admin API host.
curl -k "https://localhost:7443/api/license" -X PUT \
-H "Authorization: Bearer $API7_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"license": "<LICENSE_CONTENT>"
}'
You can validate a license without applying it by adding the ?dry-run=all query parameter:
curl -k "https://localhost:7443/api/license?dry-run=all" -X PUT \
-H "Authorization: Bearer $API7_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"license": "<LICENSE_CONTENT>"
}'
Using a License File Path
For automated deployments (e.g., Kubernetes), you can configure the control plane to load the license from a file. The system polls the file every 5 seconds for changes.
Configure the license file path in the control plane's configuration:
dashboard_configuration:
license:
file_path: "/path/to/license.txt"
This approach is useful for GitOps workflows where the license is stored as a Kubernetes Secret and mounted into the control plane pod.
Retrieve License Details
Get the current license details, including the runtime status:
curl -k "https://localhost:7443/api/license" \
-H "Authorization: Bearer $API7_TOKEN"
The response includes the license properties and the current runtime status.
Core Quota
The Max DP Cores property defines the maximum number of CPU cores that all data plane (gateway) instances can collectively use. The control plane tracks actual core usage daily.
How Core Usage Is Tracked
At midnight each day, the control plane queries the peak core usage from all gateway instances for the previous day and compares it against the licensed max_dp_cores value.
License Runtime States
The license transitions through three runtime states based on core usage:
| State | Description | Impact |
|---|---|---|
| Normal | Core usage is within the licensed limit | Full functionality |
| DP Core Exceeded | Core usage exceeds the limit; a 7-day grace period begins | Full functionality (warning only) |
| Restricted | Grace period expired with cores still exceeding the limit | Write operations are blocked; read operations continue |
When in the Restricted state:
- Blocked: Creating or updating services, routes, consumers, plugins, SSL certificates, and other configuration resources.
- Allowed: Reading configurations, viewing dashboards, and uploading a new license.
To resolve the restricted state, either reduce the number of data plane cores (e.g., by scaling down gateway replicas) or upload a license with a higher core quota.
License Expiration
When a license expires:
- Read operations (viewing configurations, dashboards) continue to work.
- Write operations (creating or updating resources) are blocked.
- You can still upload a new license.
Monitor your license expiration date and plan renewals in advance. If you need a license, contact API7 sales or request a trial license.
Free Trial License
A free trial license is available for evaluation purposes:
- Maximum duration: 90 days.
- The trial period starts from the deployment date.
To request a trial license, visit api7.ai/try.