# Query in run campaign report API

**URL:** <https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052>\
**Category:** SHF Discussion and Questions\
**Tags:** reports, certifications, sailpoint-identity-security\
**Created:** [January 12, 2024, 11:23am UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052 "2024-01-12T11:23:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![harishhaleon](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@harishhaleon](https://developer.sailpoint.com/discuss/u/harishhaleon)\
**Post date:** [January 12, 2024, 11:23am UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/1 "2024-01-12T11:23:43Z")

</div>

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](https://corpnet4-dev.api.identitynow.com/v3/campaigns/xxxxxxxxxxxxxxxxxxxxxx/run-report/CAMPAIGN_STATUS_REPORT)

Thanks,  
Harish G

---

<div class="post-metadata">

**Author:** ![gauravsajwan1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gauravsajwan1/32/7856_2.png) [@gauravsajwan1](https://developer.sailpoint.com/discuss/u/gauravsajwan1)\
**Post date:** [January 12, 2024, 3:23pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/2 "2024-01-12T15:23:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kjakubiak](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kjakubiak/32/7052_2.png) [@kjakubiak](https://developer.sailpoint.com/discuss/u/kjakubiak)\
**Post date:** [January 12, 2024, 3:26pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/3 "2024-01-12T15:26:09Z")

</div>

Hi Harish,  
There are 2 api methods

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/3/3fa977422542b9e309256cfd2c18f829eb2c79dd.png)

POST is to execute report and GET results.

---

<div class="post-metadata">

**Author:** ![mcheek](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mcheek/32/23705_2.png) [@mcheek](https://developer.sailpoint.com/discuss/u/mcheek)\
**Post date:** [January 12, 2024, 4:31pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/4 "2024-01-12T16:31:39Z")

</div>

> [@kjakubiak](#):
>
> Hi Harish,  
> There are 2 api methods
> 
> ![image](https://global.discourse-cdn.com/sailpoint/original/2X/3/3fa977422542b9e309256cfd2c18f829eb2c79dd.png)
> 
> 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](https://developer.sailpoint.com/discuss/t/powershell-script-for-downloading-campaign-reports/20077) to do so

---

<div class="post-metadata">

**Author:** ![kjakubiak](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kjakubiak/32/7052_2.png) [@kjakubiak](https://developer.sailpoint.com/discuss/u/kjakubiak)\
**Post date:** [January 12, 2024, 5:03pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/5 "2024-01-12T17:03:50Z")

</div>

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.

 ![Screenshot_20240112_180214_Chrome](https://global.discourse-cdn.com/sailpoint/original/2X/5/5bf608d6d8ca1681d0d8155c264a2707b0d988fc.jpeg)

---

<div class="post-metadata">

**Author:** ![mcheek](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mcheek/32/23705_2.png) [@mcheek](https://developer.sailpoint.com/discuss/u/mcheek)\
**Post date:** [January 12, 2024, 5:21pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/6 "2024-01-12T17:21:09Z")

</div>

Looks like I might need to update my linked post

---

<div class="post-metadata">

**Author:** ![harishhaleon](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@harishhaleon](https://developer.sailpoint.com/discuss/u/harishhaleon)\
**Post date:** [January 15, 2024, 2:41pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/7 "2024-01-15T14:41:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [February 28, 2024, 5:32pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/9 "2024-02-28T17:32:57Z")

</div>

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

1. Use [get-campaign-reports | SailPoint Developer Community](https://developer.sailpoint.com/idn/api/v3/get-campaign-reports) 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](https://developer.sailpoint.com/idn/api/v3/get-report-result) 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](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' \ --header 'Accept: application/csv'` where the ID in this URL is the report ID obtained in step 1.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 28, 2024, 5:33pm UTC](https://developer.sailpoint.com/discuss/t/query-in-run-campaign-report-api/24052/10 "2024-04-28T17:33:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
