> ## Documentation Index
> Fetch the complete documentation index at: https://docs.booper.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Jobs

> This endpoint retrieves user jobs

### Query

<ParamField query="state" type="enum">
  The job state. One of `scheduled`, `completed`, `cancelled`
</ParamField>

<ParamField query="limit" type="number" default="10">
  Limits the number of jobs returned in the query. (Max 100)
</ParamField>

<ParamField query="offset" type="number" default="0">
  Offsets the jobs returned in the query for pagination.
</ParamField>

<ParamField query="order_by" type="[string, 'asc' | 'desc']">
  The field to order by. Defaults to most recently created.
</ParamField>

### Headers

<ParamField header="Authorization" type="string" initialValue="Bearer sk_public_20230921">
  API key
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://scheduler.booper.dev/api/jobs' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer sk_public_20230921'
  ```

  ```bash CLI theme={null}
  npx @booper/cli jobs list
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "id": "41d7f28b-dfbe-44b8-b716-b91898bb0ce0",
        "idempotency_key": null,
        "inserted_at": "2023-09-01T18:25:49",
        "name": null,
        "description": null,
        "user_id": "bd2aa099-6eb7-4dbb-9178-32141def1355",
        "schedule_id": null,
        "job_id": 29180,
        "job": {
          "attempted_at": "2023-09-01T18:26:20.353046Z",
          "cancelled_at": null,
          "completed_at": "2023-09-01T18:26:20.636467Z",
          "discarded_at": null,
          "has_confict": false,
          "id": 29180,
          "inserted_at": "2023-09-01T18:25:49.705161Z",
          "scheduled_at": "2023-09-01T18:26:19.707539Z",
          "state": "completed"
        },
        "args": {
          "body": {
            "author": "alex",
            "content": "Hello world!"
          },
          "headers": {},
          "method": "post",
          "schedule_in": [30, "seconds"],
          "url": "https://scheduler.booper.dev/api/channels/discord"
        }
      }
    ]
  }
  ```
</ResponseExample>
