# How to call the third-party api in restful style

**URL:** <https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887>\
**Category:** Web API\
**Created:** [October 2, 2017, 2:37am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887 "2017-10-02T02:37:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.workflowgen.com/u/Tim)\
**Post date:** [October 2, 2017, 2:37am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/1 "2017-10-02T02:37:53Z")

</div>

Hi,  
The options in the applications section are exclude the restful api  
How can we call a restful api and get such as json format data which can be use in process?  
Thank you!

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 2, 2017, 12:16pm UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/2 "2017-10-02T12:16:10Z")

</div>

Hi, Tim.

There are multiple types of applications that you can use where you can implement REST API calls.  
You can use the **Assembly** application for example.

1- Create your Class Library in Visual Studio where you’ll be able to launch your REST API call and make sure the object returned represents your JSON string.  
2- Build the application and copy all the assembly files (.DLL) to `~\wfgen\bin`  
3- Create the application by indicating the name of your assembly file ( **ASSEMBLY\_NAME**.DLL) and the method used that returns the JSON string.

For more information regarding applications, kindly consult the following documentation:  
[https://advantys.gitbooks.io/workflowgen-administration-module-reference-guide/content/global-information.html](https://advantys.gitbooks.io/workflowgen-administration-module-reference-guide/content/global-information.html)

Best Regards,  
Eddy.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.workflowgen.com/u/Tim)\
**Post date:** [October 5, 2017, 3:34am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/3 "2017-10-05T03:34:03Z")

</div>

Hi Eddy  
Thanks for reply, I have already add the .dll files and applications  
How to use this application in the process, I want to show a drop-down list with the values returned from this application

 ![Image 40_20171005](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/f8883f58bcc6d8c4a6441d8cf00e824522413d15.png)

This [article](https://discuss.workflowgen.com/t/workflow-application-assembly-use-an-assembly-method-with-a-workflow-context-parameter-for-more-flexibility/483) does not show the detail in embed application to process

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 5, 2017, 12:44pm UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/4 "2017-10-05T12:44:41Z")

</div>

Hi, Tim

Since the returned value is a JSON string, you will need to retrieve the value in the .NET code-behind editor and bind the dropdown on page load.

One way to do it is to create a **hidden TEXTBOX** field and map the **RETURN\_VALUE** data as a **VALUE IN** to that textbox.

Then in the .NET code behind editor, right after the page load, you can retrieve the JSON string and perform a databind to the desired dropdown list.

```auto
protected void Page_Load(object sender, EventArgs e)
	{
	    base.Page_Load(sender, e);
            // retrieve JSON string from hidden textbox and bind dropdown list
	}

```

Best Regards,  
Eddy.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.workflowgen.com/u/Tim)\
**Post date:** [October 6, 2017, 7:15am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/5 "2017-10-06T07:15:02Z")

</div>

Hi Eddy

How to map the **RETURN\_VALUE** to the hidden **TEXTBOX**?  
Thanks

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 6, 2017, 1:16pm UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/6 "2017-10-06T13:16:31Z")

</div>

Hi Tim,

In the Form Designer,

1- Click on Mapping  
2- Click on the action where you’re supposed to retrieve the returned value  
3- Click on the **VALUE IN** of the textbox and select the data **RETURN\_VALUE.**

 ![54 AM](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/a7ef54192596fbfc723cd8fe9eff1622c2990520.png)

Best Regards,  
Eddy.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.workflowgen.com/u/Tim)\
**Post date:** [October 11, 2017, 2:25am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/7 "2017-10-11T02:25:54Z")

</div>

Hi Eddy

I already map the RETURN\_VALUE to the hidden TEXTBOX by add a new action with my application type and set the VALUE\_IN to the TEXTBOX, but there was no value show in the field  
Is it possible to run a small test for the specific application in workflowgen?

.dll source code

> public static string getMember()  
> {  
> var url = “[https://jsonplaceholder.typicode.com/posts](https://jsonplaceholder.typicode.com/posts)”;  
> var client = new RestClient(url);  
> IRestResponse response = client.Execute(new RestRequest());  
> Console.WriteLine(response.Content);  
> return response.Content;  
> }

 ![123](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/1c2ec5abe4a59984f3af7a193b7e779587bdf9ac.png)

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.workflowgen.com/u/Tim)\
**Post date:** [October 18, 2017, 2:19am UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/8 "2017-10-18T02:19:52Z")

</div>

Hi Eddy

Can you help me?  
Thank you.

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 20, 2017, 1:22pm UTC](https://discuss.workflowgen.com/t/how-to-call-the-third-party-api-in-restful-style/887/9 "2017-10-20T13:22:06Z")

</div>

Hi Tim,

Sorry for the delay.  
Kindly open a new ticket on our Helpdesk so we can assist you with your issue.

Best Regards,  
Eddy.
