Browse Source

Updated curl example for pausing a check.

pull/125/head
Pēteris Caune 7 years ago
parent
commit
7faf53d71f
3 changed files with 8 additions and 2 deletions
  1. +6
    -0
      templates/front/docs_api.html
  2. +1
    -1
      templates/front/snippets/pause_check_request.html
  3. +1
    -1
      templates/front/snippets/pause_check_request.txt

+ 6
- 0
templates/front/docs_api.html View File

@ -336,6 +336,12 @@ To create a "cron" check, specify the "schedule" and "tz" parameters.
{% 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>
{% include "front/snippets/pause_check_response.html" %}


+ 1
- 1
templates/front/snippets/pause_check_request.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>
--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>

+ 1
- 1
templates/front/snippets/pause_check_request.txt View File

@ -1,2 +1,2 @@
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 ""

Loading…
Cancel
Save