Skip to content

/core/api proxy returns 405 Method Not Allowed for DELETE requests #6509

@parkghost

Description

@parkghost

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

  1. Create an addon that uses SUPERVISOR_TOKEN for authentication
  2. From inside the addon container, execute:
    curl -X DELETE -H "Authorization: Bearer $SUPERVISOR_TOKEN"
    http://supervisor/core/api/config/automation/config/{automation_id}
  3. Receive 405 Method Not Allowed response
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions