Last active
October 27, 2016 12:32
-
-
Save scottcowan/3aff2fa957a0a75fa4bd48960fb1257c to your computer and use it in GitHub Desktop.
VSTS Queue a build
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
#In VSTS set Options > Allow Scripts to Access OAuth Token or you'll get an error | |
invoke-webrequest | |
-Method POST | |
https://<your site>/DefaultCollection/Digital%20Apprenticeship%20Service/_apis/build/builds?api-version=2.0 | |
-Body "{'definition':{'id': 1}}" | |
-headers @{"Authorization"="Bearer $(System.AccessToken)"} | |
-usebasicparsing | |
-ContentType "application/json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment