-
Notifications
You must be signed in to change notification settings - Fork 762
Description
Describe the issue you are experiencing
The Supervisor's /core/api proxy returns 405 Method Not Allowed when an addon attempts to use DELETE HTTP methods. Only GET and POST methods are proxied to HA Core.
This prevents addons from calling HA Core REST API endpoints that require DELETE methods, such as
deleting automations, scripts, or scenes.
The same DELETE request works correctly when sent directly to HA Core (bypassing the Supervisor proxy).
Root cause: In supervisor/api/init.py, the /core/api proxy only registers GET and POST routes, missing
DELETE handlers.
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Steps to reproduce the issue
- Create an addon that uses SUPERVISOR_TOKEN for authentication
- From inside the addon container, execute:
curl -X DELETE -H "Authorization: Bearer $SUPERVISOR_TOKEN"
http://supervisor/core/api/config/automation/config/{automation_id} - Receive 405 Method Not Allowed response
- For comparison, the same request directly to HA Core works:
curl -X DELETE -H "Authorization: Bearer $HA_TOKEN"
http://homeassistant.local:8123/api/config/automation/config/{automation_id}
Returns: {"result": "ok"}
Anything in the Supervisor logs that might be useful for us?
No specific error logs - the 405 response is returned by the Supervisor's aiohttp routing layer before reaching the proxy handler, since DELETE routes are not registered.System information
System Health information will vary by installation.
This issue affects all Home Assistant OS/Supervised installations when addons attempt DELETE requests through the /core/api proxy.
Supervisor diagnostics
No response
Additional information
Affected HA Core REST API endpoints:
DELETE /api/states/{entity_id}
DELETE /api/config/automation/config/{id}
DELETE /api/config/script/config/{id}
DELETE /api/config/scene/config/{id}
...
Context: Discovered while developing an MCP (Model Context Protocol) Server addon that exposes Home Assistant
tools for AI agents. The addon needs to perform CRUD operations on automations/scripts/scenes via REST API.
Current workaround: Bypass the Supervisor proxy and connect directly to HA Core using a long-lived access token,
which defeats the purpose of the proxy abstraction.