How can a Jenkins user authentication details be "passed" to a script which uses Jenkins API to create jobs?
With Jenkins CLI you do not have to reload everything - you just can load the job (update-job command). You can't use tokens with CLI, AFAIK - you have to use password or password file.
Token name for user can be obtained via
http://<jenkins-server>/user/<username>/configure
- push on 'Show API token' button.Here's a link on how to use API tokens (it uses
wget
, butcurl
is very similar).