Jenkins: "HTTP ERROR 400 Nothing is submitted" / "This page expects a form submission"
The job has parameters, so its /build address expects the form that the job's web page sends, not a plain POST. Jenkins refuses with HTTP 400. Send the request to /buildWithParameters instead, with the parameters as query or form fields; any you leave out take their default values.
The whole answer
What Jenkins 2.580.1 answered on October 24, 2026, signed in with an API token, for a job with one string parameter:
curl -X POST -u '<user>:<api-token>' 'https://jenkins.example.com/job/<job>/build' HTTP 400 HTTP ERROR 400 Nothing is submitted URI:/job/<job>/build STATUS:400 MESSAGE:Nothing is submitted SERVLET:Stapler
- The same POST with anything in it, such as
?delay=0secor the parameters themselves (/build?GREETING=hi, orGREETING=hias a form field), got HTTP 400 "This page expects a form submission" instead. Which of the two you see depends only on whether the request carried any fields: Jenkins' web framework, Stapler, sends "Nothing is submitted" when there are none. - It is not a permission or crumb problem: the same token started the same job through
/buildWithParameters, and a job without parameters through/build.
Start it with buildWithParameters
curl -X POST -u '<user>:<api-token>' \ 'https://jenkins.example.com/job/<job>/buildWithParameters?GREETING=hi' HTTP 201 Location: https://jenkins.example.com/queue/item/<n>/
- The parameters work as query fields or as form fields (
--data-urlencode 'GREETING=hi'). A parameter left out took its default value: with none at all, the build ran with the default. - The
Locationheader is the build's place in the queue; once it starts,/queue/item/<n>/api/jsonnames the build underexecutable(its number and address). - Use POST. A GET on
/buildWithParametersgot HTTP 405 "This URL requires POST". - With an API token, Jenkins asked for no CSRF crumb ("No valid crumb was included in the request" covers the case where it does).
With the Jenkins CLI, -p passes a parameter, -s waits for the build and -v prints its console:
java -jar jenkins-cli.jar -s https://jenkins.example.com/ -http -auth @auth.txt \ build <job> -p GREETING=hi -s -v
auth.txt holds <user>:<api-token>.
The opposite: "… is not parameterized"
/buildWithParameters on a job without parameters got HTTP 400 "<job> is not parameterized", and the CLI said "ERROR: <job> is not parameterized but the -p option was specified." Use /build for those jobs. A script that starts many jobs can read /job/<job>/api/json first: a job with parameters lists them under ParametersDefinitionProperty in property.
Build with parameters from IntelliJ IDEA
Pipeline Inbox for Jenkins, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, starts a job with parameters through buildWithParameters and one without through /build. Its Build Now dialog has a field for each parameter (text, choice, checkbox, password) with the defaults filled in, and can remember the values per job (never passwords). Rebuild repeats a build with the same parameters. Building, rebuilding, stopping and input steps are Pro (US$1.50 a month, with a 30-day trial); the build list and console logs are free.
Jenkins® is a registered trademark of LF Charities Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by the Jenkins project or JetBrains.
More: "Waiting for next available executor" · Jenkins plugins for IntelliJ IDEA compared · 日本語