TrueNAS SCALE Documentation Archive
This content follows the TrueNAS SCALE 22.12 (Bluefin) releases. Archival documentation is provided for reference only and not actively maintained.
Use the Product and Version selectors above to view content specific to different TrueNAS software or major versions.
Managing API Keys
2 minute read.
Last Modified 2023-08-31 13:31 EDTThe API Keys option on the top right toolbar Settings (user icon) dropdown menu displays the API Keys screen. This screen displays a list of API keys added to your TrueNAS.
Click Add to display a dialog window that lets users add a new API key. API keys identify outside resources and applications without a principal.
Type a descriptive name and click Add. The system displays a confirmation dialog and adds a new API key to the list.
TrueNAS SCALE supports creating API keys in the Shell with an allow list of permissions for the keys.
Go to System Settings > Shell and enter midclt call api_key.create '{"name":"KEYNAME", "allowlist": [{"method": "HTTPMETHOD", "resource": "METHODNAME"}]}'
using your desired allowlist
parameters.
After you enter the command, the Shell displays the API Key in the output.
Select the icon for any API key on the list to display options to manage that API key. Options are Edit or Delete.
Select the Reset to remove the existing API key and generate a new random key. The dialog displays the new key and the Copy to Clipboard option to copy the key to the clipboard.
Always back up and secure keys. The key string displays only one time, at creation!
To delete, select Confirm on the delete dialog to activate the Delete button.
Click API Docs to access API documentation for your system.