Adding Classification to a Document using REST API
Comments
-
Here's an example of me adding a non-RM Classification its ID is 23114 to a Folder whose nodeID is 74143.Postman HTTP code will show like this
We are posting something and you will need some code/http client to fabricate a post(JQuery,XHR,OKHTTP,UniRest etc)
POST /otcs/cs.exe/api/v1/nodes/74143/classifications HTTP/1.1
Host : myserver.mydomain.com
otdsticket: *OTDSSSO*THIS IS A HUGE STRING TRUNCATED BY ME*
Content-Length: 149
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="body"
{"class_id":[{"id":23114}]}
----WebKitFormBoundary7MA4YWxkTrZu0gW
OT's REST implementation is not fully JSON or something like that, that is why we have to formulate a "body" parameter. In other applications like OTDS, we send it pure JSON payload. If you use OTCSTicket put that in lieu of what I show. (my thought is OTDSTicket is superior :)
General Guideline when you run into REST API Problems.
Observe payload when you use SmartUI using Fiddler, with some practice you can see what the command when you click a button in SmartUI is that is the
best debugger. That is what I did. Its REST API is discussed I think in detail at developer.opentext.com
Screenshots
2 -
Thank you Appu. That API call seems to work.
0 -
Well explained. Well exampled and working well! Appriciate it. Thanks!
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories