azkaban.github.io
azkaban.github.io copied to clipboard
curl examples are out of date
It was reported that this curl example for uploading a zip file no longer works with current versions of azkaban.
curl -k -i -H "Content-Type: multipart/mixed" -X POST --form 'session.id=12345abcd' --form 'ajax=upload' --form '[email protected];type=application/zip' --form 'project=MyProject;type/plain' https://localhost:8443/manager
This is what was required to make the upload work. Note the missing Content-Type
header.
curl -i -X POST \
--cookie "azkaban.browser.session.id=${TOKEN}" \
--form "project=index-scripts" \
--form "action=upload" \
--form "[email protected];type=application/zip" \
${AZKABAN_HOST}/manager
Additional notes from the slack conversation with pchesnais, where this was reported.
Adding the content-type header breaks the curl request
And the `ajax=upload` parameter is wrong, it's `action=upload`
Finally, many queries that work with `--cookie "azkaban.browser.session.id=..."` don't work with `--form "session.id=..."`
Again, probably due to the content-type header (edited)
I'm sure there's a simpler fix for the query that's currently on the documentation, but it definitely doesn't work out of the box (edited)