Stephane,
I am not sure I understand uploading a document and leading with the metadata. The URL mentioned is not something I have tried. The resource I use to upload documents directly to a file cabinet is:
/DocuWare/Platform/FileCabinets/{cab guid}/Documents
I POST to that resource including a request header "Content-Type" with the MIME type of the document. The POST data then is simply a binary stream of the document's file contents, as that handles text or binary data.
After the POST, the returned XML contains the new document ID. I then use that document ID to post the index data via a routine we have for that which uses resource:
/DocuWare/Platform/FileCabinets/{cab guid}/Documents/{doc guid}/Fields
and POSTs XML that looks like something like this:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/DocuWare/Platform/Content/standard.xslt"?>
<DocumentIndexFields xmlns:s="http://dev.docuware.com/schema/public/services" xmlns="http://dev.docuware.com/schema/public/services/platform">
<Field FieldName="TextField"><String>teststring</String></Field>
<Field FieldName="DateField"><Date>2018-07-03</Date></Field>
<Field FieldName="DateTimeField"><DateTime>2018-07-03T19:57:26Z</DateTime></Field>
</DocumentIndexFields>
This has been working fine for us (on-premise 6.11) since September 2017.
(Sorry, I could never get JSON to work, so stuck with XML in all of my REST API calls...)
Thanks,
Joe Kaufman