Skip to content

Instantly share code, notes, and snippets.

@chelnak
Created February 24, 2016 15:30
Show Gist options
  • Select an option

  • Save chelnak/200b73bf5795d1191b16 to your computer and use it in GitHub Desktop.

Select an option

Save chelnak/200b73bf5795d1191b16 to your computer and use it in GitHub Desktop.
Example of interacting with the control center action "Cancel all tokens of a workflow" in vRO
<#
Cancel all tokens of a workflow or a list of specific workflow tokens
Example body
{
"tokenIds" : [],
"workflowId" : "f75459b7-128d-4ff0-ad99-b9d454307eeb"
}
#>
$WorkflowId = "f75459b7-128d-4ff0-ad99-b9d454307eeb"
$Uri = "https://[yourvroserver]:8283/vco-controlcenter/api/server/cancel-workflows"
$Body = @"
{
"workflowId" : "$($WorkflowId)"
}
"@
Invoke-RestMethod -Method POST -Uri $URI -Headers @{"Content-Type" = "application/json";} -Body $Body -Credential (Get-Credential $null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment