Send HTTP GET REQUEST

Posted by neetuagw on 20-Oct-2014 09:06

Hi,

I am new in developing CRM application using Rollbase.

I am try to call Facebook Graph API to fetch the Page Insights Data.

All I know that I have to create a integration link field and then run a Send HTTP GET REQUEST Trigger.I want to know :

1)What URL should I provide in Integration Field?

2) How to call Trigger to run automatically?

3) How do I get the response?

4) Do I need to parse the JSOn I got in response?

5)How to save the data in Object's fields?

Thanks in advance

All Replies

Posted by neetuagw on 20-Oct-2014 10:46

I am following this document but still couldn't able to understand its processing properly.

documentation.progress.com/.../index.html

Posted by pvorobie on 20-Oct-2014 10:57

It may be easier for you to use Object Script trigger ans use server-side APIs to send HTTP request and receive response in single JavaScript code.

Posted by Godfrey Sorita on 20-Oct-2014 14:23

1) What URL should I provide in Integration Field? -> It depends on the API you want to use. I will try to provide you an example for this.

2) How to call Trigger to run automatically? -> Set the trigger timing. For Graphs API, I think it should be set to run after creating or updating the record.

3) How do I get the response? -> The response can be fetched using rbv_api.getSharedValue("ReturnStatus") and rbv_api.getSharedValue("ReturnBody"). However, this must be called within a trigger (after the Send GET Request).

4) Do I need to parse the JSON I got in response? -> Yes, it is necessary to fetch the specific result parameters of the request. You can use rbv_api.stringToJson() to make the parsing easier.

5) How to save the data in Object's fields? -> After getting and parsing the response, rbv_api.setFieldValue() or rbv_api.updateRecord() API can be used to set the results to the object's fields.

This thread is closed