Job History
Every discovery run is a job. Job History lists them with their counters and status, and the job detail shows the timeline, the error, the log and the exact list of assets the job added and removed.
Job History page
Open Job History in the Discovery section of the sidebar (/dashboard/discovery/jobs), or "View all" under Recent jobs on the Zones page, or the Logs button of a zone card (which opens the list filtered on that zone). The list shows 25 jobs per page, newest first, and refreshes every 5 seconds.
- Columns: Discovery zone (with its type and a "via <relay>" badge for relay jobs), Status, Discovered, Updated, Removed, Deps, Errors, Started and Duration
- Filters: Discovery zone and Status (Pending, Running, Completed, Partial, Failed, Cancelled). Filters and page are kept in the URL (environment, status, page)
- Cancel: managers and admins can cancel a pending or running job after a confirmation
- Details opens the job detail

Job statuses
A job goes through these states:
- pending: queued, waiting for a worker (or for the relay of a relay-mode zone); a job waiting to retry after a transient error is also pending
- running: the collector is working
- completed: every resource type was read
- partial: the run finished but some resource types could not be read; the assets that were read are saved
- failed: the collector failed, timed out, or the job was stuck (see Discovery Zones Overview, Stuck Jobs)
- cancelled: cancelled by a user ("Cancelled by user")
Job detail
The job detail (/dashboard/discovery/jobs/<id>) refreshes every 5 seconds while the job is pending or running. It shows:
- The status, the zone and its type, the job type, "scheduled" for jobs started by the scheduler, the relay that ran it and the user who triggered it, and the duration
- Five counters: Discovered (new assets), Updated, Removed (deactivated), Dependencies and Errors
- Asset changes: the assets the job added and removed (see below)
- Timeline: Created, Started and Completed
- Error Details and the job Log, when present
- Cancel Job (managers and admins) while the job is pending or running

Asset changes
Every job records which assets it created and which it deactivated, with a snapshot of their name and type, so the list stays readable after an asset is renamed or deleted. The Asset changes card has two tabs, New and Removed, each with its count, a "Filter by name" search and 20 rows per page. Each row shows the name (a link to the asset while it exists), the type and the current state: Active, Inactive or Deleted.
Note: Jobs that ran before this list was introduced show "The list of new and removed assets was not recorded for this job: it ran before the list was introduced."
Retry
A failed, cancelled or partial job can be run again through the API: POST /api/v1/discovery/jobs/<id>/retry/ (managers and admins) queues a new job for the same zone with the same full_scan flag. It returns 400 when the job is in another state or the zone is inactive, and 409 when the zone already has a pending or running job. For a relay-mode zone the new job waits for the relay.
Retention
Jobs older than DISCOVERY_JOB_RETENTION_DAYS (default 90; 0 keeps them forever) are deleted, together with their asset changes.
API
All endpoints require authentication; cancel and retry require the manager or admin role:
- GET /api/v1/discovery/jobs/ (paginated; filters environment, job_type, status, is_scheduled; ordering created_at, started_at, completed_at)
- GET /api/v1/discovery/jobs/<id>/
- GET /api/v1/discovery/jobs/<id>/asset-changes/?change=added|removed&search=<name> (paginated, sorted by name; any other change value returns 400)
- GET /api/v1/discovery/jobs/running/ and GET /api/v1/discovery/jobs/stats/
- POST /api/v1/discovery/jobs/<id>/cancel/ and POST /api/v1/discovery/jobs/<id>/retry/
- POST /api/v1/discovery-zones/<id>/trigger_discovery/ starts a job for a zone (Run Now)