List Campaign API Filters with Date Range

Hi All,
The questions is regarding ISC APIs’, the requirement is to fetch certification campaigns with in a date range to generate Re-assignment history custom report via a power shell. But as per the API doc https://developer.sailpoint.com/docs/api/v3/list-identity-certifications/, the filters does not support any date range. Does any one help me on this feasibility?

cheers,

VJ

Hi @Hanushma

You’re correct that the List Identity Certifications API does not support date range filtering. The available filter fields are limited.

Workaround for Your PowerShell Report

Since direct date range filtering isn’t available via the API, here’s a recommended approach for your PowerShell script:

Step 1: Retrieve all campaigns and filter by date

# Get all campaigns sorted by created date
$campaigns = Get-ActiveCampaigns -Sorters "created"

# Filter campaigns by date range in PowerShell
$startDate = Get-Date "2024-01-01"
$endDate = Get-Date "2024-12-31"

$filteredCampaigns = $campaigns | Where-Object {
    $campaignDate = [DateTime]$_.created
    $campaignDate -ge $startDate -and $campaignDate -le $endDate
}

Step 2: Retrieve certifications for each campaign

foreach ($campaign in $filteredCampaigns) {
    $certifications = Get-IdentityCertifications -Filters "campaign.id eq `"$($campaign.id)`""
    # Process certifications and extract reassignment history
}

Step 3: Extract reassignment data

The certification response objects should contain reviewer information and history that you can use to build your reassignment report.

Thanks
Sid

Thank You Sid for your Swift response.

Hi Sid,

When trying to run the APi with sorts as Created in Postman it gives error, looks like that is not supported either?

@Hanushma

Apologies for the oversight. I just checked the API docs again.

You’re right the API does not support sorting by the created date.

Workaround

Since the API cannot filter or sort by date:

  1. Retrieve all campaigns from the API
  2. Filter and sort them by date in PowerShell

Example:

$allCampaigns = Get-Campaigns

$startDate = [DateTime]"2024-01-01"
$endDate = [DateTime]"2024-12-31"

$filteredCampaigns = $allCampaigns | 
Where-Object { 
    $campaignDate = [DateTime]$_.created
    $campaignDate -ge $startDate -and $campaignDate -le $endDate 
} | 
Sort-Object created -Descending

Thank You for the workaround.

Cheers,

VJ