Last active
February 11, 2016 17:03
-
-
Save ryanhoskin/786c6b7b9df6d7373cec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pd_headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$pd_headers.Add("Authorization", 'Token token=<rest_api_token>') | |
$pd_url = "https://<subdomain>.pagerduty.com/api/v1" | |
$requester_id = "<requester_id>" | |
$incident_id = "<incident_id>" | |
$duration = "900" //in seconds | |
$data = @{ | |
requester_id="$requester_id" | |
duration="$duration" | |
} | |
$json = $data | ConvertTo-Json | |
Invoke-RestMethod -Uri "$pd_url/incidents/$incident_id/snooze" -Headers $pd_headers -Method Put -Body $json -ContentType application/json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment