License key
To start using Redocly API reference docs on-premise, you need to have a license key.The on-premise functionality is supported only in our Enterprise plan.
To request a license key, please contact us.
If you already have an Enterprise account with access to the Redocly Workflows app, you can generate the license key for your organization. Your account must have the Owner role in the app.
To generate the license key, log into Redocly Workflows and access the Org settings > On-premise license keys page. On this page, select the Generate license key button. If you have previously generated a license key, it is displayed on the page along with its expiration date and the list of allowed domains. In this case, select the Regenerate license key button to generate a new one.
When (re)generating a key, you can add up to 10 domain names to the allowlist. All subdomains of an added domain are included by default. Select the Add domains button under the active license key to add more domain names. Note that you can't edit previously added domains for the active license key. To change those domains, you have to generate a new license key.
Any previously generated keys are listed on the page in the History section. You can remove those keys from the list after they expire by selecting the recycle bin icon next to each key in the list.
Every license key is a base64-encoded string containing information about the expiration date and allowed domains. To start using the license key you've generated, copy it from the On-premise license keys page and save it for future use. The key doesn't need to be encrypted and can be stored in a plain text file.
After you've obtained the license key, you can start using Redocly API reference docs in one of the following ways:
- Including a snippet on your HTML page with our JavaScript CDN
- Pre-rendering bundled output using our
@redocly/reference-docs
CLI
Redocly JS Library
When using the JavaScript library from CDN, provide the license key in the options
argument of RedoclyAPIReference.init
call:
RedoclyAPIReference.init('<path to api definition>', {
licenseKey: '<license-key-here>',
}, document.querySelector('#redocly_container'))
CLI
There are two ways to provide a license key when using the CLI.
1 - Using the .redocly.yaml
file
The @redocly/reference-docs
CLI will search for this file in the current working directory.
Specify the license key in the .redocly.yaml
file in the following format:
licenseKey: "<license-key-here>"
2 - Using an environment variable REDOCLY_LICENSE_KEY
Example to set the license key as an environment variable:
REDOCLY_LICENSE_KEY=<license-key-here> reference-docs bundle openapi.yaml