Hi
We have a requirement, where we need to send the Node data from CS to our internal RESTful API to capture the meta data of a node (categories). How this can be done?
Rajender
You can set WebReport Triggers to run upon the creation or modification of a node, within the WebReport that will subsequently run, you can likely extract the key bits of information you want, with NODEINFO, or perhaps wrap it up nicely for consumption with INSERTJSON, which will return the data results in a JSON structure, with optional directives, documented further in the WebReports tag guide.
Within the WebReport, you can use the WRREST client ([LL_WEBREPORT_RESTCLIENT <multiple directives> /]) to POST whatever you like against your custom REST end-point, so perhaps you can send in this JSON data to be ingested by your web application.
Thanks.
Hi Nizar
Now the error does not occur but it does not call the RESTful API. The following is the simple endpoint which is running and validated from POSTMAN. Anything I am doing wrong in webreport?
Endpoint
@PostMapping("testmessage")public void postTestMessage(@RequestParam String message) { System.out.println(message);}
Webreport
[LL_REPTAG_TRIGGERCATEGORYVALUECHANGES TOJSON SETVAR:bodyStr /]
[LL_WEBREPORT_RESTCLIENT
@HOST:L151TEC012812.ams.bnymellon.net
@PORT:8080
@URI:/testmessage
@METHOD:POST
@PARMS:[LL_REPTAG_!bodyStr /]
@TIMEOUT:10
@OUTPUT:ASSOC:result /]
eLink : Calling a RESTful API on create/update of a Node..Calling a RESTful API on create/update of a Node.. Posted by rajender.motlakunta@bnymellon.com (Motlakunta, Rajender) On 05/29/2019 03:58 PM Hi Nizar Now the error does not occur but it does not call the RESTful API. The following is the simple endpoint which is running and validated from POSTMAN. Anything I am doing wrong in webreport? Endpoint @PostMapping("testmessage")public void postTestMessage(@RequestParam String message) { System.out.println(message);} Webreport [LL_REPTAG_TRIGGERCATEGORYVALUECHANGES TOJSON SETVAR:bodyStr /][LL_WEBREPORT_RESTCLIENT@HOST:L151TEC012812.ams.bnymellon.net@PORT:8080@URI:/testmessage@METHOD:POST@PARMS:[LL_REPTAG_!bodyStr /]@TIMEOUT:10@OUTPUT:ASSOC:result /] Rajender [To post a comment, use the normal reply function]Topic: Calling a RESTful API on create/update of a Node..Forum: Content Server Development ForumContent Server: My Support
Alternately (or in addition to): set up a packet capture (via something like wireshark) to see what's travelling over the network. This'll let you see if the WR is even trying to send out a connection (and if so: what it's sending).