mandatory REST Services return
(this was a question sent into the SDK email alias for D2 Smart View SDK partner challenge. It might help others, so I am reposting)
What is the minimal the REST services need to return for D2SV UI component to work?
Let me explain a bit futher.
I want to trigger a run of a report. That returns the basic information:
{
"id": "/myInsight/run_report_output",
"report_id": "090000018001596e",
"log_id": "090000018001596c",
"status": "OK_WITH_ID"
}
On receive of this message, the UI should be able to next trigger an other service to get the results of the report, which he can fetch with the report_id
Is this data structure enough, Should there be a specific datastructure it has to adhere to?
Or is this a bad practice to just return the basic needs?
—
Kyle Pettit
Documentum D2 Product manager
Answers
-
Reply:
So, you can define the boilerplate REST controller the workspace assistant which can be used to create a regular rest service. So D2 doesn't mandate on any particular structure for the response. [Guide is available on Support.opentext.com]
As for the UI component, you can use a standard AJAX method to fire those REST end point which is created. So ideally it will be good to use the connector object from the D2 Smartview while firing the AJAX as it will handle passing the necessary D2 headers. Please do find a sample snippet for firing the REST endpoint as shown below.
—
Kyle Pettit
Documentum D2 Product manager0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 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