REST API: Add basic documentation of components API call (#2658)

This commit is contained in:
Daniel O'Connor
2025-09-13 03:51:09 +09:30
committed by GitHub
parent 615f3b02ff
commit 080c248ab7

View File

@@ -136,6 +136,40 @@ curl \
</ApiEndpoint>
<ApiEndpoint path="/api/components" method="get">
Returns a list of currently loaded components.
```
[
"currentcost.sensor",
"tapo.switch",
"tuya_ble.sensor",
"backup",
"ble_monitor.binary_sensor",
"localtuya.remote",
"logger",
"http",
"hacs",
"cast",
"device_tracker",
"upnp.binary_sensor",
"notify",
"person",
...
]
```
Sample `curl` command:
```shell
curl \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" http://localhost:8123/api/components
```
</ApiEndpoint>
<ApiEndpoint path="/api/events" method="get">
Returns an array of event objects. Each event object contains event name and listener count.