SOAP API - createDocument

The table summarizes the SOAP API - createDocument.

Request Uses the CreateDocumentRequest element (from the DocumentService schema)
Parameter notes
  • caseReference - Can be obtained using getCaseReferencesForDataView.
  • name - The best practice is to always include an extension so that other documents of the same name, but with different extensions, can be included in the same case folder (some repositories may require that an extension be included). This name, which is required, can differ from the name of the actual document if you are referencing the document using a URL; the document is stored in the case folder using this name.
  • contentURL - The acceptable formats are http:// and file://. Note that http URLs only work if the content can be obtained anonymously, that is, not using username/password or any other authentication. For file URLs, network paths are supported if the server is running Windows, for example 'file:////myserver/share/file.doc'. If it is a UNIX server, only files on the local server file system, or network shares that have been mounted on the server's file system, can be accessed.
  • content - Must be base64Binary.
Response Returns a createDocumentResponse element (from the DocumentService schema).
Example - Passing contentURL Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doc="http://document.api.bds.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <doc:CreateDocumentRequest returnMetadata="true">
         <owner>
            <caseReference>BDS-1-com.example.ordermodel.Order-1-0</caseReference>
         </owner>
         <name>Proposal.docx</name>
         <contentURL>file:////docserver/share/Proposal.docx</contentURL>
      </doc:CreateDocumentRequest>
   </soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <CreateDocumentResponse xmlns="http://document.api.bds.tibco.com">
         <reference xmlns="">DocumentID-f61fd51d-3895-40a0-8952-1a4bd992b2da;1.0</reference>
         <metadata xmlns="">
            <specifier>
               <id>f61fd51d-3895-40a0-8952-1a4bd992b2da;1.0</id>
            </specifier>
            <name>Proposal.docx</name>
            <version>1.0</version>
            <mimeType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mimeType>
            <createdDateTime>2014-10-02T11:06:17.955</createdDateTime>
            <createdBy>admin</createdBy>
            <lastModifiedDateTime>2014-10-02T11:06:17.955</lastModifiedDateTime>
            <lastModifiedBy>admin</lastModifiedBy>
            <byteSize>24008</byteSize>
         </metadata>
      </CreateDocumentResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope> 
Example - Passing content Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doc="http://document.api.bds.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <doc:CreateDocumentRequest returnMetadata="true">
         <owner>
            <caseReference>BDS-1-com.example.ordermodel.Order-3-0</caseReference>
         </owner>
         <name>readme.txt</name>         <content>ICBRdWV1ZSBOYW1lICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTTkZHWElCQ1QgIFByZQ0KICA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0gICAgNSoNCiAgJHN5cy5hZG1pbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tICAgIDUqDQogICRzeXMubG9va3VwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0tLS0tLSAgICA1Kg0KICAkc3lzLnJlZGVsaXZlcnkuZGVsYXkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0gICAgNSoNCiAgJHN5cy51bmRlbGl2ZXJlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tICAgIDUqDQoqICRUTVAkLkVNUy1TRVJWRVIuMzVDNEU0QzExRDYyNzUuMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0tLS0tLSAgICA1DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tLS0tLS0gICAgNSoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0tLS0tLSAgICA1Kg==</content>
      </doc:CreateDocumentRequest>
   </soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <CreateDocumentResponse xmlns="http://document.api.bds.tibco.com">
         <reference xmlns="">DocumentID-0fe61595-0f46-4eb7-8f48-56f52bf6a42f;1.0</reference>
         <metadata xmlns="">
            <specifier>
               <id>0fe61595-0f46-4eb7-8f48-56f52bf6a42f;1.0</id>
            </specifier>
            <name>readme.txt</name>
            <version>1.0</version>
            <mimeType>text/plain</mimeType>
            <createdDateTime>2014-10-02T15:22:28.227</createdDateTime>
            <createdBy>admin</createdBy>
            <lastModifiedDateTime>2014-10-02T15:22:28.227</lastModifiedDateTime>
            <lastModifiedBy>admin</lastModifiedBy>
            <byteSize>1852</byteSize>
         </metadata>
      </CreateDocumentResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>