Browse Source

Improve response code descriptions in Ping API docs

pull/563/head
Pēteris Caune 3 years ago
parent
commit
9299ee4516
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
3 changed files with 40 additions and 36 deletions
  1. +4
    -0
      static/css/docs.css
  2. +18
    -18
      templates/docs/http_api.html
  3. +18
    -18
      templates/docs/http_api.md

+ 4
- 0
static/css/docs.css View File

@ -104,6 +104,10 @@ h2.rule {
grid-template-columns: 150px auto;
}
.page-docs .docs-http_api dl {
grid-template-columns: 220px auto;
}
.page-docs dt {
font-weight: normal;
font-family: "Lucida Console", Monaco, monospace;


+ 18
- 18
templates/docs/http_api.html View File

@ -59,7 +59,7 @@ code and ignore the request.</p>
</tr>
<tr>
<td><a href="#exitcode-uuid">Report script's exit status (UUID)</a></td>
<td><code>PING_ENDPOINT&lt;uuid&gt;/&lt;exitcode&gt;</code></td>
<td><code>PING_ENDPOINT&lt;uuid&gt;/&lt;exit-status&gt;</code></td>
</tr>
<tr>
<td><a href="#success-slug">Success (slug)</a></td>
@ -75,7 +75,7 @@ code and ignore the request.</p>
</tr>
<tr>
<td><a href="#exitcode-slug">Report script's exit status (slug)</a></td>
<td><code>PING_ENDPOINT&lt;ping-key&gt;/&lt;slug&gt;/&lt;exitcode&gt;</code></td>
<td><code>PING_ENDPOINT&lt;ping-key&gt;/&lt;slug&gt;/&lt;exit-status&gt;</code></td>
</tr>
</tbody>
</table>
@ -90,7 +90,7 @@ a continuously running process is still running and healthy).</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified UUID.</dd>
</dl>
<p><strong>Example</strong></p>
@ -124,7 +124,7 @@ but it enables a few extra features:</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified UUID.</dd>
</dl>
<p><strong>Example</strong></p>
@ -154,7 +154,7 @@ minimizes the delay from your monitored service failing to you receiving an aler
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified UUID.</dd>
</dl>
<p><strong>Example</strong></p>
@ -185,9 +185,9 @@ interprets 0 as success and all other values as failure.</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>400 Bad Request</dt>
<dd>Invalid URL format.</dd>
<dt>404 Not Found</dt>
<dt>400 invalid url format</dt>
<dd>The URL does not match the expected format.</dd>
<dt>404 not found</dt>
<dd>Could not find a check with the specified UUID.</dd>
</dl>
<p><strong>Example</strong></p>
@ -218,9 +218,9 @@ included in the URL.</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified ping key and slug combination.</dd>
<dt>409 Conflict</dt>
<dt>409 ambiguous slug</dt>
<dd>Ambiguous, the slug matched multiple checks.</dd>
</dl>
<p><strong>Example</strong></p>
@ -255,9 +255,9 @@ included in the URL.</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified ping key and slug combination.</dd>
<dt>409 Conflict</dt>
<dt>409 ambiguous slug</dt>
<dd>Ambiguous, the slug matched multiple checks.</dd>
</dl>
<p><strong>Example</strong></p>
@ -288,9 +288,9 @@ included in the URL.</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>404 Not Found</dt>
<dt>404 not found</dt>
<dd>Could not find a check with the specified ping key and slug combination.</dd>
<dt>409 Conflict</dt>
<dt>409 ambiguous slug</dt>
<dd>Ambiguous, the slug matched multiple checks.</dd>
</dl>
<p><strong>Example</strong></p>
@ -322,11 +322,11 @@ included in the URL.</p>
<dl>
<dt>200 OK</dt>
<dd>The request succeeded.</dd>
<dt>400 Bad Request</dt>
<dd>Invalid URL format.</dd>
<dt>404 Not Found</dt>
<dt>400 invalid url format</dt>
<dd>The URL does not match the expected format.</dd>
<dt>404 not found</dt>
<dd>Could not find a check with the specified ping key and slug combination.</dd>
<dt>409 Conflict</dt>
<dt>409 ambiguous slug</dt>
<dd>Ambiguous, the slug matched multiple checks.</dd>
</dl>
<p><strong>Example</strong></p>


+ 18
- 18
templates/docs/http_api.md View File

@ -54,11 +54,11 @@ Endpoint Name | Endpoint Address
[Success (UUID)](#success-uuid) | `PING_ENDPOINT<uuid>`
[Start (UUID)](#start-uuid) | `PING_ENDPOINT<uuid>/start`
[Failure (UUID)](#fail-uuid) | `PING_ENDPOINT<uuid>/fail`
[Report script's exit status (UUID)](#exitcode-uuid) | `PING_ENDPOINT<uuid>/<exitcode>`
[Report script's exit status (UUID)](#exitcode-uuid) | `PING_ENDPOINT<uuid>/<exit-status>`
[Success (slug)](#success-slug) | `PING_ENDPOINT<ping-key>/<slug>`
[Start (slug)](#start-slug) | `PING_ENDPOINT<ping-key>/<slug>/start`
[Failure (slug)](#fail-slug) | `PING_ENDPOINT<ping-key>/<slug>/fail`
[Report script's exit status (slug)](#exitcode-slug) | `PING_ENDPOINT<ping-key>/<slug>/<exitcode>`
[Report script's exit status (slug)](#exitcode-slug) | `PING_ENDPOINT<ping-key>/<slug>/<exit-status>`
## Send a "success" Signal Using UUID {: #success-uuid .rule }
@ -76,7 +76,7 @@ SITE_NAME identifies the check by the UUID value included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified UUID.
**Example**
@ -117,7 +117,7 @@ SITE_NAME identifies the check by the UUID value included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified UUID.
**Example**
@ -155,7 +155,7 @@ SITE_NAME identifies the check by the UUID value included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified UUID.
**Example**
@ -194,10 +194,10 @@ SITE_NAME identifies the check by the UUID value included in the URL.
200 OK
: The request succeeded.
400 Bad Request
: Invalid URL format.
400 invalid url format
: The URL does not match the expected format.
404 Not Found
404 not found
: Could not find a check with the specified UUID.
**Example**
@ -236,10 +236,10 @@ included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified ping key and slug combination.
409 Conflict
409 ambiguous slug
: Ambiguous, the slug matched multiple checks.
**Example**
@ -281,10 +281,10 @@ included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified ping key and slug combination.
409 Conflict
409 ambiguous slug
: Ambiguous, the slug matched multiple checks.
**Example**
@ -323,10 +323,10 @@ included in the URL.
200 OK
: The request succeeded.
404 Not Found
404 not found
: Could not find a check with the specified ping key and slug combination.
409 Conflict
409 ambiguous slug
: Ambiguous, the slug matched multiple checks.
**Example**
@ -366,13 +366,13 @@ included in the URL.
200 OK
: The request succeeded.
400 Bad Request
: Invalid URL format.
400 invalid url format
: The URL does not match the expected format.
404 Not Found
404 not found
: Could not find a check with the specified ping key and slug combination.
409 Conflict
409 ambiguous slug
: Ambiguous, the slug matched multiple checks.
**Example**


Loading…
Cancel
Save