# How do I set up reusable REST APIs?

**URL:** <https://community.weweb.io/t/how-do-i-set-up-reusable-rest-apis/1392>\
**Category:** Ask us anything\
**Created:** [November 3, 2022, 3:21am UTC](https://community.weweb.io/t/how-do-i-set-up-reusable-rest-apis/1392 "2022-11-03T03:21:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixtanhm](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/felixtanhm/32/1544_2.png) [@felixtanhm](https://community.weweb.io/u/felixtanhm)\
**Post date:** [November 3, 2022, 3:21am UTC](https://community.weweb.io/t/how-do-i-set-up-reusable-rest-apis/1392/1 "2022-11-03T03:21:45Z")

</div>

Is there a way that I can set up an API once (example CRUD User) so that I can reuse it multiple times throughout my app?

Right now it seems that at each place I want to call the API, I need to input the URL, body, etc all over again.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [November 3, 2022, 7:36am UTC](https://community.weweb.io/t/how-do-i-set-up-reusable-rest-apis/1392/2 "2022-11-03T07:36:29Z")

</div>

You can create a global workflow with the API request action

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/020ade4263b8d278cf87697e655ae7762b2ca6e0.png)

Then in every other workflow you can use the action “execute workflow”  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9540845e46168de87f68e7fa666a344c463a47e5.png)

the returned value of the workflow will be available as a result of the respective action

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2cb2fc0a273417a4eb3931207154f4200718c2b6.png)

if you see `undefined` as the result, just test the “execute workflow” action so you can see the shape of the returned data  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/118ef8d5bc43c283d0f061ec46e499701a42e3d5.png)

---

<div class="post-metadata">

**Author:** ![felixtanhm](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/felixtanhm/32/1544_2.png) [@felixtanhm](https://community.weweb.io/u/felixtanhm)\
**Post date:** [November 3, 2022, 2:19pm UTC](https://community.weweb.io/t/how-do-i-set-up-reusable-rest-apis/1392/3 "2022-11-03T14:19:54Z")

</div>

Perfect! Didn’t know you could do a workflow inside a workflow. Thanks a lot!
