• This topic has 0 replies, 1 voice, and was last updated July 14, 2021 by Michael S.

Is this the correct process to change VPG via API

  • The following code completes without error, but it doesn’t do anything either. Is this even the correct process to change the journal history in an existing VPG?

    write-host “#1. Get Identifier to use in VPG settings object”
    $VPGSettingsIdentifierUrl = $BaseURL+”vpgsettings”
    $VPGSettingsIdentifier = Invoke-RestMethod -Method POST -Uri $VPGSettingsIdentifierUrl -Body $JSONIdentifier -Headers $ZertoSessionHeader -ContentType $Type

    write-host “#2. Get VPG Settings”
    $VPGSettingsUrl = $BaseURL+”vpgsettings/”+$VPGSettingsIdentifier
    $VPGSettings = Invoke-RestMethod -Method GET -Uri $VPGSettingsUrl -Headers $ZertoSessionHeader -ContentType $Type

    write-host “#3. Change Journal History Setting”

    $VPGBasicSettingsUrl = $BaseURL+”vpgsettings/”+$VPGSettingsIdentifier+”/basic”
    $VPGBasicSettings = Invoke-RestMethod -Method PUT -Uri $VPGBasicSettingsUrl -Body $JSONBasicSettings -Headers $ZertoSessionHeader -ContentType $Type

    write-host “#4. Commit new VPG Settings”
    $VPGSettingsCommitUrl = $BaseURL+”vpgsettings/”+$VPGSettingsIdentifier+”/commit”
    $VPGSettingsCommit = Invoke-RestMethod -Method POST -Uri $VPGSettingsCommitUrl -Headers $ZertoSessionHeader -ContentType $Type

You must be logged in to create new topics. Click here to login