Can we get all active campaign reviewers report

What have you tried?

We tried in postman API to call the same but we are getting each campaign base but not all active campaigns, we do have around 130+ active campaigns and we need one report to show which campaign is active and their reviewers.

What errors did you face (share screenshots)?

Getting for single campaign report not all active

Share the details of your efforts (code / search query, workflow json etc.)?

{baseurl}/v2024/certifications/:ID/reviewers

What is the result you are getting and what were you expecting?

Getting results for one campaign which ID as input, but we are looking for all active campaign reports with the status and reviewers details, in our case we do have around 130+ campaings running every quarter and each time we do facing lot of challenges to get these reports.

You can achieve this using the PowerShell SDK

Here is a sample script I came up with

$reportOutput = @()
$campaignfilter = "status eq `"ACTIVE`""

$campaigns = Invoke-Paginate  -Function "Get-ActiveCampaigns" -InitialOffset 0 -Limit 10000 -Increment 250 -Parameters @{"Filter" = $campaignfilter}
foreach ($campaign in $campaigns) {
    $certs = Invoke-Paginate  -Function "Get-IdentityCertifications" -InitialOffset 0 -Limit 10000 -Increment 250 -Parameters @{"Filters"  ="campaign.id eq `"$($campaign.id)`""}
    foreach ($cert in $certs) {
        $reportObject = [PSCustomObject]@{
            CampaignName = $campaign.name
            ReviewerName = $cert.reviewer.name
            DecisionsTotal = $cert.decisionsTotal
            DecisionsMade = $cert.decisionsMade
        }
        $reportOutput += $reportObject
    }
}
$reportOutput | Sort-Object CampaignName,ReviewerName

Here is a sample of the output

2 Likes