|
|
@ -15,6 +15,10 @@ checks in user's account.</p> |
|
|
|
<td><code>GET SITE_ROOT/api/v1/checks/</code></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td><a href="#get-check">Create a single check</a></td> |
|
|
|
<td><code>GET SITE_ROOT/api/v1/checks/<uuid></code></td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td><a href="#create-check">Create a new check</a></td> |
|
|
|
<td><code>POST SITE_ROOT/api/v1/checks/</code></td> |
|
|
|
</tr> |
|
|
@ -174,6 +178,40 @@ is added. This identifier is stable across API calls. Example:</p> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|
<h2 class="rule" id="get-check">Get a single Check</h2> |
|
|
|
<p><code>GET SITE_ROOT/api/v1/checks/<uuid></code></p> |
|
|
|
<p>Returns a JSON object containing information information from a single check.</p> |
|
|
|
<h3>Response Codes</h3> |
|
|
|
<dl> |
|
|
|
<dt>200 OK</dt> |
|
|
|
<dd>The request succeeded.</dd> |
|
|
|
<dt>401 Unauthorized</dt> |
|
|
|
<dd>The API key is either missing or invalid.</dd> |
|
|
|
</dl> |
|
|
|
<h3>Example Request</h3> |
|
|
|
<div class="highlight"><pre><span></span><code>curl --header <span class="s2">"X-Api-Key: your-api-key"</span> SITE_ROOT/api/v1/checks/<uuid> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|
<h3>Example Response</h3> |
|
|
|
<div class="highlight"><pre><span></span><code><span class="p">{</span> |
|
|
|
<span class="nt">"channels"</span><span class="p">:</span> <span class="s2">"4ec5a071-2d08-4baa-898a-eb4eb3cd6941,746a083e-f542-4554-be1a-707ce16d3acc"</span><span class="p">,</span> |
|
|
|
<span class="nt">"desc"</span><span class="p">:</span> <span class="s2">"Longer free-form description goes here"</span><span class="p">,</span> |
|
|
|
<span class="nt">"grace"</span><span class="p">:</span> <span class="mi">900</span><span class="p">,</span> |
|
|
|
<span class="nt">"last_ping"</span><span class="p">:</span> <span class="s2">"2017-01-04T13:24:39.903464+00:00"</span><span class="p">,</span> |
|
|
|
<span class="nt">"n_pings"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> |
|
|
|
<span class="nt">"name"</span><span class="p">:</span> <span class="s2">"Api test 1"</span><span class="p">,</span> |
|
|
|
<span class="nt">"next_ping"</span><span class="p">:</span> <span class="s2">"2017-01-04T14:24:39.903464+00:00"</span><span class="p">,</span> |
|
|
|
<span class="nt">"pause_url"</span><span class="p">:</span> <span class="s2">"SITE_ROOT/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6/pause"</span><span class="p">,</span> |
|
|
|
<span class="nt">"ping_url"</span><span class="p">:</span> <span class="s2">"PING_ENDPOINT662ebe36-ecab-48db-afe3-e20029cb71e6"</span><span class="p">,</span> |
|
|
|
<span class="nt">"status"</span><span class="p">:</span> <span class="s2">"up"</span><span class="p">,</span> |
|
|
|
<span class="nt">"tags"</span><span class="p">:</span> <span class="s2">"foo"</span><span class="p">,</span> |
|
|
|
<span class="nt">"timeout"</span><span class="p">:</span> <span class="mi">3600</span><span class="p">,</span> |
|
|
|
<span class="nt">"update_url"</span><span class="p">:</span> <span class="s2">"SITE_ROOT/api/v1/checks/662ebe36-ecab-48db-afe3-e20029cb71e6"</span> |
|
|
|
<span class="p">}</span> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
|
|
|
|
<h2 class="rule" id="create-check">Create a Check</h2> |
|
|
|
<p><code>POST SITE_ROOT/api/v1/checks/</code></p> |
|
|
|
<p>Creates a new check and returns its ping URL. |
|
|
|