# Refresh RG displaying GET API Call after successful POST API Call to same data source

**URL:** <https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618>\
**Category:** APIs\
**Created:** [May 13, 2020, 10:43pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618 "2020-05-13T22:43:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 13, 2020, 10:43pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/1 "2020-05-13T22:43:58Z")

</div>

Hi there,

I have a RG that displays data from a GET API Call.

I have a button on that page that creates a new record in the remote data source using the POST Api Call. When this action is completed, the page does not display the new record. I have tried to use “Element Action / Repeating Group / Display Data” in the workflow to send the data again to the RG but this does not work. I have solved it by using the “Navigation / Refresh the page” step in the workflow but this is slow and thinking this is not the best way to do it.

Any sugestions on a better way to do this?

Many thanks

Frank

---

<div class="post-metadata">

**Author:** ![david17](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/david17/32/59859_2.png) [@david17](https://forum.bubble.io/u/david17)\
**Post date:** [May 13, 2020, 11:42pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/2 "2020-05-13T23:42:44Z")

</div>

Hey Frank,

Can you screen shot the datasource from the RG? Also, is the API set to Data or Action?

---

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 13, 2020, 11:58pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/3 "2020-05-13T23:58:16Z")

</div>

Thanks Dave,

The GET Call is set to Data  
The POST Call is set to Action.

Here are some screen shots:

**The RG**  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/d/9de22abedb05c6f5d83113a911844e0b8ebb0756.png)

**The Workflow**  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/e/1e5b2fecfa011373f3f398b950ee73ad6430bd16.png)

**Using The Workflow to re-load the data - which did not work**  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/2/b27fedf80bb48945e7c7ff8bb55d69986d2fd403.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/9/b91e4c6c70af7fcc3f1b44cbf4e80362010648fa.png)

Cheers

Frank

---

<div class="post-metadata">

**Author:** ![david17](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/david17/32/59859_2.png) [@david17](https://forum.bubble.io/u/david17)\
**Post date:** [May 14, 2020, 12:06am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/4 "2020-05-14T00:06:03Z")

</div>

Oh I see. Here’s the issue: the GET Call only happens once, Bubble is going to cache the response to that call so even though the data changes Bubble won’t ask for it again. If you add a “header” field to the API that isn’t needed by the API, like an extra date field, or a random number, then when you display the list again via that Action and change the random number, the API response should update.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 14, 2020, 12:17am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/5 "2020-05-14T00:17:10Z")

</div>

I guess you can also use reset data but didn’t test this

---

<div class="post-metadata">

**Author:** ![tom9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tom9/32/54492_2.png) [@tom9](https://forum.bubble.io/u/tom9)\
**Post date:** [May 14, 2020, 2:46am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/6 "2020-05-14T02:46:41Z")

</div>

> [@david17](#):
>
> Oh I see. Here’s the issue: the GET Call only happens once, Bubble is going to cache the response to that call so even though the data changes Bubble won’t ask for it again. If you add a “header” field to the API that isn’t needed by the API, like an extra date field, or a random number, then when you display the list again via that Action and change the random number, the API response should update.

That’s clever.

---

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 14, 2020, 4:06am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/7 "2020-05-14T04:06:26Z")

</div>

Thank you!  
I tested this with

- reset relevant inputs and
- Reset a group/popups  
neither work

![image](https://us1.discourse-cdn.com/bubble/original/3X/b/5/b5498c71f9204f7840b3fcc6f32a2e8ff11c29c0.png)

Thank you anyway

---

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 14, 2020, 4:15am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/8 "2020-05-14T04:15:37Z")

</div>

Thanks David,

I have added the header ‘random’ as shown  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/a/4a2a826de30300b37d4341fce913ff4b1834c8e7.png)

then generating random string as shown in the RG get data  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/0/a00b9872af3d1d86cf2c48fe9e112f9c71d61ecc.png)  
and  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/a/1a8d6ea3f8b33f95feab851c93251cd9ca31c231.png)

but it did not work.

I am not sure if I have followed the process that you have recomended so let me know where I may have gone wrong.

Thanks agfain

Frank

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 14, 2020, 4:23am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/9 "2020-05-14T04:23:29Z")

</div>

Sorry. I say REset, but should say Clear list:  
 ![screenshot-bubble.io-2020.05.14-00_22_23](https://us1.discourse-cdn.com/bubble/original/3X/2/d/2dd39f0ac32da550eb7b004cd0df8d81ed08a67d.png)

> **[Introduction](https://manual.bubble.io/)**
>
> Welcome to the Bubble Docs.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 14, 2020, 4:23am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/10 "2020-05-14T04:23:45Z")

</div>

You can also use display list

---

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 14, 2020, 4:26am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/11 "2020-05-14T04:26:13Z")

</div>

Dave,

changed to current date/time and it worked and super smooth too.

