Skip to content

Instantly share code, notes, and snippets.

@JLogan3o13
Last active September 6, 2022 16:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Search for bot in CR
$sessionHeader = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$sessionHeader.Add('x-Authorization', $Response.token)
$sessionHeader.Add('accept', 'application/json')
$type = "application/json"
$body = @{
'filter' = @{
'operator' = "substring"
'field' = "name"
'value' = "<name of bot to search for>"
}
}
$bodyJson = $body | ConvertTo-Json
$Response = Invoke-RestMethod -Method Post -Uri $URL -Body $bodyJson -Headers $sessionHeader -ContentType $type
$Response.list | Out-GridView
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment