Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Job import only accepts multipart/form-data, but docs say application/x-www-form-urlencoded.

#246

Sending an XML job via POST application/x-www-form-urlencoded:
ie: xmlBatch=%3Cjob%3E%0A++++%3Cname%3ESample+Job%3C%2Fname%3E%0A++++%3Cgroup%3Eadmins%3C%2Fgroup%3E%0A++++%3Cproject%3EHC%3C%2Fproject%3E%0A++++%3Cerror%3ETest+Error+message%3C%2Ferror%3E+%0A%3C%2Fjob%3E%0A%0A

Results in The input was not the expected content type

But changing the content type and encoding to multipart/form-data, ie:
POST DATA:

Results in 15My Special JobHC/cmdcenter/job/show/15

Using Python urllib2, passing cookie.

From gschueler:

[16:52] ameier: it is expecting a multipart request [16:53] i.e. Content-type: multipart/form-data [16:56] i see the docs specify "application/x-www-form-urlencoded" .... i think that is wrong [16:56] however that should definitely be supported.
[16:56] ameier: can you file this as a bug?

Reported by aaron.meier · March 23rd, 2011 @ 08:01 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Alex-SF
    Alex-SF
    • Milestone set to Rundeck 1.3
    • Milestone order changed from 20 to 0

    March 23rd, 2011 @ 08:34 AM

  2. Deleted User
  3. Deleted User
    Deleted User
    • State changed from new to resolved

    (from [69f14e7d90a7900043d918154762cbafe80372d5]) Fix /jobs/import api endpoint expected content and documentation [#246 state:resolved] https://github.com/dtolabs/rundeck/commit/69f14e7d90a7900043d918154...

    April 20th, 2011 @ 05:11 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.