mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 22:06:50 +00:00
parent
a39b33de8a
commit
7586adf828
@ -54,7 +54,7 @@ Successful calls will return status code 200 or 201. Other status codes that can
|
|||||||
The API supports the following actions:
|
The API supports the following actions:
|
||||||
|
|
||||||
#### {% linkable_title GET /api/ %}
|
#### {% linkable_title GET /api/ %}
|
||||||
Returns message if API is up and running.
|
Returns a message if the API is up and running.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -142,7 +142,7 @@ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### {% linkable_title GET /api/events %}
|
#### {% linkable_title GET /api/events %}
|
||||||
Returns an array of event objects. Each event object contain event name and listener count.
|
Returns an array of event objects. Each event object contains event name and listener count.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
@ -193,7 +193,7 @@ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### {% linkable_title GET /api/history %}
|
#### {% linkable_title GET /api/history %}
|
||||||
Returns an array of state changes in the past. Each object contains further detail for the entities.
|
Returns an array of state changes in the past. Each object contains further details for the entities.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
@ -377,7 +377,7 @@ Returns a message if successful.
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### {% linkable_title POST /api/services/<domain>/<service> %}
|
#### {% linkable_title POST /api/services/<domain>/<service> %}
|
||||||
Calls a service within a specific domain. Will return when the service has been executed or 10 seconds has past, whichever comes first.
|
Calls a service within a specific domain. Will return when the service has been executed or after 10 seconds, whichever comes first.
|
||||||
|
|
||||||
You can pass an optional JSON object to be used as `service_data`.
|
You can pass an optional JSON object to be used as `service_data`.
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ $ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
|||||||
```
|
```
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
The result will include any changed states that changed while the service was being executed, even if their change was the result of something else happening in the system.
|
The result will include any states that changed while the service was being executed, even if their change was the result of something else happening in the system.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### {% linkable_title POST /api/template %}
|
#### {% linkable_title POST /api/template %}
|
||||||
@ -455,7 +455,7 @@ Requires a JSON object that represents the API to forward to.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
It will return a message if event forwarding was setup successful.
|
It will return a message if event forwarding was set up successfully.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -476,7 +476,7 @@ Requires a JSON object that represents the API to cancel forwarding to.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
It will return a message if event forwarding was cancelled successful.
|
It will return a message if event forwarding was cancelled successfully.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user