also createItem api does this
it also gives you a redirect so if i do a post like this:
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> :method: POST
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> :scheme: https
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> :authority: xxxx
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> :path: /createItem?name=sandbox_C253ZR_NONE&mode=copy&from=salesDemo_DEV
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> content-type: application/json
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> accept: application/json
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> jenkins-crumb: XXXX
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> user-agent: Apache-HttpAsyncClient/5.1.2 (Java/17.0.4)
DEBUG org.apache.hc.client5.http.headers - c-0000000001 >> authorization: XXXX
then i don't get right away 200 back but a redirect to a pure UI page
(and i did set that i only accept application/json (or xml which also doesn't matter)
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << :status: 302
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << date: Wed, 05 Oct 2022 09:30:13 GMT
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << x-content-type-options: nosniff
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << location: https://XXXXXXX/job/sandbox_C253ZR_NONE/configure
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << content-length: 0
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << server: Jetty(10.0.11)
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << strict-transport-security: max-age=31536000
DEBUG org.apache.hc.client5.http.headers - c-0000000001 << set-cookie: INGRESSCOOKIE=XXXXX path=/; HttpOnly; Secure
that really doesn't look ok, if i use REST and i set the right accept then it shouldn't redirect me to a UI page.
This really looks like a createJob done through the ui
This seems to happen when building a "Pipeline" build. For normal builds, this does not occur.