Calling the /build API from PostMan

Greetings

  1. Am in busy investigating the use of Jenkins. I will be using other software to control the build (pipeline) via the API URL.
  2. I am a newbie
  3. I have created an API key and added to the project
  4. I am testing the URL access using PostMan
  5. I am using the following POST request http://------/job/—/build?token=api_token. That is the name of the token in the user account section. This example code was taken from the job tab. Even if I put the key I get the same result
  6. I am getting a 403 return code and in the body it says:
    HTTP ERROR 403 No valid crumb was included in the request
  7. I know it is not a Jenkins issue however it would appear that in the excellent Jenkins doc that discusses the API a step or so have been left out (Remote Access API)

What I need is a HTTP Post Example (the doc provide a curl example).

Regards

The token from a user must be used in a different way. It is used like a password so you need to create a basic authentication in postman with the token. You will also not need a crumb in the request when you use a token
Using curl it would look like this:
curl -XPOST -u username:api_token http://.../jobname/build when the job is without parameters.
The approach with Build build?token=token is deprecated and shouldn’t be used anymore.

Greetings

As simple as that, very thanks

Regards