# GET /jobs

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the jobs group.

List jobs newest first

- Who may call it: administrator, reseller, customer
- Token scope: any
- Answers: 200 OK

Administrators see all jobs. Resellers see jobs requested by themselves or their customers. Customers see jobs they requested.

By default, the list includes jobs requested or finished within the effective jobs.show_days window, plus all queued and running jobs. Set older to true to include all retained jobs you can access. Use state, type, and q to filter the list and page and limit to paginate it. Invalid page or limit values return 400. Retrieve job logs through GET /jobs/{id}.

For queued and running jobs, usual_seconds gives the typical duration in seconds. UrbeStack considers the 200 most recent successful runs of the same type with recorded start and finish times and uses up to 20 runs with the same subject. The value is the median duration, using the lower of the two middle values for an even sample, or null if no matching duration is available.

## Parameters

- `older` (query, boolean): Whether to include all retained jobs you can access. Defaults to false.
- `state` (query, string, up to 40 characters): One job state or a comma-separated list of states to match. Valid values are queued, running, done, and failed.
- `type` (query, string, up to 40 characters): Job type to match, such as backup-make or cert-issue.
- `q` (query, string, up to 200 characters): Case-insensitive substring to match against the requester or the account, user, domain, version, or day named in the job parameters. An integer can also match a job ID, and a date in the form 2026-10-03 can also match the day the job was requested or finished.
- `page` (query, integer, 1 or more): Page number, starting at 1 and defaulting to 1. If the requested page exceeds the last page, the API returns the last page.
- `limit` (query, integer, 1 to 1000): Maximum number of jobs per page, from 1 to 1000. Defaults to 200.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/jobs?older=1&state=text&type=rebuild&q=text&page=1&limit=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "counts": {
    "done": 1,
    "failed": 1,
    "queued": 1,
    "running": 1
  },
  "jobs": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "created_by": 1,
      "created_by_name": "text",
      "dismissed_at": "text",
      "finished_at": "2026-09-09T10:15:04Z",
      "id": 1,
      "lane": "short",
      "log": "",
      "params": {},
      "progress": 100,
      "result": {},
      "started_at": "2026-09-09T10:15:01Z",
      "status": "queued",
      "type": "rebuild",
      "usual_seconds": 1
    }
  ],
  "keep_days": 1,
  "kept": {
    "since": "text",
    "total": 1
  },
  "more": true,
  "older": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "server_time": "text",
  "show_days": 1,
  "timezone": "text",
  "total": 1
}
```

## Errors

- 400: Invalid <what>: expected a non-negative integer
- 400: Invalid boolean
- 400: Invalid setting key
- 400: limit is a number from 1 to 1000
- 400: page is a number from 1
- 401: Authentication required
- 404: Setting '<key>' not found
