Update: Oct 2019. Certification Campaigns can be easily managed using the SailPoint IdentityNow PowerShell Module.
This is the first post in a series covering SailPoint IdentityNow Certifications. Specifically listing and returning campaigns, creating campaigns and accessing campaign reports. This post will show Listing Active and Completed Campaigns, Searching for a specific Campaign and returning the full details for a Campaign.
The IdentityNow v1 API’s and v2 API’s don’t expose endpoints for IdentityNow Certification Campaigns so access will be via the non-public/versioned Certification API’s. In order to access these API’s you will need to be appropriately authenticated. This post here details getting up to speed with that and is a prerequisite for performing the campaign functions I detail in this post.
Retrieving Certification Campaigns
Now that you’re authorized to IdentityNow we can look to retrieve Certification Campaigns. This can be achieved by calling the /campaign/list API.
https://$($orgName).api.identitynow.com/cc/api/campaign/list
# List Campaign Base URI $GetCampaignBaseURI = "https://$($orgName).api.identitynow.com/cc/api/campaign/list" $IDN.Headers.Remove("Content-Type") $utime = [int][double]::Parse((Get-Date -UFormat %s)) $completedOnly = $false $campaigns = 100 # Get Active Campaigns $existingCampaigns=Invoke-RestMethod-method Get -uri "$($GetCampaignBaseURI)?_dc=$($utime)&completedOnly=$($completedOnly)&start=0&limit=$($campaigns)"-WebSession $IDN
Iterating through each result and outputting a summary to the console is then possible as shown below.
To retrieve an individual Campaign you need to know the ID of the Campaign. You can then retrieve it directly using the campaign/getCertifications API e.g.
https://$($orgName).api.identitynow.com/cc/api/campaign/getCertifications?_dc=1542094205212&campaignId=2c9180856708ae38016709f4812345c3
$IDN.Headers.Remove("Content-Type") $utime = [int][double]::Parse((Get-Date -UFormat %s)) $campaignID = "2c9180856708ae38016709f4812345c3" $Certs=Invoke-RestMethod-method get -Uri "https://$($orgName).api.identitynow.com/cc/api/campaign/getCertifications?_dc=$($utime)&campaignId=$($campaignID)"-websession $IDN $Certs.items
Searching for Certifications
$completedOnly = $true $existingCampaigns = Invoke-RestMethod -method Get -uri "$($GetCampaignBaseURI)?_dc=$($utime)&completedOnly=$($completedOnly)&start=0&limit=$($campaigns)" -WebSession $IDN $myCampaign = $existingCampaigns.items | Select-Object | Where-Object {$_.name -like "*Dec 2018 Campaign*"}
Searching and returning campaigns and then retrieving the full details for a campaign therefore looks like this in PowerShell.
$myCampaignFull=Invoke-RestMethod-method get -Uri "https://$($orgName).api.identitynow.com/cc/api/campaign/getCertifications?_dc=$($utime)&campaignId=$($myCampaign.id)"-websession $IDN $myCampaignFull.items