System - Preview jobs
API Url
Used to preview/simulate recurrent job executions according to setup. For recurrent reports, it also simulates the reporting period.
http://localhost:16010/ProMarkREST/rest/System/job-executions
Permissions: user
Query parameters
| Field | Type | Description |
|---|---|---|
skipoptional | Number | Skip a certain number of records. |
takeoptional | Number | Limit the number of records to return. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| job | Object | Object containing the job setup. |
jobNooptional | Number | Job number. If supplied, report setup can be searched using the linked job. |
parentIdoptional | String | For jobs related to ProReport, this is the report id. If supplied, the report can be searched directly. |
| recurrence | Object | The recurrence setup. Only for 'Recurrent' reports. |
dailyoptional | Object | Setup for daily executions. |
| calendarDays | Boolean | Daily execution should be only in calendar days (true=Calendar days, false=Working days). |
| every | Number | Repeat every X days. |
hourlyoptional | Object | Setup for hourly executions. |
| end | Number | End of activation interval used with Hourly schedule |
| every | Number | Repeat every X hours |
| hoursList | Number | A list of hours when to Run the job (max 5). Only for 'type' = 2. 5 |
| start | Number | Start of activation interval used with Hourly schedule |
| type | Number | Type of hourly setup 1 - Repeat X hours 2 - Fixed hours list |
| weekDays | Boolean | Weekdays when report is to be executed, starting with Sunday. 7 |
monthlyoptional | Object | Setup for monthly executions. |
| absoluteDay | Number | Day of month to run on. Only when 'onAbsoluteDay'=true. 1-31 |
| every | Number | Repeat every X months. |
| onAbsoluteDay | Boolean | true=Repeat on a specific day, false=Repeat on a relative day. |
| relativeDay | Number | Relative day of month to run on (1=First, 2=Second, 3=Third, 4=Forth, 5=Last). Only when 'onAbsoluteDay'=false. 1-5 |
| relativeWeekday | Number | Relative weekday of month to run on (1=Sun, 2=Mon, 3=Tue, 4=Wed, 5=Thu, 6=Fri, 7=Sat). Used together with 'relativeDay'. Only when 'onAbsoluteDay'=false. 1-7 |
| repeatUnit | Number | Repeat execution (1=Daily, 2=Weekly, 3=Monthly, 4=Yearly, 5=Hourly). |
| start | Date | First day of recurrence. |
| time | Number | Time of day when report needs to be executed, expressed in seconds from midnight. |
weeklyoptional | Object | Setup for weekly executions. |
| every | Number | Repeat every X weeks. |
| weekDays | Boolean | Weekdays when report is to be executed, starting with Sunday. 7 |
yearlyoptional | Object | Setup for yearly executions. |
| absoluteDay | Number | Day of month to run on. Used together with 'month'. Only when 'onAbsoluteDay'=true. 1-31 |
| month | Number | Month of year when to run the report (1=Jan, 2=Feb, 3=Mar ...). Only when 'onAbsoluteDay'=true. 1-12 |
| onAbsoluteDay | Boolean | true=Repeat on a specific month & day, false=Repeat on a relative month & day. |
| relativeDay | Number | Relative day of month to run on (1=First, 2=Second, 3=Third, 4=Forth, 5=Last). Only when 'onAbsoluteDay'=false. 1-5 |
| relativeWeekday | Number | Relative weekday of month to run on (1=Sun, 2=Mon, 3=Tue, 4=Wed, 5=Thu, 6=Fri, 7=Sat). Used together with 'relativeDay'. Only when 'onAbsoluteDay'=false. 1-7 |
reportoptional | Object | Object containing the report setup. Needed for simulating reporting period for recurrent reports. |
| period | Object | The reporting period setup. |
| absoluteDates | Boolean | true=Absolute dates, false=Relative dates. Only used for recurrent reports. |
| from | Datetime | Reporting period start. |
| increment | Boolean | true=Increment a fixed period each time, false=Increment an offset depending on execution date vs setup date. Only used for recurrent reports. |
| offsetAmount | Number | Nr of units to adjust with. Used together with 'offsetUnit'. Only for recurrent reports. |
| offsetUnit | Number | Increment unit. 1=Days/Today, 2=Weeks/This week, 3=Months/This month, 4=This quarter, 5=Running year. Only used for recurrent reports, where values 4 & 5 are only valid when 'absoluteDates'=false. 1-5 |
| to | Datetime | Reporting period end. |
Request example:
HTTP/1.1 200 OK{"request": {"data": {"job": {"jobNo": 1944,"recurrence": {"repeatUnit": 1,"time": 0,"start": "2017-07-18","end": 1,"daily": {"every": 1,"calendarDays": false}}}}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| executions | Object[] | Priview data. |
| nextRun | Date | Date and time of next execution. |
| no | Number | Execution number. |
periodFromoptional | Date | Reporting period start as date-time. Only for ProReport jobs. |
periodTooptional | Date | Reporting period end as date-time. Only for ProReport jobs. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"executions": [{"no": 1,"nextRun": "2017-09-06T00:00:00.000","periodFrom": "2017-08-19T23:00:00.000","periodTo": "2017-09-18T22:59:59.000"},{"no": 2,"nextRun": "2017-09-07T00:00:00.000","periodFrom": "2017-08-20T23:00:00.000","periodTo": "2017-09-19T22:59:59.000"}]}}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |