wso2 / wso2/api-platform

Make projectId optional for WebSub and WebBroker API list endpoints

Open
#1,997 0 comments 0 reactions 1 assignee View on GitHub

@senthuran16 is already working on this.

Since May 20, 2026.

Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Summary

The list endpoints for both WebSub APIs and WebBroker APIs currently require a non-empty projectId query parameter and return 400 Bad Request when it is absent. This blocks org-level listing (i.e., listing all APIs across all projects within an organization).

The underlying service layer already supports optional project filtering — an empty projectId is passed through to the repository, which omits the project_uuid filter and returns all APIs for the org.

Affected Files

  • platform-api/src/internal/handler/websub_api.go (lines 100–104)
  • platform-api/src/internal/handler/webbroker_api.go (lines 100–104)

Expected Behavior

projectId should be an optional query parameter. When omitted, both list endpoints should return all APIs for the organization.

Fix

Remove the early-return block that rejects an empty projectId in both handlers, allowing the empty string to flow into the service List call unchanged.

References

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.