-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add entity delete endpoint (REST API) to docs #2646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Based on https://github.com/home-assistant/core/blob/f42b137c1b3071bbfafa1d026a153e082ad24054/homeassistant/components/api/__init__.py#L299-L305, entities that can be created and updated with the [REST API](https://developers.home-assistant.io/docs/api/rest), can also be deleted by it. The deletion part is missing from the documentation currently.
📝 WalkthroughWalkthroughA new section has been added to the REST API documentation describing the Changes
Assessment against linked issues
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/api/rest.md (1)
827-841
: Add response documentation for DELETE endpoint
The new<ApiEndpoint path="/api/states/<entity_id>" method="delete">
section currently only shows how to invoke the call. For consistency with other endpoints, please document the expected HTTP status codes (e.g.,200
or204
on success,404
if the entity isn’t found) and any response body or headers. Including a sample response will make this section more complete.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/api/rest.md
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
🔇 Additional comments (1)
docs/api/rest.md (1)
827-841
: Verify<ApiEndpoint>
DELETE support and rendering
Double‑check that the<ApiEndpoint>
component supports"delete"
(lowercase) in itsmethod
prop and that the new section renders correctly in the generated site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ChrSteinert 👍
../Frenck
Proposed change
Based on https://github.com/home-assistant/core/blob/f42b137c1b3071bbfafa1d026a153e082ad24054/homeassistant/components/api/__init__.py#L299-L305, entities that can be created and updated with the REST API, can also be deleted by it. The deletion part is missing from the documentation currently and this PR should change that.
Type of change
Checklist
Additional information
Summary by CodeRabbit