Hello,
I am working on a requirement to an trigger automated on demand synthetic execution via powershell, invoke method works perfectly fine but I am struggling with request body where I need to change the “monitor id” based on a variable.
Rest API request invoke body
{
“failOnPerformanceIssue”: false,
“monitors”: [
{
“executionCount”: 1,
“monitorId”: “SYNTHETIC_TEST-0200ECC670458A61”,
“repeatMode”: “SEQUENTIAL”
}
],
“processingMode”: “STANDARD”,
“takeScreenshotsOnSuccess”: true
}
Invoke-RestMethod -Uri “https://{environmentid}.live.dynatrace.com/api/v2/synthetic/executions/batch” -Method Post -Body $json -Headers $headers
Any suggestions/solutions will help