Download the CSV report using the taskResultId from step 3 in this endpoint. https://developer.sailpoint.com/idn/api/v3/get-report using a request like this: curl --location 'https://devrel.api.identitynow.com/v3/reports/2c9180857d2eb81b017d33432b4f7de9?fileFormat=csv'
I’m getting an error while running the above API to fetch Campaign Status Report, the error says → api_get': undefined local variable or method reportId’ for main:Object (NameError)
if (stringUrl.index(“/v3/reports/#{reportId}?format=csv”))
I’m trying to download the campaign reports in pdf format and this method above doesn’t work. The report is not the result of a task - so there’s no task ID to plug into the get-report-result or get-report endpoint. When I tried plugging in the campaign or the individual report IDs, I get the response “error”:“no message available”.
I can download the PDF from the front-end and have tried to use developer console to figure out what is being called there, but it opens in a pop-up window and the endpoint isn’t available in any way I can see.
I’m not sure if anyone can do it any other way, but when trying to write campaign reports to a file, I cannot use the get-reports cmdlet and have to use invoke-restmethod so that I can use the -outfile parameter to get the file to write properly.