Skip to content

feat: Add on-demand federated API discovery UI with async task management and result rendering#1383

Open
DinithEdirisinghe wants to merge 12 commits into
wso2:manual-federation-featurefrom
DinithEdirisinghe:main
Open

feat: Add on-demand federated API discovery UI with async task management and result rendering#1383
DinithEdirisinghe wants to merge 12 commits into
wso2:manual-federation-featurefrom
DinithEdirisinghe:main

Conversation

@DinithEdirisinghe

Copy link
Copy Markdown

Summary

This PR introduces the Publisher Portal UI for the on-demand federated API discovery feature. It enables users to manually trigger API discovery from external gateways (AWS, Azure, Apigee, Kong), monitor the async discovery task status, review discovered APIs categorized as NEW or UPDATE, and selectively import or update them into WSO2 API Manager.


File Changes

package.json
Fixed the build:prod, build:dev, and analysis npm scripts to correctly use cross-env for setting environment variables. The original scripts used a semicolon (;) to separate the cross-env prefix from the build command chain, which caused the environment variable to be silently dropped before the build ran on all platforms. The fix brings these scripts in line with the pattern already used by the devportal portal.

package-lock.json
Updated the lockfile reflecting dependency resolution changes — added the optional fsevents (macOS file watcher) entry and removed a stale @types/react peer dependency nested under swagger-ui-react. These are standard lockfile reconciliation changes.

en.json
Added localization strings for all new UI elements introduced by the federated API discovery feature, including labels for the discover button, task status messages (PENDING, COMPLETED, FAILED), table column headers, import/update action buttons, and empty-state messages.

Apis.jsx
Added the client-side route definition for the new discovery page (/apis/discover), wiring it to the DiscoverAPIs component so users can navigate to it within the Publisher SPA.

DiscoverAPIs.jsx (new file)
The top-level page component for the on-demand discovery flow. Handles environment selection, triggers the POST /federated-apis/discover REST call, polls the task status endpoint, reads cached results from the DB-backed cache endpoint, and passes categorized API lists (NEW / UPDATE) down to DiscoveryResults.

DiscoveryResults.jsx (new file)
The main results display component. Renders discovered APIs in a tabbed view separating NEW and UPDATE categories, with a data table showing API name, version, context, gateway type, and status badge. Provides per-row and bulk checkboxes to select APIs for import or update, and calls the respective POST /federated-apis/import and POST /federated-apis/update endpoints on confirmation.

DiscoverAPIsCard.jsx (new file)
A landing page card component for the "Discover APIs" entry point. Displayed on the Publisher landing page alongside existing cards like "Create API" and "Import API". Includes an icon, title, and description that routes the user to /apis/discover.

index.jsx (Listing/Landing)
Added the DiscoverAPIsCard to the Publisher portal landing page grid, making the discovery entry point visible to users who have access to federated gateway environments.

TopMenu.jsx
Added a "Discover APIs" menu item to the top navigation bar of the API listing view, with appropriate visibility gating via FederatedAPIDiscoveryRouteGuard so the option only appears for users whose organization has external gateway environments configured.

ApisSection.jsx
Updated the Publisher landing APIs section to include the new discover card alongside the existing create and import options.

FederatedAPIDiscoveryRouteGuard.jsx (new file)
A shared route guard component that conditionally renders its children only when the Publisher settings response includes at least one external gateway environment. Used to hide discovery-related UI elements for organizations that have no federated gateways configured, preventing confusion.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b456625d-234c-47a4-bb05-1c254d81be10

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@DinithEdirisinghe

Copy link
Copy Markdown
Author
on.demand.federated.api.discovery.UI.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant