Utilities
Introduction
Formidable › Utilities holds two things: the keys other sites and apps use to reach your JSON API, and Formidable's commands, for when you can't get to the command line.
Each half has its own permission. The page opens for Manage API keys or Run commands, and shows only what you may use.
API keys
The API Keys card lists your site's latest keys: each one's name, the first characters of the key (so you can recognise it), what it's allowed to do, which forms it reaches, when it was last used, and whether it's on.
- New key issues a key. It's shown once, when you save. Only a hash is stored, so a lost key is replaced, never recovered.
- Manage opens the full list, where keys are edited, switched off and revoked.
- API settings opens the API group on Formidable › Configuration, with Manage registry.
Your site's own pages don't need a key at all. See Authentication.
Commands
Every one of Formidable's command-line commands can run here, with a plain-English name and its options as form fields:
| Section | Command | Does the same as |
|---|---|---|
| Forms | List every form | formidable:forms |
| Check captured forms for changes | formidable:capture-status | |
| Recalculate computed answers | formidable:recalculate | |
| Submissions and drafts | List the latest submissions | formidable:submissions |
| Delete expired drafts | formidable:drafts:prune | |
| Send draft reminders | formidable:drafts:remind | |
| Upgrade encrypted answers | formidable:seal-encrypted | |
| Workflows | Run queued workflows | formidable:workflows:work |
| Themes | Show where theme parts come from | formidable:theme:status |
| Copy a theme into a template group | formidable:theme:copy | |
| Write classes for a CSS build | formidable:theme:classes | |
| Registry | Add missing fieldtypes | formidable:sync-fieldtypes |
Commands are listed one per row, with their name, a short description and badges: Changes data, Runs in the queue, and how many options they take. Open a row to fill in any options and choose Run. The output appears at the top of the page, exactly as the command line would print it. Each open row also shows its command-line equivalent, so you can move a job to cron later, and the permissions it needs.
- Same code, same rules. A command runs identically from here and from the terminal: the same checks, the same limits, the same messages.
- Commands that change things ask first. Recalculating, pruning, sending reminders and copying themes all confirm before they run.
- No questions. A command that would ask something on the command line, such as which template group to copy into, needs that field filled in instead.
- Long jobs suit the command line or the queue. A browser request has time limits a terminal doesn't. On a large site, run long jobs from the command line, in the background (below), or use the form's Recalculate page, which works in chunks.
Running in the background
With the workflow queue turned on, the commands that work through many records (Recalculate computed answers, Upgrade encrypted answers, Delete expired drafts and Send draft reminders) offer Run in the background beside Run now.
A background command is handed to the same queue as your workflows, so the page comes back straight away with a link to the run. It appears in the Workflow Log as a Command run, with the options it was given, who queued it, and its output once it finishes. A command that fails isn't retried automatically: run it again from Utilities once you've looked at why.
Who may run what
Run commands opens the door, and each command also needs the permission for what it touches:
| Commands | Also need |
|---|---|
| List every form, Check captured forms, Run queued workflows | Manage forms |
| List the latest submissions | View submissions |
| Recalculate, Delete expired drafts, Send draft reminders, Upgrade encrypted answers | Manage submissions |
| Show where theme parts come from, Add missing fieldtypes | Manage registry |
| Copy a theme, Write classes for a CSS build | Manage registry, and ExpressionEngine's template permissions |
A member sees only the commands they may run.