Skip to content

Make projectId optional for WebSub and WebBroker API list endpoints #1997

@coderabbitai

Description

@coderabbitai

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions