diff --git a/atom.xml b/atom.xml index 80bc5cf275..348aaa543c 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
This switch will shutdown your system that is hosting Home Assistant.
-This switch will shudown your host immediately, there will be no confirmation. +This switch will shutdown your host immediately, there will be no confirmation.
curl -X GET \ -H "x-ha-access: YOUR_PASSWORD" \ - http://localhost:8123/api/ + http://localhost:8123/ENDPOINT
from requests import get -url = 'http://localhost:8123/api/' +url = 'http://localhost:8123/ENDPOINT' headers = {'x-ha-access': 'YOUR_PASSWORD', 'content-type': 'application/json'} @@ -158,7 +158,7 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in autThe API supports the following actions:
-GET /api
+GET /api/
Returns message if API is up and running.
+@@ -169,6 +169,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in autSample
+ +curl
command:++++$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/ +GET /api/config
Returns the current configuration as JSON.
@@ -197,6 +205,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/config +
Returns all data needed to bootstrap Home Assistant.
@@ -211,6 +227,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/bootstrap +
Returns an array of event objects. Each event object contain event name and listener count.
@@ -229,6 +253,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/events +
Returns an array of service objects. Each object contains the domain and which services it contains.
@@ -252,6 +284,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
+Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/services +
Returns an array of state objects. Each state has the following attributes: entity_id, state, last_changed and attributes.
@@ -277,6 +317,14 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
+Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" http://IP_ADDRESS:8123/api/states +
Returns a state object for specified entity_id. Returns 404 if not found.
@@ -294,10 +342,16 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
+Sample curl
command:
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
+ http://IP_ADDRESS:8123/api/states/sensor.kitchen_temperature
+
Updates or creates the current state of an entity.
-Expects a JSON object that has atleast a state attribute:
+Expects a JSON object that has at least a state attribute:
{
@@ -327,6 +381,16 @@ You can append ?api_password=YOUR_PASSWORD
to any url to log in aut
Sample curl
command:
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"state": "25", "attributes": {"unit_of_measurement": "°C"}}' \ + http://localhost:8123/api/states/sensor.kitchen_temperature +
Fires an event with event_type
@@ -387,6 +451,16 @@ You can append?api_password=YOUR_PASSWORD
to any url to log in aut
Sample curl
command:
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \ + -d '{"entity_id": "switch.christmas_lights", "state": "on"}' \ + http://localhost:8123/api/services/switch/turn_on +
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.
diff --git a/developers/website/index.html b/developers/website/index.html index 313c37f7a4..0a7e5f98aa 100644 --- a/developers/website/index.html +++ b/developers/website/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/android/index.html b/getting-started/android/index.html index bff2b02d6c..554c67bc1b 100644 --- a/getting-started/android/index.html +++ b/getting-started/android/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/automation/index.html b/getting-started/automation/index.html index d1b400155c..b49106e247 100644 --- a/getting-started/automation/index.html +++ b/getting-started/automation/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/autostart/index.html b/getting-started/autostart/index.html index 5460112ce4..7f0bf45bf7 100644 --- a/getting-started/autostart/index.html +++ b/getting-started/autostart/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/configuration/index.html b/getting-started/configuration/index.html index caddbed44f..20e7179996 100644 --- a/getting-started/configuration/index.html +++ b/getting-started/configuration/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/devices/index.html b/getting-started/devices/index.html index 1eaa07649a..270856b747 100644 --- a/getting-started/devices/index.html +++ b/getting-started/devices/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/index.html b/getting-started/index.html index ad521ec2d0..da9ba93cb2 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/presence-detection/index.html b/getting-started/presence-detection/index.html index 0b4c1a8bc1..d7e097304c 100644 --- a/getting-started/presence-detection/index.html +++ b/getting-started/presence-detection/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/templating/index.html b/getting-started/templating/index.html index d0fd8e3c45..26114f5189 100644 --- a/getting-started/templating/index.html +++ b/getting-started/templating/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/troubleshooting-configuration/index.html b/getting-started/troubleshooting-configuration/index.html index 9356590bea..2daf85f688 100644 --- a/getting-started/troubleshooting-configuration/index.html +++ b/getting-started/troubleshooting-configuration/index.html @@ -22,7 +22,7 @@ - + diff --git a/getting-started/troubleshooting/index.html b/getting-started/troubleshooting/index.html index 96f24ecad4..ff1590c73e 100644 --- a/getting-started/troubleshooting/index.html +++ b/getting-started/troubleshooting/index.html @@ -22,7 +22,7 @@ - + diff --git a/help/index.html b/help/index.html index 4d1a8fc063..75e60cfee8 100644 --- a/help/index.html +++ b/help/index.html @@ -22,7 +22,7 @@ - + diff --git a/help/trivia/index.html b/help/trivia/index.html index 29639c50f2..17d48ff4e0 100644 --- a/help/trivia/index.html +++ b/help/trivia/index.html @@ -22,7 +22,7 @@ - + diff --git a/index.html b/index.html index 6397bdcb73..8830f54ebb 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ - +