0

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?

CSchulz
  • 10,882
  • 11
  • 60
  • 114
SBA
  • 1
  • 2

1 Answers1

0

Unfortunately, you can't.

From @JesseGlick's comment:

And token is only available for build (and buildWithParameters and poll). 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