Updated curl example for pausing a check.

This commit is contained in:
Pēteris Caune 2017-06-27 13:40:15 +03:00
parent 638532adf4
commit 7faf53d71f
3 changed files with 8 additions and 2 deletions

View File

@ -336,6 +336,12 @@ To create a "cron" check, specify the "schedule" and "tz" parameters.
{% include "front/snippets/pause_check_request.html" %} {% include "front/snippets/pause_check_request.html" %}
<p>Note: the <code>--data ""</code> argument forces curl to send a
<code>Content-Length</code> request header even though the request body
is empty. For HTTP POST requests, the <code>Content-Length</code> header
is sometimes required by some network proxies and web servers.
</p>
<h3 class="api-section">Example Response</h3> <h3 class="api-section">Example Response</h3>
{% include "front/snippets/pause_check_response.html" %} {% include "front/snippets/pause_check_response.html" %}

View File

@ -1,3 +1,3 @@
<div class="highlight"><pre><span></span>curl {{ SITE_ROOT }}/api/v1/checks/0c8983c9-9d73-446f-adb5-0641fdacc9d4/pause <span class="se">\</span> <div class="highlight"><pre><span></span>curl {{ SITE_ROOT }}/api/v1/checks/0c8983c9-9d73-446f-adb5-0641fdacc9d4/pause <span class="se">\</span>
--request POST --header <span class="s2">&quot;X-Api-Key: your-api-key&quot;</span> --request POST --header <span class="s2">&quot;X-Api-Key: your-api-key&quot;</span> --data <span class="s2">&quot;&quot;</span>
</pre></div> </pre></div>

View File

@ -1,2 +1,2 @@
curl SITE_ROOT/api/v1/checks/0c8983c9-9d73-446f-adb5-0641fdacc9d4/pause \ curl SITE_ROOT/api/v1/checks/0c8983c9-9d73-446f-adb5-0641fdacc9d4/pause \
--request POST --header "X-Api-Key: your-api-key" --request POST --header "X-Api-Key: your-api-key" --data ""