Query in run campaign report API

Hi There,

When I run API for “run campaign report” I am seeing “202 accepted message”, but not seeing any reports getting generated . Where can I see the report?

API : https://corpnet4-dev.api.identitynow.com/v3/campaigns/xxxxxxxxxxxxxxxxxxxxxx/run-report/CAMPAIGN_STATUS_REPORT

Thanks,
Harish G

Hi @harishhaleon , I believe it takes some time to generate report depending upon the data it processes. Did you check there later after some time?

Hi Harish,
There are 2 api methods

POST is to execute report and GET results.

This won’t actually download the reports like you do in the UI, it just refreshes them or gets the metadata for them. I am assuming that @harishhaleon would like the actual csv or pdf report, but that’s not 100%

If OP wants to download the reports to a file, they can use the PowerShell SDK to do so

Hi Mark,
As far as I see the powershell you shared is using cc method which seems to be not in collection anymore. However in v3 api you have get report file method if needed.

Looks like I might need to update my linked post

@kjakubiak - What should I need to give in taskResultId field? How to fetch it?

Get it from this API get-campaign-reports | SailPoint Developer Community
the result ID is the taskResultId

To download a campaign report after you run the campaign report, follow this process.

  1. Use get-campaign-reports | SailPoint Developer Community to get the ID of one of the reports generated for the campaign. You will use the ID of the campaign that you used to run the report in the URL of this GET request. This will show you all of the reports generated for that campaign, and you will need to note the ID of the report that was most recently run.
  2. Use get-report-result | SailPoint Developer Community to check the status of the report. You will provide the report ID you obtained from step 1 in the URL of this endpoint. The report status must be complete before you can download it.
  3. Download the CSV report using get-report | SailPoint Developer Community using a request like this: curl --location 'https://devrel.api.identitynow.com/v3/reports/2c9180857d2eb81b017d33432b4f7de9?fileFormat=csv' \ --header 'Accept: application/csv' where the ID in this URL is the report ID obtained in step 1.
1 Like