Skip to content

Instantly share code, notes, and snippets.

View PathriK's full-sized avatar

Keerthi Kumar P PathriK

View GitHub Profile
$token = $env:API_TOKEN #should be defined as scure variable
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$apiURL = "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG"
$history = Invoke-RestMethod -Uri "$apiURL/history?recordsNumber=2" -Headers $headers -Method Get