The following documentation is designed for desktop devices only. Mobile devices cannot be supported due to the technically complex view and the limited space!
Overview
Enwikuna License Manager Pro is fully integrated into the WordPress REST API. This allows creating, reading, updating and deleting data within Enwikuna License Manager by making JSON formated requests using the WordPress REST API authentication methods and standard HTTP verbs that are understood by most of the HTTP clients (e.g. POST, GET, DELETE).
The current version of the REST API is v1, which is at the beginning of all routes: /wp-json/elm/v1/xxx
New routes will be added to the current version. If new fields are added to existing routes, they will also be added to the current version. If fields are removed or routes are fundamentally changed, a new version will be created for this purpose. This ensures that your connection is always fully functional.
We have provided you with an overview including all currently available routes as well as their responses under the REST API routes section. You will also find sample data & sample responses which will help you implement your connection.
Requirements
In order to use the REST API, there are some requirements that you need to fulfill:
- WordPress 4.4+
- WordPress permalinks must be activated under: Settings > Permalinks
- HTTPS connection (HTTP connection is possible, but not recommended)
Tools
To make the implementation & testing of your REST API connection as easy as possible, we have placed a complete Postman collection into the Enwikuna License Manager Pro sample-data folder, which you can import after installing Postman. We will always keep this collection up to date!
Click here for more information on how to submit a request using Postman.
In addition to Postman, we can recommend the following tools to help you test your REST API connection to Enwikuna License Manager Pro:
- Insomnia – Cross-platform GraphQL and REST client, available for Mac, Windows and Linux.
Libraries
Below is a list of all currently available libraries and connections for Enwikuna License Manager & Enwikuna License Manager Pro!
- Enwikuna License Manager Client for WordPress (Integration of themes & plugins)
Authentication
To use the REST API in the first place, you need to create a REST API key within the Enwikuna License Manager settings. You can then use this key to establish a connection to the REST API. Furthermore, you can use JSON Web Tokens to implement a user login. More details can be found within the documentation of all settings.
Verify the signature of product files
If you want to download your releases including products via the REST API, you can benefit from the signed product downloads. To do this, request the current signature via the REST API. By the way, we calculate the signature with Sodium. Afterwards, you need to get the public key for downloading products from the REST API settings within the Enwikuna License Manager.
Now you can verify the signature and thus the authenticity of the product file downloaded via the REST API. This is possible in almost every programming language! We recommend that you perform the check directly when retrieving a file via the REST API.
$signature_raw = base64_decode( $downloaded_signature_from_the_rest_api );
$file_hash = hash_file( 'sha384', $downloaded_file_from_the_rest_api, true );
$public_key_raw = base64_decode( $public_key_from_the_settings );
if ( sodium_crypto_sign_verify_detached( $signature_raw, $file_hash, $public_key_raw ) ) {
// File is valid and has not been tampered with
} else {
// File is invalid and has been tampered with
}
REST API routes
Consequently, we have gathered all REST API routes of Enwikuna License Manager Pro using the OpenAPI format. If you need more routes, please contact us! We will then add them immediately.