@@ -15,6 +15,7 @@ import (
|
||||
// VcenterCacheRebuild force-regenerates cached vCenter reference data in the database.
|
||||
// @Summary Rebuild vCenter object cache
|
||||
// @Description Rebuilds cached folder/resource-pool/host(cluster+datacenter) references from vCenter and rewrites the database cache tables.
|
||||
// @Description Requires Bearer authentication with the admin role.
|
||||
// @Tags vcenters
|
||||
// @Produce json
|
||||
// @Param vcenter query string false "Optional single vCenter URL to rebuild; defaults to all configured vCenters"
|
||||
@@ -22,6 +23,7 @@ import (
|
||||
// @Failure 400 {object} models.ErrorResponse "Invalid request"
|
||||
// @Failure 405 {object} models.ErrorResponse "Method not allowed"
|
||||
// @Failure 500 {object} models.VcenterCacheRebuildResponse "All rebuild attempts failed"
|
||||
// @Security BearerAuth
|
||||
// @Router /api/vcenters/cache/rebuild [post]
|
||||
func (h *Handler) VcenterCacheRebuild(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
|
||||
Reference in New Issue
Block a user