How to add/Update pulse comments using OTCS REST API
Hello everyone,
I am searching for a way to add/modify pulse comments using REST API. I have a requirement where I am migrating documents from third party system and they have provided comments related to each document in xml format. I have to add these comments using REST calls or any other recommended way. I know there is a table DSocialFeedEvents for Pulse related events however I can't find a Rest API for Pulse events.
Please help!
Thanks,
Best Answer
-
Hello @Sakshi Mishra
While the api may not be documented, you can find the appropriate REST API call by attempting to add comments on a document through Smart UI and capturing it through the Developer tools on browsers.
Having said that, when I look at how a comment is added , when looking through the browser dev tools it is a POST for the following URL path:
api/v1/pulse/statuses/update
The Form Data it took was
status: <comment I am making on the document>
eventtype: <1>
in_comment_on_obj_id:<Document Node ID>And to read all the comments on a document is a GET API for the following url path :
api/v1/pulse/statuses/public_timeline
Where you have to add some query parameters:
?includes=actions,reply_count,user_info&excludes=replies&count=5&commands=openincsv&commands=docpreview&commands=opendocumentwebedit&commands=download&commands=openinbrowser&commands=default&commands=open&commands=openstateflow&commands=properties&commands=browse&commands=hold_metadata&commands=browseholdcontainer&commands=rsi_metadata&commands=initiateworkflow&commands=openform&commands=assignment_edit&commands=seeforward&commands=wfcreatedocument&data_id=THISISTHEDATAID&commands=default&page=1&sort_by_nid=true
Obviously it does not look too goodAs for documentation, I don't see much like you said in the Content Server api guide. Or even in Extended ECM space where I could expect this type of documentation.
My 2 cents: Enable Developer tools on the browser, go to Smart View and perform the required action, and get the REST API call in the Network tab with the required inputs.
2
Answers
-
Hello @Sakshi Mishra
While the api may not be documented, you can find the appropriate REST API call by attempting to add comments on a document through Smart UI and capturing it through the Developer tools on browsers.
Having said that, when I look at how a comment is added , when looking through the browser dev tools it is a POST for the following URL path:
api/v1/pulse/statuses/update
The Form Data it took was
status: <comment I am making on the document>
eventtype: <1>
in_comment_on_obj_id:<Document Node ID>And to read all the comments on a document is a GET API for the following url path :
api/v1/pulse/statuses/public_timeline
Where you have to add some query parameters:
?includes=actions,reply_count,user_info&excludes=replies&count=5&commands=openincsv&commands=docpreview&commands=opendocumentwebedit&commands=download&commands=openinbrowser&commands=default&commands=open&commands=openstateflow&commands=properties&commands=browse&commands=hold_metadata&commands=browseholdcontainer&commands=rsi_metadata&commands=initiateworkflow&commands=openform&commands=assignment_edit&commands=seeforward&commands=wfcreatedocument&data_id=THISISTHEDATAID&commands=default&page=1&sort_by_nid=true
Obviously it does not look too goodAs for documentation, I don't see much like you said in the Content Server api guide. Or even in Extended ECM space where I could expect this type of documentation.
My 2 cents: Enable Developer tools on the browser, go to Smart View and perform the required action, and get the REST API call in the Network tab with the required inputs.
2
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 151 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories