Returns everything currently sitting in the trash -- jobs removed with Delete a Job but not yet restored or purged.
Having trouble reaching the API, or logging in from another machine? See Network Access & Authentication Security -- by default the Api only answers
localhost, and PowerShell needs an extra flag once it does answer elsewhere.
Order of Operations
- Authenticate to the API.
- Request the trash list.
The call
GET /api/jobs/deleted
No route parameters, no query parameters, no request body.
Permission needed: Job.View.
C# example
var jsonOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);
// Step 1: Authenticate to the API.
using var handler = new HttpClientHandler { UseDefaultCredentials = true };
using var client = new HttpClient(handler) { BaseAddress = new Uri("http://your-minion-agent-server:5443") };
client.DefaultRequestHeaders.Add("X-App-Name", "MyIntegration");
// Step 2: Request the trash list.
var deletedJobs = await client.GetFromJsonAsync<JobSummary[]>("/api/jobs/deleted", jsonOptions);
foreach (var job in deletedJobs!)
{
Console.WriteLine($"{job.JobName} (id {job.JobID}) -- deleted {job.DeletedAt}");
}
record JobSummary(int JobID, string JobName, DateTime? DeletedAt);
Not on a domain machine? Swap in the app-account login from Calling the API From Your Own Code.
PowerShell example
# Step 1: Authenticate to the API.
$headers = @{ "X-App-Name" = "MyIntegration" }
# Step 2: Request the trash list. (-AllowUnencryptedAuthentication: PowerShell requires this for Windows auth over plain http to anything but localhost -- see "Network Access & Authentication Security".)
$deletedJobs = Invoke-RestMethod -Uri "http://your-minion-agent-server:5443/api/jobs/deleted" -UseDefaultCredentials -AllowUnencryptedAuthentication -Headers $headers
$deletedJobs | ForEach-Object { "$($_.jobName) (id $($_.jobID)) -- deleted $($_.deletedAt)" }
What you get back
200 OK, the same shape as List Jobs, except deletedAt is actually populated here:
[
{
"jobID": 19,
"jobName": "Old Reporting Job",
"description": null,
"folderId": 3,
"isActive": false,
"createdAt": "2025-11-02T08:00:00Z",
"modifiedAt": "2026-06-01T10:15:00Z",
"targetServerId": null,
"targetServerName": null,
"workerName": null,
"isGlobal": false,
"deletedAt": "2026-09-01T13:20:00Z"
}
]
Codes this call can return
See API Response Codes for what each one means in general. For this specific call:
- 200 -- the list, even if it's empty.
- 403 -- you don't have
Job.Viewanywhere.
See also: Delete a Job, Restore a Job, Empty the Trash.