Last active
March 29, 2019 08:31
-
-
Save IlyaFinkelshteyn/fca312491c2363625095cbc7c5f80ab9 to your computer and use it in GitHub Desktop.
This file contains 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
PowerShell sample: | |
$token = "" # token from https://ci.appveyor.com/api-token | |
$accountName = "" # account name from project IRL (after project/") | |
$projectSlug = "" # project slug from project IRL (after account) | |
$headers = @{ | |
"Authorization" = "Bearer $token" | |
"Content-type" = "application/json" | |
} | |
Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/$accountName/$projectSlug/buildcache" -Headers $headers -Method DELETE | |
Curl sample: | |
set token="" | |
set accountName="" | |
set projectSlug="" | |
curl -X "DELETE" "https://ci.appveyor.com/api/projects/%accountName%/%projectSlug%/buildcache" -H "Content-type: application/json" -H "Authorization: Bearer %token%" --insecure |
And in the cURL example the variables must be defined without set
and expanded via $
, not %...%
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small remark, the URL should be https://ci.appveyor.com/api-keys instead of https://ci.appveyor.com/api-token.