Skip to content

curl examples are out of date #19

@li-afaris

Description

@li-afaris

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 'file=@myproject.zip;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 "file=@azk.zip;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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions