api:tools:scheduledjobs:failed
Table of Contents
API : Tools: Scheduled jobs : Failed
Introduction
Returns archived runs that failed, newest first. A record here is one attempt; the job it came from may still exist, which is always the case for a recurring schedule.
Request
| URL | https://api.telecomx.dk/tools/scheduledjobs/failed | ||
|---|---|---|---|
| Method | GET | ||
| Access level | Admin | ||
Query parameters
| Field | Type | Description |
|---|---|---|
| offset | Number | How many records to skip. Defaults to 0. |
| limit | Number | How many records to return, 1-200. Defaults to 50. |
Query example
https://api.telecomx.dk/tools/scheduledjobs/failed?offset=0&limit=50
Response
An object with jobs (array of run records), total, offset and limit.
| Field | Type | Description |
|---|---|---|
| _id | Id | Unique id of this run - the job it came from keeps its own id |
| sourceJobId | Id | _id of the ScheduledJobs document this run came from |
| recurring | Boolean | Was this a run of a recurring schedule? |
| name | String | Label of the job at the time it ran |
| what | String | Type of event |
| hostname | String | Hostname that was called |
| path | String | Path that was called |
| method | String | HTTP method used |
| params | Object | Query string parameters sent |
| body | Object | Request body sent |
| startedAt | Date | When the attempt started |
| completedAt | Date | When the attempt finished - the sort key |
| durationMs | Number | How long the attempt took |
| httpStatus | Number | Status the server answered with, when it answered at all |
| failed | Number | How many consecutive failures the job had reached |
| error | Object | Details of the error: message and stack |
| expiresAt | Date | When the record may be removed by the TTL monitor |
| customerId | Id | Customer the job relates to |
| customerName | String | Name of that customer |
| createdBy | Object | Employee the job ran as |
| createdByEmailAddress | String | Email address of that employee |
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/tools/scheduledjobs/failed.txt · Last modified: by Per Møller
