Discussion

How to get JSON response from Integrator Service-REST

Hi,

I am trying to implement REST services in Pega, where Pega accepts the request from external application and return the response in JSON format. The response can be a Page List or Page Group. How do I parse the data of the Page(List/Group) in JSON format for sending the response?

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
March 16, 2015 - 1:39pm

Have you taken a look at the Connect Rest rule?  If not that is where you need to start.

 

Sincerely,

Cecil Howell, CSA |  Senior Instructor  |  Pegasystems Inc.

 

March 16, 2015 - 1:44pm

Thanks!

 

For the time being, I am parsing the Reponse page to json using the Public API, and sending the response in the form of an out Param. In the Service-Rest rule, I am mapping the Response to output Parameter of the activity.

 

Also, since the requirement is to create a Service-Rest rule, I am unable to use the out-of-box connect -rest functionality.

 

Regards,

Harshal

December 9, 2016 - 12:58pm
Response to HarshalA

Hi Harshal,

Can i Know how did you achieve this.  have the same requirement.

Thanks,

Saba

April 1, 2015 - 10:57pm

I am also looking for the same answer. trying to create a case exposed through a REST service. If i return the svcOutput page as an XML stream, it works but not as a JSON message. I get a mapping error. 

April 1, 2015 - 11:29pm

What error do you get Saurabh?

I get authentication error when i try to access the endpoint from soap ui, but i get the correct json mapping when i try to access from service in pega.