Update api_endpoints.yml - #51608
Conversation
Add the custom_host_vitals endpoints to server/api_endpoints/api_endpoints.yml to make them available for granular API-only user permissions.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughAdded six custom host vitals endpoint definitions to the Fleet API endpoint catalog. The definitions cover listing, creating, updating, and deleting custom host vitals, updating a host-specific vital value, and replacing all custom host vitals. Merge Risk: ⚪ Minimal · up to This localized catalog-only change exposes existing custom host vitals endpoints for granular API-only permissions without changing route behavior; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51608 +/- ##
==========================================
- Coverage 68.68% 68.68% -0.01%
==========================================
Files 4010 4010
Lines 260192 260192
Branches 13727 13727
==========================================
- Hits 178720 178713 -7
- Misses 65704 65710 +6
- Partials 15768 15769 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Related issue: Resolves #51607
Summary
Adds the six custom host vitals endpoints to the API-only user endpoint catalog
(
server/api_endpoints/api_endpoints.yml) so they can be granted via granularAPI-only user permissions.
These endpoints shipped with custom host vitals in v4.90.0 and are registered on
the normal user router, but were never added to the catalog. As a result they
don't appear in
GET /api/v1/fleet/rest_apiand can't be assigned to anAPI-only user's endpoint allowlist — so a customer building an API-only account
to manage custom host vital values has no way to scope access to them.
What changed
Added the following to
api_endpoints.yml(mirroring the REST API docs):/api/v1/fleet/custom_host_vitals/api/v1/fleet/custom_host_vitals/api/v1/fleet/custom_host_vitals/:id/api/v1/fleet/custom_host_vitals/:id/api/v1/fleet/hosts/:host_id/custom_host_vitals/:id/api/v1/fleet/spec/custom_host_vitalsNotes
endpoints to
api_endpoints.yml" step is manual and unenforced. Worth aseparate issue to add CI coverage that fails when a non-blocklisted registered
route is missing from the catalog.
Checklist for submitter
changes/.grantable.
(no user/invite/role endpoints).
Testing
TestValidateAPIEndpoints,TestCatalogBlocklist); rango test ./server/api_endpoints/...locally.Summary by CodeRabbit