Trigger a parameterized Jenkins job via POST /job/<name>/buildWithParameters with API-token Basic auth

domain: www.jenkins.io · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. POST to JENKINS_URL/job/JOB_NAME/buildWithParameters with each build parameter as form data, authenticating with --user USER:TOKEN.
  2. Example (string parameters): curl JENKINS_URL/job/JOB_NAME/buildWithParameters --user USER:TOKEN --data id=123 --data verbosity=high
  3. For a file parameter, use --form instead of --data: curl JENKINS_URL/job/JOB_NAME/buildWithParameters --user USER:TOKEN --form FILE_LOCATION_AS_SET_IN_JENKINS=@PATH_TO_FILE
  4. Authenticate with an API token rather than a session, so no CSRF crumb needs to be fetched or attached to this POST.
  5. For a job inside a folder, the path needs a /job/ segment per folder level: JENKINS_URL/job/FOLDER/job/JOB_NAME/buildWithParameters.
  6. Docs: https://www.jenkins.io/doc/book/using/remote-access-api/

Known gotchas

Related routes

Trigger a Jenkins build remotely using a build token and CSRF crumb
www.jenkins.io/doc · 5 steps · unrated
Trigger a Bitbucket Pipelines build via the Pipelines API
developer.atlassian.com/cloud/bitbucket · 5 steps · unrated
Trigger a GitLab pipeline via pipeline trigger token API
docs.gitlab.com · 5 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans