Site updated at 2016-02-01 10:04:30 UTC

This commit is contained in:
Travis CI 2016-02-01 10:04:30 +00:00
parent b73495954a
commit 97363e0789
39 changed files with 551 additions and 179 deletions

View file

@ -115,8 +115,8 @@
<p>Home Assistant runs a web server accessible on port 8123.</p>
<ul>
<li>http://localhost:8123/ is an interface to control Home Assistant.</li>
<li>http://localhost:8123/api/ is a Rest API.</li>
<li>http://IP_ADDRESS:8123/ is an interface to control Home Assistant.</li>
<li>http://IP_ADDRESS:8123/api/ is a Rest API.</li>
</ul>
<p>The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header <code>X-HA-Access: YOUR_PASSWORD</code> (YOUR_PASSWORD as specified in your <code>configuration.yaml</code> file).</p>
@ -126,7 +126,7 @@
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>curl -X GET \
-H &quot;x-ha-access: YOUR_PASSWORD&quot; \
http://localhost:8123/ENDPOINT
http://IP_ADDRESS:8123/ENDPOINT
</pre></div>
</div>
</div>
@ -177,7 +177,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/
</pre></div>
</div>
</div>
@ -213,7 +213,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/config
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/config
</pre></div>
</div>
</div>
@ -235,7 +235,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/bootstrap
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/bootstrap
</pre></div>
</div>
</div>
@ -261,7 +261,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/events
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/events
</pre></div>
</div>
</div>
@ -292,7 +292,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/services
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/services
</pre></div>
</div>
</div>
@ -325,7 +325,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://IP_ADDRESS:8123/api/states
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; http://localhost:8123/api/states
</pre></div>
</div>
</div>
@ -351,7 +351,7 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; \
http://IP_ADDRESS:8123/api/states/sensor.kitchen_temperature
http://localhost:8123/api/states/sensor.kitchen_temperature
</pre></div>
</div>
</div>
@ -367,6 +367,15 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
</div>
</div>
<p>Sample <code>curl</code> command:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET -H &quot;x-ha-access: YOUR_PASSWORD&quot; \
http://localhost:8123/api/error_log
</pre></div>
</div>
</div>
<h4><a class="title-link" name="post-apistatesltentity_id" href="#post-apistatesltentity_id"></a> POST /api/states/&lt;entity_id&gt;</h4>
<p>Updates or creates the current state of an entity.</p>