Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl examples are out of date #19

Open
li-afaris opened this issue May 24, 2018 · 0 comments
Open

curl examples are out of date #19

li-afaris opened this issue May 24, 2018 · 0 comments

Comments

@li-afaris
Copy link
Contributor

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)
@li-afaris li-afaris changed the title curl examples are out of date with Azkaban curl examples are out of date May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants