cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reports Generation API

PerforsN
Participant
0 Likes
628

While the documentation does mention that it is possible to run a "Reports Generation" pipeline over the API, the required value for `stageTypeSeq` is not listed. I found the used value by running said pipeline from the UI listing the running pipeline over the API. Hoever, when I send the same, it returns status 400 - as if the service is not available.

Accepted Solutions (1)

Accepted Solutions (1)

Yogananda
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi perforsn
I agree there is no Seq mentioned for stageTypeseq in API Documentation for Reports...

you can do query from database to find the list of stageTypeSeqs to find out ...

select * from cs_stagetype
Yogananda
Product and Topic Expert
Product and Topic Expert

since you might received 404 due to incorrect payload sent....

I will share here my sample payload you can try for your tenant : VFNL and change the values remove those <------------- (lines)

[
   {
      "defer":false,
      "processingUnitSeq":"38280596832649221",  <------change here
      "stageTypeSeq":"21673573206720698",
      "boGroupsList":[
         "VFNL Compensation Reports Admin Group - <PU NAME>" ----<change here
      ],
      "traceLevel":"status",
      "removeStaleResults":false,
      "reportTypeName":"Crystal",
      "userId":"Administrator",
      "odsReportList":[
         "<Report Name 1>",      <-------change here
         "<Report Name 2>"       <-------change here
      ],
      "command":"PipelineRun",
      "runMode":"full",
      "runStats":false,
      "onDemand":false,
      "generateODSReports":true,
      "isMergePDF":false,
      "reportFormatsList":[
         "native"
      ],
      "stopAllOnError":true,
      "calendarSeq":"2251799813685250",  <-------change here
      "periodSeq":"2533274790396409",   <-------change here
      "runETL":false,
      "allReportsAndGroups":false
   }
]

Answers (2)

Answers (2)

PerforsN
Participant
0 Likes

I had "Report", that didn't work. "Native" doesn't work either, it has to be "native". Same for "excel" and "pdf". Could someone update the docs?

PerforsN
Participant
0 Likes

Thanks yoganandamuthaiah
I don't have access to the DB unfortunately, but I copied your JSON and successfully ran it with my variables. I backtraced the error to `reportFormatsList`. The docs say "Valid values are: Report, Pdf, Excel", you had 'native'. the actual valid values are ["native", "excel", "pdf"].

Yogananda
Product and Topic Expert
Product and Topic Expert

Hi @perforsn

you can use any one of these below (with double quote)

[Report, Pdf, Excel, Native]