WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Please help with creating variant through Http API

Re: Please help with creating variant through Http API

by Michael Thompson-2 :: Rate this Message:

| View in Thread



On 1 May 2012 18:07, Fred Thu <fred.thu@...> wrote:
Hi,

I've tried creating a new Variant for hours through Curl, without success. I
have a document, ID 779, created with Default language and I'm trying to create
the French version.

What's wrong in this?

curl --basic --user myuser:mypassword --form startBranch=1 --form
startLanguage=1 --form startVersion=-1 --form newBranch=1 --form newLanguage=2
http://myserver.com:9263/repository/document/779

I just get back "<?xml version="1.0" encoding="UTF-8"?>
<ns:error xmlns:ns="http://outerx.org/daisy/1.0"><ns:description>The required
field named "xml" is missing.</ns:description></ns:error>"

(I tried many other ways to write this Post...)

Doc says "Creating a new variant based on an existing variant is rather
different. In this case no XML body or multipart-request must be done, but a
POST operation with the following request parameters:"

seems like it is expecting a multipart form with a section called xml, perhaps the url is different for creating variants?

Have you tried running wireshark to capture the data between the repository and the wiki it's a bit messy?

I'm meaning to set up some kind of http proxy that can record the traffic.

Michael

 

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

 « Return to Thread: Please help with creating variant through Http API