How to stop a build from Unix CLI using Jenkins REST API without specifying username/password credentials on command line, but using a build token?
Asked
Active
Viewed 1,220 times
1 Answers
0
Unfortunately, you can't.
From @JesseGlick's comment:
And
tokenis only available forbuild(andbuildWithParametersandpoll). It cannot be used on any other REST APIs. In general you should use BASIC authentication with API tokens.
The answer from How to stop a build in Jenkins via the REST api ? claims you could stop/cancel a build with a token, but you'll find that the tokenized request (and no credentials) will redirect you to a login URL.
Community
- 1
- 1