eDocs API request schema
Comments
-
Hi,
Apologies that we missed your question. The eDOCS forums have not yet been migrated over to our new forums system and that is where this type of question would be best placed.
The data response should be the metadata that will be used in the profile form for the given document.
Here is a .NET example from my testing project:
string profileInformation = "{\"DOCNAME\":\"" + "REST API dotNet Test" + "\"," + "\"AUTHOR_ID\":\"" + _username + "\"," + "\"CLIENT_ID\":\"DEFAULT\",\"MATTER_ID\":\"DEFAULT\"," + "\"TYPE_ID\":\"DEFAULT\",\"APP_ID\":\"MS OUTLOOK\"," + "\"FULLTEXT\":\"Y\",\"TYPIST_ID\":\"" + _username + "\"," + "" + "\"_restapi\":" + "{\"form_name\":\"LEGALPROF\"}}";
Full C# function utilising the documents endpoint:
public static async void UploadDocument(string filePath) { string uri = $"{_server}/edocsapi/v1.0/documents?library={_library}"; string profileInformation = "{\"DOCNAME\":\"" + "REST API dotNet Test" + "\"," + "\"AUTHOR_ID\":\"" + _username + "\"," + "\"CLIENT_ID\":\"DEFAULT\",\"MATTER_ID\":\"DEFAULT\"," + "\"TYPE_ID\":\"DEFAULT\",\"APP_ID\":\"MS OUTLOOK\"," + "\"FULLTEXT\":\"Y\",\"TYPIST_ID\":\"" + _username + "\"," + "" + "\"_restapi\":" + "{\"form_name\":\"LEGALPROF\"}}"; try { FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read); StreamContent body = new StreamContent(stream); body.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); MultipartFormDataContent content = new MultipartFormDataContent(); StringContent profile = new StringContent(profileInformation, System.Text.Encoding.UTF8, "application/json"); content.Add(body, "file", String.Format("{0}", filePath.Substring(filePath.LastIndexOf('\\') + 1))); content.Add(profile, "data"); HttpClientHandler clientHandler = new HttpClientHandler() { CookieContainer = GetCookies() }; HttpClient httpClient = new HttpClient(clientHandler); HttpResponseMessage responseMessage = await httpClient.PostAsync(uri, content); MessageBox.Show(await responseMessage.Content.ReadAsStringAsync()); // docnumber returned here in 16.5 rest api. } catch (WebException ex) { System.Windows.Forms.MessageBox.Show(ex.Message); string dmError = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); System.Windows.Forms.MessageBox.Show(dmError); } }
Hope this helps!
Craig Woods
Lead Technical Support Specialist | eDOCS
Open Text Corporation United Kingdom1 -
Craig,
Thank you for the response. This will help us get started. We are having trouble trying to find all of the information we need to develop our application. Can you point me too additional documentation and/or sample apps? We have a python script (Demo.py) that allows us to learn about the eDocs API but there are no details/description on what each element in the request body actually are other than "data" and "_restapi". Also, do you know when the eDocs forums will be migrated and/or if we can get access to the forum you mentioned?
Regards,
Tony0 -
Hi Tony,
Unfortunately, for the REST API, we do not have anything further than the python script and the Swagger UI page.
What I would suggest is that any questions you have be directed to this forum, or through a support ticket and we can look to answer those questions.
We do have a samples application for the DM Server API (which is COM-based), and the DM WCF API (which uses Microsoft WCF). This is a tool created by ourselves in support and the work that is required to create .NET samples for the DM REST API, to add to this samples app, has not yet been done.
The samples app can be found here: https://knowledge.opentext.com/knowledge/llisapi.dll/Open/58709850
The current plan is to have the eDOCS forums migrated to this system on August 14th.
Thanks,
Craig Woods
Lead Technical Support Specialist | eDOCS
Open Text Corporation United Kingdom5 -
I have a feeling that you have already seen it, as you referred to the "API reference page", but here it is in case you have not: https://developer.opentext.com/webaccess/#url=/awd/resources/apis/edocs-rest-api-16-3-1&tab=501
Craig Woods
Lead Technical Support Specialist | eDOCS
Open Text Corporation United Kingdom0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 104 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management