Job Hooks¶
A Job Hook is a mechanism for automatically starting a job when an object is changed. Job Hooks are similar to webhooks except that an object change event initiates a JobHookReceiver job instead of a web request. Job hooks are configured in the web UI under Jobs > Job Hooks.
Configuration¶
- Name - A unique name for the job hook.
- Content type(s) - The type or types of Nautobot object that will trigger the job hook.
- Job - The job hook receiver that this job hook will run.
- Enabled - If unchecked, the job hook will be inactive.
- Events - A job hook may trigger on any combination of create, update, and delete events. At least one event type must be selected.
For any Job that is loaded into Nautobot, the Job must be enabled to run. See Enabling Jobs for Running for more details.
A Job Hook only runs if the user whose change triggered it has permission to run the target Job — that is, the run action on that Job (via the extras.run_job permission or an equivalent object permission). If the responsible user lacks that permission, the Job Hook is skipped and a warning is logged, rather than the Job being run. Grant the run permission on the relevant Job to any user whose changes should be able to trigger the hook.