![image](https://us1.discourse-cdn.com/bubble/original/3X/d/c/dcc2b87011ba8b8ae358c836d3823946b7d40b73.png)

Cheers

Frank

---

<div class="post-metadata">

**Author:** ![frankstillone](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/frankstillone/32/45219_2.png) [@frankstillone](https://forum.bubble.io/u/frankstillone)\
**Post date:** [May 14, 2020, 4:36am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/12 "2020-05-14T04:36:13Z")

</div>

thank you - yes, that also worked

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/5/4527f0a70169523c2573d79e766cfb0776fdd001.png)

I cleared list and the displayed list and it was nice and smooth

Thank you!

Cheers

Frank

---

<div class="post-metadata">

**Author:** ![david17](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/david17/32/59859_2.png) [@david17](https://forum.bubble.io/u/david17)\
**Post date:** [May 14, 2020, 5:49am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/13 "2020-05-14T05:49:16Z")

</div>

Yeah, the goal was to put a changing piece of data so that every time it was requests bubble things the api call was different. When you added the “is empty” to the end of the generator it was always false, so the value actually never changed even though the random number did.

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 29, 2021, 8:23am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/14 "2021-03-29T08:23:28Z")

</div>

@david17 @frankstillone @Jici

I am just starting to play around with APIs and have things setup to test this approach and feel as if I must be doing something wrong.

When I use the approach from @david17 to have a Date parameter in the header and subsequently follow the workflow actions to display data in the RG with the header set to ‘current date/time’ the refresh of my RG works, but only once.

When I use the approach from @jici to clear the list and then to display the list again, this also works, but only once.

I then tried to use the random number in a header, and that doesn’t work at all.

In the first two approaches that work, but only once, if after I run the workflows for the second time and do a page refresh the new data appears.

Is there something that I am missing to make the RG refresh every time or is it something that actually only works once?

I tried to add a one second pause between the action to create data in the API and displaying the data in the RG using the GET call, but that didn’t help.

Through all the testing I only ever once saw the RG data get refreshed twice (ie: workflow ran twice without a page refresh) but it failed to do it a 3rd time and every other test remained with only 1 instance of the RG data getting updated.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [March 29, 2021, 10:55am UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/15 "2021-03-29T10:55:22Z")

</div>

Can you share your setting when it refresh once?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 29, 2021, 12:01pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/16 "2021-03-29T12:01:44Z")

</div>

If I focus on just the current date and time in the Header method

 ![Screen Shot 2021-03-29 at 6.57.14 PM](https://us1.discourse-cdn.com/bubble/original/3X/1/c/1c1af37723ee580bff5189dbae7ea91fe97cf43f.png)  
 ![Screen Shot 2021-03-29 at 6.57.58 PM](https://us1.discourse-cdn.com/bubble/original/3X/b/2/b20a1628c81e526d884efbf364f6f9a3beb24fad.png)

And then if I use the clear list and display list method

 ![Screen Shot 2021-03-29 at 6.59.47 PM](https://us1.discourse-cdn.com/bubble/original/3X/9/6/969006a44aac9ef997c65ef5206c00002f194cdb.png) ![Screen Shot 2021-03-29 at 6.59.59 PM](https://us1.discourse-cdn.com/bubble/original/3X/d/3/d39f3b5db0b61be49a72d59eb64cc827366065e2.png)

![Screen Shot 2021-03-29 at 7.01.11 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/6/f6e4f2cd99e816c61625abb7e4e9d71f110e5c44.png)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [March 29, 2021, 3:38pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/17 "2021-03-29T15:38:15Z")

</div>

Did you test using step by step to check what happen?

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 29, 2021, 6:08pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/18 "2021-03-29T18:08:52Z")

</div>

Yes…In step by step mode it runs through the steps correctly, but it still only has the RG updated once.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [March 29, 2021, 6:12pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/19 "2021-03-29T18:12:49Z")

</div>

If you can make your app in public view mode and share your editor link, maybe we can have a look and try to find why it’s not working. For me both way work correctly.  
did you check also for API Limitations? (# of calls you can do each seconds for example).

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 29, 2021, 6:28pm UTC](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618/20 "2021-03-29T18:28:47Z")

</div>

The API is just set up between two of my bubble apps as I am just trying to get a grasp on how APIs work generally, so unless Bubble puts some API limitation by default, I don’t believe there would be any reason a limitation would cause it to not update unless there are settings in the app for this.

Here is a link to the editor

On preview mode would need username and password which are username and password

Here is screen shot from the preview page.

 ![Screen Shot 2021-03-30 at 1.26.13 AM](https://us1.discourse-cdn.com/bubble/original/3X/9/5/95348fe2063ac870b50fdf5338086b97ddaa4029.png)

The create Via API button is what will trigger the creation and the updating of the RG

First the ‘Input SSN’ will need some number then press encrypt button…once it is in encrypted (second input will display it) then can press the create Via API button.

The RG above the grey container has the API Get response results and the count above it SSN API is the count of the results, which in screen shot shows 14.

[Next page](https://forum.bubble.io/t/refresh-rg-displaying-get-api-call-after-successful-post-api-call-to-same-data-source/91618.md?page=2)
