# Retrieve Job Run History by id

`GET /lokta-lms/api/v1/jobs/{jobId}/runhistory`

Lists the past runs of a scheduled job, found by its id.

Example Requests:

jobs/5/runhistory?offset=0&limit=200

## Parameters
- `jobId` (path, integer, required): jobId
- `offset` (query, integer): offset
- `limit` (query, integer): limit
- `orderBy` (query, string): orderBy
- `sortOrder` (query, string): sortOrder

## Responses
- `200`: OK

## Response fields
- `pageItems` (array of JobDetailHistoryDataSwagger)
- `totalFilteredRecords` (integer)

## Example request (cURL)
```bash
curl -X GET \
  'https://default.lokta.tech/lokta-lms/api/v1/jobs/{jobId}/runhistory' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "pageItems": [
    {}
  ],
  "totalFilteredRecords": 8
}
```

Interactive: https://developer.lokta.ai/reference#operation/retrieveHistory
