Fix API count update issue after deletion from overview page#1208
Open
ranuka-laksika wants to merge 1 commit intowso2:mainfrom
Open
Fix API count update issue after deletion from overview page#1208ranuka-laksika wants to merge 1 commit intowso2:mainfrom
ranuka-laksika wants to merge 1 commit intowso2:mainfrom
Conversation
- Added sessionStorage flag in DeleteApiButton.jsx when API is deleted from overview - Added logic in TableView.jsx to detect flag and refresh data after 500ms delay - Ensures API count updates immediately without requiring page refresh
|
ashera96
reviewed
Nov 11, 2025
Contributor
ashera96
left a comment
There was a problem hiding this comment.
Hi @ranuka-laksika,
Using sessionStorage is not the recommended approach to fix this issue. I believe the fix should follow the approach outlined below:
When an API is deleted from the UI, it triggers the corresponding REST API call to delete it. Upon successful deletion, we should fire a GET APIs call to retrieve the latest API count.
Then, update the total API count within the UI based on the response from that GET APIs call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes issue #4522 - API count is not updating when an API is deleted
Issue URL: wso2/api-manager#4522
Changes Made
DeleteApiButton.jsxto set sessionStorage flag when API is deleted from overview pageTableView.jsxto detect the sessionStorage flag and refresh data automaticallyBuild Information
Artifact Replacement
wso2am-4.6.0/repository/deployment/server/webapps/Modified wso2am-4.6.0 Pack (GitHub Actions Artifact)
The complete modified
wso2am-4.6.0pack with all updated artifacts has been uploaded as a GitHub Actions artifact.Download Link:
🔗 Download from GitHub Actions Run
Artifact Details:
wso2am-4.6.0-issue-22.zipwso2am-4.6.0-issue-22.zipWhat's included:
.warfiles from the build (publisher.war, devportal.war, admin.war)wso2am-4.6.0directory structureTesting
Technical Details
The fix uses sessionStorage as a communication mechanism between the API overview/detail pages and the listing page. When an API is deleted from the overview, a flag is stored temporarily. Upon component initialization in the listing view, this flag triggers a data refresh, ensuring the count updates immediately.
🤖 Generated with Claude Code