Publicado Tue, 03 Jul 2018 17:22:05 GMT por Luiz Carlos Stradiotti Key Contact/Accounts Payable/President

Hello Stephane,

My name is Luiz Carlos ADP Docuware from Brazil.

I'm looking at your question and I'm having the same error when I try to store documents via Rest in Docuware.

Did you solve this error? Would you help me?

 

Publicado Tue, 03 Jul 2018 18:02:10 GMT por Joe Kaufman Bell Laboratories Inc No longer there

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
 

Publicado Wed, 04 Jul 2018 12:46:54 GMT por Luiz Carlos Stradiotti Key Contact/Accounts Payable/President

Hello Joe Kaufman,

My name is Luiz Carlos i'm from Brazil,

I'm using REST API - Add document in filecabinet, however I have a question at this point.

What is the parameter I use to upload a document?

Publicado Thu, 05 Jul 2018 11:44:12 GMT por Joe Kaufman Bell Laboratories Inc No longer there

Luiz,

I am not sure what you mean by "parameter". As my example further up indicates, you send the document up by making its binary stream the POST data in the "Send" call. That will create the document that you can proceed to index with subsequent Platform Service calls (as indicated in my example).

 

Thanks,

Joe Kaufman

You must be signed in to post in this forum.