Site updated at 2016-05-07 22:15:46 UTC
This commit is contained in:
parent
166de0f733
commit
ae7d6e2076
20 changed files with 51 additions and 48 deletions
|
@ -399,6 +399,18 @@ You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in aut
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<h4><a class="title-link" name="get-apicamera_proxycameraltentity_id" href="#get-apicamera_proxycameraltentity_id"></a> GET /api/camera_proxy/camera.<entity_id></h4>
|
||||
<p>Returns the data (image) from the specified camera entity_id.</p>
|
||||
|
||||
<p>Sample <code>curl</code> command:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ curl -X GET -H "x-ha-access: YOUR_PASSWORD"\
|
||||
http://localhost:8123/api/camera_proxy/camera.my_sample_camera?time=1462653861261 -o image.jpg
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><a class="title-link" name="get-apidiscovery_info" href="#get-apidiscovery_info"></a> GET /api/discovery_info</h4>
|
||||
<p>Retrieve about the discovery feature.</p>
|
||||
|
||||
|
@ -416,23 +428,20 @@ 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 "x-ha-access: mypass" \
|
||||
<div class="code"><pre>$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
|
||||
http://localhost:8123/api/discovery_info
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4><a class="title-link" name="post-apistatesltentity_id" href="#post-apistatesltentity_id"></a> POST /api/states/<entity_id></h4>
|
||||
<p>Updates or creates the current state of an entity.</p>
|
||||
#### <a class='title-link' name='post-apistatesltentity_id' href='#post-apistatesltentity_id'></a> POST /api/states/&lt;entity_id>
|
||||
Updates or creates the current state of an entity.
|
||||
|
||||
<p>Expects a JSON object that has at least a state attribute:</p>
|
||||
Expects a JSON object that has at least a state attribute:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>{
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">state</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">below_horizon</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">attributes</span><span class="delimiter">"</span></span>: {
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">next_rising</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">07:04:15 29-10-2013</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">next_setting</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">18:00:31 29-10-2013</span><span class="delimiter">"</span></span>
|
||||
```json
|
||||
{
|
||||
"state": "below_horizon",
|
||||
"attributes": {
|
||||
"next_rising": "07:04:15 29-10-2013",
|
||||
"next_setting": "18:00:31 29-10-2013"
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue