Skip to content

docs: add dashboard BFF API reference#115

Open
poox41 wants to merge 1 commit into
kubeedge:mainfrom
poox41:docs/bff-api-reference
Open

docs: add dashboard BFF API reference#115
poox41 wants to merge 1 commit into
kubeedge:mainfrom
poox41:docs/bff-api-reference

Conversation

@poox41
Copy link
Copy Markdown

@poox41 poox41 commented May 21, 2026

What type of PR is this?

/kind documentation

What this PR does / why we need it:

This PR adds a Dashboard BFF API reference document.

The document covers:

  • BFF responsibilities
  • authentication and cluster connection model
  • common list query parameters
  • common list response format
  • Kubernetes resource APIs
  • RBAC resource APIs
  • KubeEdge resource APIs
  • CRD, version, and Keink APIs

It helps frontend developers and downstream users understand the existing Dashboard backend APIs.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

This is a documentation-only change.

@kubeedge-bot kubeedge-bot added the kind/documentation Categorizes issue or PR as related to documentation. label May 21, 2026
@kubeedge-bot kubeedge-bot requested review from DoisLONG and ghosind May 21, 2026 09:00
@kubeedge-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: poox41
To complete the pull request process, please assign vincentgoat after the PR has been reviewed.
You can assign the PR to them by writing /assign @vincentgoat in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot
Copy link
Copy Markdown
Collaborator

Welcome @poox41! It looks like this is your first PR to kubeedge/dashboard 🎉

@kubeedge-bot kubeedge-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 21, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new documentation file, docs/bff-api-reference.md, which provides a detailed reference for the KubeEdge Dashboard BFF API. The document covers authentication, cluster connection, and lists various endpoints for Kubernetes, RBAC, and KubeEdge resources. Review feedback suggested removing specific route counts to reduce maintenance overhead and identified missing name parameters in the PUT request paths for several resources, including Nodes and Deployments, to ensure consistency with other CRUD operations.

Comment thread docs/bff-api-reference.md
/api/v1
```

The current BFF server registers 99 HTTP routes, covering Kubernetes native resources, KubeEdge resources, RBAC resources, CRD query APIs, version query APIs, and Keink installation APIs.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The specific count of 99 HTTP routes is likely to become outdated as the API evolves. Consider using a more general description to reduce maintenance overhead. This also applies to the summary table on line 330.

Suggested change
The current BFF server registers 99 HTTP routes, covering Kubernetes native resources, KubeEdge resources, RBAC resources, CRD query APIs, version query APIs, and Keink installation APIs.
The current BFF server registers a comprehensive set of HTTP routes, covering Kubernetes native resources, KubeEdge resources, RBAC resources, CRD query APIs, version query APIs, and Keink installation APIs.

Comment thread docs/bff-api-reference.md
| --- | --- | --- |
| GET | `/api/v1/node` | List nodes. Supports pagination, filtering, and sorting. |
| GET | `/api/v1/node/{name}` | Get node detail by name. |
| PUT | `/api/v1/node` | Update a node. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PUT path for updating a node is missing the {name} parameter, which is inconsistent with the GET (detail) and DELETE routes for the same resource. Typically, PUT operations target a specific resource instance. Please verify if the actual API implementation requires the name in the path.

Suggested change
| PUT | `/api/v1/node` | Update a node. |
| PUT | /api/v1/node/{name} | Update a node. |

Comment thread docs/bff-api-reference.md
| GET | `/api/v1/deployment/{namespace}` | List deployments in a namespace. Supports pagination, filtering, and sorting. |
| GET | `/api/v1/deployment/{namespace}/{name}` | Get deployment detail. |
| POST | `/api/v1/deployment/{namespace}` | Create a deployment in a namespace. |
| PUT | `/api/v1/deployment/{namespace}` | Update a deployment in a namespace. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the Node API, the PUT path for Deployment is missing the {name} parameter. For consistency with the GET and DELETE endpoints for the same resource, the path should likely include the resource name. This pattern appears to affect most PUT routes in this document (e.g., ConfigMap, Secret, Service, etc.).

Suggested change
| PUT | `/api/v1/deployment/{namespace}` | Update a deployment in a namespace. |
| PUT | /api/v1/deployment/{namespace}/{name} | Update a deployment. |

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

Labels

kind/documentation Categorizes issue or PR as related to documentation. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants