Skip to main content
Version: 24.05

License - History

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/o/license-history

Overview​

Returns every license that has been uploaded to this server, newest activation first.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

Requires Read permission on the license feature.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringConditionalRequired for users who are not global admins.

Examples​

Read the license history​

/o/license-history?api_key=YOUR_API_KEY

Response​

Success Response​

[
{
"name": "Example Client",
"rule": "dp_monthly",
"start": 1740000000,
"end": 1771536000,
"license_stage": "Production",
"license_hosting": "Self-Hosted",
"activated_at": 1740000000000,
"previousTier": null
}
]

Response Fields​

The response is an array with one entry for each stored license. Each entry holds the fields stored in the signed license file (see the License overview), except the license _id and the issue time, plus:

FieldTypeDescription
activated_atNumberWhen the license was activated on this server.
previousTierStringTier that was active before this license was uploaded, if recorded.

Error Responses​

  • 500
{
"result": "Error in fetching license history"
}
  • 500
{
"result": "Error in returning license history"
}

Behavior​

  • Read-only. Nothing is modified.
  • Returns an empty object {} instead of the list when the server is a Countly Flex deployment.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and permission checkReads the member and permissions.
countly.licensesLicense historyReads all stored licenses.