BAQ rest api

Hello Team,
i call Ice.RPT.BAQReportSvc/SubmitToAgent to submit a baq ssrs report.
below is the input string. but when I look at the system monitor and i got root element is missing error message.
i did not know what I missed.
thanks,

Eddy

{
  "ds": {
    "BAQReportParam": [
      {
        "BAQID": "PaymentRemittance",
        "Summary": false,
        "BAQRptID": "PayRemit",
        "ReportID": "PayRemit",
        "Option01": "123456",
        "Option02": "1",
        "SysRowID": "00000000-0000-0000-0000-000000000000",
        "AutoAction": "SSRSPREVIEW",
        "AgentSchedNum": 0,
        "AgentID": "SystemTaskAgent",
        "ReportStyleNum": 1,
        "WorkstationID": "Workstation 123",
        "ArchiveCode": 7,
        "ReportCurrencyCode": "USD",
        "ReportCultureCode": "en-US",
        "SSRSRenderFormat": "PDF",
        "RowMod": "A"
      }
    ]
  },
  "agentID": "SystemTaskAgent",
  "agentSchedNum": 0,
  "agentTaskNum": 0,
  "maintProgram": "Ice.UIRpt.BAQReport;PayRemit"
}

A while back I shared a function that spits out a BAQ Report. It’s single parameter (though that shouldn’t be hard to tweak) and is meant to be called from within a session (you’d have to build a session, which also isn’t too bad). Either way, a function is much easier to manage from a REST call than calling the BO’s directly.

https://www.epiusers.help/t/lets-share-useful-functions-sharing-is-caring/100371/20?u=jtownsend

1 Like

I assume that you don’t have the “fancy quotes” in your JSON as it shows here.

His text was correct, it just wasn’t in the code block thing. I fixed that for him.

I had to ask. The “Missing Root” element can happen when there are no quotes. :person_shrugging:

1 Like

Hello Team,
what is the “fancy quotes”, can you please show it to me in the text I provides.

thanks a lot,

Eddy

Notice how the quotes above are not the same. In our code however, there is only one kind of quote.

"

Word, this forum, and other programs will automatically use fancy quotes to make things look, well, fancy. This is why we ask people to put code in a code block. You can do this by entering three back-ticks in a row ``` on a line by itself:

    ```
    My Code
    ```
1 Like

If you are on hosted servers, it could be the “WorkstationID” failing this out.

image

When I built a function for printing some production labels, the workstation had to be set to “web_” + The current user’s ID.

1 Like