Management API Calls for POST -- changes not reflected in Edge UI right away

Not applicable

I am generating some policy artifacts and creating them on the proxy by means of POST invocations on Management API. That part is good. However, the changes are not reflected or rendering in Edge UI right away -- it takes few minutes to see the changes. Is there a reason for this delay and is there a way to set a parameter to cut down this delay? Thanks in advance.

Solved Solved
1 4 271
1 ACCEPTED SOLUTION

adas
Participant V

@Vijay Govind I am guessing that you are uploading the resource files and policies to the same version of the api proxy and expecting to see them in the Edge UI's proxy editor screen. Is that correct ?

The way the UI works is slightly different. Let me explain what actually happens. When you open the proxy editor for a given proxy and revision it makes management API calls to the backend and fetches the whole proxy bundle as a zip. The UI then unzips the bundle and shows you the contents of the complete proxy in the proxy editor UI. When you make a change and save it via the UI, the reverse happens - the UI zips it up and saves the complete zip.

So in your case, when you are making external API calls to update a revision you need to make sure you reload the proxy editor page. A simple page refresh may not work because the UI also tries to cache the contents. So just go back the to proxies list page, select your proxy name so that it opens up the proxy editor page. You should see your latest proxy contents once the page loads. Let me know if this helps you resolve your issue and kindly accept the answer if it does.

View solution in original post

4 REPLIES 4

> However, the changes are not reflected or rendering in Edge UI right away -- it takes few minutes to see the changes

Can you be specific about which POST requests you are using?

And secondly, do you refresh the Admin UI to get the changes?

In my experience, I use POST to import and then deploy an entirely new API proxy bundle, and those changes are visible immediately in the UI. Maybe you're doing something else, and seeing different results.

Not applicable

I'm calling POST on couple of APIs -- one for creating JavaScript (jsc) resource files, and the other to create the corresponding JavaScript policies. For example, I'm generating about 8 to 10 JavaScript resource files and corresponding policies outside Edge and my utility calls management API repeatedly to add all these artifacts to the corresponding proxy in Edge. All the calls are successful -- when I go refresh my proxy contents in Edge UI (repeatedly) and also I tried closing the browser and going back in repeatedly , the changes are not seen until after like 5 minutes or so. My utility directly adds these artifacts, but doesn't download the bundle and uploads the new bundle or revision. Is there anything I should be doing to see my changes on Edge right after my utility successfully completes POSTing all the artifacts? Thank you.

adas
Participant V

@Vijay Govind I am guessing that you are uploading the resource files and policies to the same version of the api proxy and expecting to see them in the Edge UI's proxy editor screen. Is that correct ?

The way the UI works is slightly different. Let me explain what actually happens. When you open the proxy editor for a given proxy and revision it makes management API calls to the backend and fetches the whole proxy bundle as a zip. The UI then unzips the bundle and shows you the contents of the complete proxy in the proxy editor UI. When you make a change and save it via the UI, the reverse happens - the UI zips it up and saves the complete zip.

So in your case, when you are making external API calls to update a revision you need to make sure you reload the proxy editor page. A simple page refresh may not work because the UI also tries to cache the contents. So just go back the to proxies list page, select your proxy name so that it opens up the proxy editor page. You should see your latest proxy contents once the page loads. Let me know if this helps you resolve your issue and kindly accept the answer if it does.

Thanks for the clarification -- it must have been the browser cache.