Kong Enterprise Edition (KongEE) - Generate license report using REST API

by
Jeremy Canfield |
Updated: September 08 2022
| Kong Enterprise Edition (KongEE) articles
This assumes Kong has been secured with Role Based Access Control (RBAC) and you have created your Kong-Admin-Token. The following curl command can be used to list the endpoints that can be used with the API.
curl --header "Kong-Admin-Token: abc123" --request GET "https://kong.example.com/endpoints"
Something like this should be returned. Notice that the /license/report endpoint can be used.
{
"data": [
"/",
"/acls",
"/acls/{acls}",
"/acls/{acls}/consumer",
"/license/report",
"/licenses",
"/licenses/{licenses}"
]
}
The following curl command can be used to get the license report for KongEE.
curl --header "Kong-Admin-Token: abc123" --request GET "https://kong.example.com/license/report"
Something like this should be returned.
{
"counters": {
"req_cnt": 37808559
},
"db_version": "postgres 10.6",
"kong_version": "1.3.0.2-enterprise-edition",
"license_key": "0123456789abcdefgh_abcdef123456789",
"rbac_users": 263,
"services_count": 266,
"system_info": {
"cores": 4,
"hostname": "kong-admin-1.3.0.2-5d7c89d4bb-abcde",
"uname": "Linux x86_64"
},
"workspaces_count": 217
}
Be aware that each time a new license is applied, the counters block will contain a date entry reflecting the date that the new license was applied, and requests should only be applied to the date of the active license (typically the most recent date).
{
"counters": {
"2021-03-01": {
"req_cnt": 5977583
},
"2021-08-19": {
"req_cnt": 40924409
},
"2021-09-28": {
"req_cnt": 2745044
}
},
"db_version": "postgres 10.6",
"kong_version": "1.3.0.2-enterprise-edition",
"license_key": "0123456789abcdefgh_abcdef123456789",
"rbac_users": 263,
"services_count": 266,
"system_info": {
"cores": 4,
"hostname": "kong-admin-1.3.0.2-5d7c89d4bb-abcde",
"uname": "Linux x86_64"
},
"workspaces_count": 217
}
Did you find this article helpful?
If so, consider buying me a coffee over at