0

To get list of the application objects using Rest APIs

Hi- I am trying to get the list of all applications objects so that i can disable them using rest APIs (Config/WriteDn) and only keep the objects/consumers enable that are fully automated.

Below is my powershell code snippet however not able to figure out how to make objectDN dynamic. For static value, code works fine.

$ServerUrl ="https://venafi/vedsdk"

$PDN= @{
ObjectDN= "\\VED\\Policy\\Certificates\\Test\\$cert_list"
AttributeName="Consumers"
} | ConvertTo-Json

$certData = $null $certData = Invoke-RestMethod `
-Uri ($ServerUrl + "/config/Read") `
-Body $PDN `
-Method POST `
-ContentType 'application/json' ` -Headers @{"X-Venafi-Api-Key"=$TppSession.APIKey}

 $certData.values

 

1 comment

Please sign in to leave a comment.