ProReport - Run report

API Url

Used for generating a new report according to the report setup. When report has finished, it will return the instance id so that it can be opened in the Report Viewer.

POST
http://localhost:16010/ProMarkREST/rest/ProReport/reports/{id}/instances

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    exportObject

The post-processing setup (export options). Not used for 'Now online' reports.

      formatNumber

Export document format (0=None, 14=Word, 31=PDF, 901=CSV).

Allowed values:01431901
      saveToString

Location on disk where export file can be saved. This needs to be accessible to the reporting server! Only when 'format' > 0.

      sendToString

List of e-mails to send report to. Only when 'format' > 0.

    filtersObject[]

Contains all the filters that need to be applied.

      fieldsObject[]

Selected filter fields.

        conditionString

Condition identifier.

        fieldIdString

Field identifier.

        valuesString[]

List of selected values.

      idNumber

Unique filter identifier.

      levelNumber

Filter level (0=System, 1=User profile, 2=Personal).

Size range: 0-2
      nameString

Name of the filter.

      optionsObject[]

Selected filter options.

        idString

Option identifier.

        valueString

Option value.

      typeNumber

Filter type (1=Employee, 2=Reason, 3=Account, 4=ProJect, 5=Order/Operation, 6=Workcenter, 7=Terminal).

Size range: 1-7
    periodObject

The reporting period setup.

      absoluteDatesBoolean

true=Absolute dates, false=Relative dates. Only used for recurrent reports.

      balanceTypeNumber

Period type (1=Latest closed period, 2=Start of first open period, 3=Oldest open period, 4=Current period, 5=A given cutoff time, 6=Current and future periods)

Size range: 1-5
      fromDatetime

Reporting period start.

      incrementBoolean

true=Increment a fixed period each time, false=Increment an offset depending on execution date vs setup date. Only used for recurrent reports.

      offsetAmountNumber

Nr of units to adjust with. Used together with 'offsetUnit'. Only for recurrent reports.

      offsetUnitNumber

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.

Size range: 1-5
      toDatetime

Reporting period end.

      useTQValuesBoolean

Flag for using period values vs current values when filtering data.

    recurrenceObject

The recurrence setup. Only for 'Recurrent' reports.

      dailyObject

Setup for daily executions.

        calendarDaysBoolean

Daily execution should be only in calendar days (true=Calendar days, false=Working days).

        everyNumber

Repeat every X days.

      monthlyObject

Setup for monthly executions.

        absoluteDayNumber

Day of month to run on. Only when 'onAbsoluteDay'=true.

Size range: 1-31
        everyNumber

Repeat every X months.

        onAbsoluteDayBoolean

true=Repeat on a specific day, false=Repeat on a relative day.

        relativeDayNumber

Relative day of month to run on (1=First, 2=Second, 3=Third, 4=Forth, 5=Last). Only when 'onAbsoluteDay'=false.

Size range: 1-5
        relativeWeekdayNumber

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.

Size range: 1-7
      repeatUnitNumber

Repeat execution (1=Daily, 2=Weekly, 3=Monthly, 4=Yearly).

      startDate

First day of recurrence.

      timeNumber

Time of day when report needs to be executed, expressed in seconds from midnight.

      weeklyObject

Setup for weekly executions.

        everyNumber

Repeat every X weeks.

        weekDaysBoolean

Weekdays when report is to be executed, starting with Sunday.

Size range: 7
      yearlyObject

Setup for yearly executions.

        absoluteDayNumber

Day of month to run on. Used together with 'month'. Only when 'onAbsoluteDay'=true.

Size range: 1-31
        monthNumber

Month of year when to run the report (1=Jan, 2=Feb, 3=Mar ...). Only when 'onAbsoluteDay'=true.

Size range: 1-12
        onAbsoluteDayBoolean

true=Repeat on a specific month & day, false=Repeat on a relative month & day.

        relativeDayNumber

Relative day of month to run on (1=First, 2=Second, 3=Third, 4=Forth, 5=Last). Only when 'onAbsoluteDay'=false.

Size range: 1-5
        relativeWeekdayNumber

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.

Size range: 1-7
    settingsObject

Basic report settings.

      descriptionString

Report description. Can be anything.

      executeNumber

Execution type (1=Now online, 2=Now via Job Scheduler, 3=Later via Job Scheduler, 4=Recurrent).

Size range: 1-4
      executionTimeDatetime

Delayed execution time. Only for 'Later via Job Scheduler'.

      expiryDate

Date when report will stop being available.

      notificationBoolean

Send notification when report has finished. Not valid for 'Now online'.

Path parameters

FieldTypeDescription
idString

Report unique identifier.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    canRenderBoolean

Indicates whether the report can be rendered. This value is always false for Excel export and Predefined host transaction report types. For standard reports, it is false if the report exceeds the size limit.

    fileIdString

Unique report file identifier. Use for opening the report. If empty, then report was not executed and is scheduled for a delayed execution.

    instanceIdNumber

Unique identifier of the report instance. Used for saving the report into the repository.

    statusMessageString

Message with execution status.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"instanceId": 1234567890,
"fileId": "",
"statusMessage": "The report was sent to the Job Scheduler."
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"errorCode": 285,
"errorMessage": "The report was not found. Maybe it was deleted by another user."
}
}