The KGS Document Router is capable of accepting data over HTTP(S). In case the customer wishes to send data over HTTPS, this must be handled by the customer. The webserver (.i.e. Apache Tomcat) need to be anbled with HTTPS for the KGS DocumentRouter to handle requests over HTTPS.
The data is transferred as HTTP-POST and as multipart/form-data . The document header information is transferred in the URL. One or more components are transferred in the body. This version of the function is particularly suitable for transferring documents consisting of several components into the content repository via the KGS DocumentRouter as a whole. The component information is specified in the header of each part the data in the body.
The request body is in multipart/form-data format. With this format, it is possible to transfer several independent parts to the KGS DocumentRouter. The individual parts have a header and a body
and are in MIME format (RFC 2045, 2046).This MIME format enables several components to be transferred to the KGS DocumentRouter simultaneously. If an error occurs when storing a component, the
entire action is cancelled.
Example
http://localhost:8080/KGSAdmin-DR/documentrouter?create&instanceName=DR_Instance_name
A document consisting of one or more components is transferred in multipart/form-data format. The following example demonstrates sending only a single document;
Document header
Content-Type:multipart/form-data;boundary= A495ukjfasdfddrg4hztzu898aA0jklm
...somemoreheaderinformation...
Content-Length:32413
Content part
--A495ukjfasdfddrg4hztzu898aA0jklm
Content-Disposition: form-data; filename="File_to_be_archived.pdf"
X-compId:data
Content-Type:application/pdf
Content-Length:4242
...4242BytesData...
--A495ukjfasdfddrg4hztzu898aA0jklm--
The following example demonstrates sending an index file with a document;
Document header
Content-Type:multipart/form-data;boundary= A495ukjfasdfddrg4hztzu898aA0jklm
...somemoreheaderinformation...
Content-Length:32413
Content part
--A495ukjfasdfddrg4hztzu898aA0jklm
Content-Disposition: form-data; filename="test_file.txt"
X-compId: index
Content-Type: text/plain
Content-Length: 7
…7BytesData…
--A495ukjfasdfddrg4hztzu898aA0jklm
Content-Disposition: form-data; filename="test_file.pdf"
X-compId:data1
Content-Type:application/pdf
Content-Length:4242
...4242BytesData...
--A495ukjfasdfddrg4hztzu898aA0jklm--
The KGS DocumentRouter should reply with HTTP code 201 in case the archiving was successful. Any other HTTP code should be interpreted as an error. Following are the possible HTTP codes;