forked from GithubBackups/healthchecks
Update the section about read-write and read-only API keys.
This commit is contained in:
parent
d6c0d9722b
commit
c160045bda
@ -16,11 +16,7 @@ checks in user's account.</p>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#get-check">Get a single check</a></td>
|
<td><a href="#get-check">Get a single check</a></td>
|
||||||
<td><code>GET SITE_ROOT/api/v1/checks/<uuid></code></td>
|
<td><code>GET SITE_ROOT/api/v1/checks/<uuid></code><br><code>GET SITE_ROOT/api/v1/checks/<unique_key></code></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href="#get-check">Get a check by its unique_key</a></td>
|
|
||||||
<td><code>GET SITE_ROOT/api/v1/checks/<unique_key></code></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#create-check">Create a new check</a></td>
|
<td><a href="#create-check">Create a new check</a></td>
|
||||||
@ -44,7 +40,7 @@ checks in user's account.</p>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#list-flips">Get a list of check's status changes</a></td>
|
<td><a href="#list-flips">Get a list of check's status changes</a></td>
|
||||||
<td><code>GET SITE_ROOT/api/v1/checks/<uuid>/flips/</code></td>
|
<td><code>GET SITE_ROOT/api/v1/checks/<uuid>/flips/</code><br><code>GET SITE_ROOT/api/v1/checks/<unique_key>/flips/</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="#list-channels">Get a list of existing integrations</a></td>
|
<td><a href="#list-channels">Get a list of existing integrations</a></td>
|
||||||
@ -54,34 +50,27 @@ checks in user's account.</p>
|
|||||||
</table>
|
</table>
|
||||||
<h2>Authentication</h2>
|
<h2>Authentication</h2>
|
||||||
<p>Your requests to SITE_NAME Management API must authenticate using an
|
<p>Your requests to SITE_NAME Management API must authenticate using an
|
||||||
API key. Each project in your SITE_NAME account has separate API keys.
|
API key. API keys are project-specific, there are no account-wide API keys.
|
||||||
There are no account-wide API keys. By default, a project on SITE_NAME doesn't have
|
By default, a project on SITE_NAME doesn't have an API key. You can create read-write
|
||||||
an API key. You can create read-write and read-only API keys in the
|
and read-only API keys in the <strong>Project Settings</strong> page.</p>
|
||||||
<strong>Project Settings</strong> page.</p>
|
<dl>
|
||||||
<table>
|
<dt>read-write key</dt>
|
||||||
<thead>
|
<dd>Has full access to all documented API endpoints.</dd>
|
||||||
<tr>
|
<dt>read-only key</dt>
|
||||||
<th>Key Type</th>
|
<dd>
|
||||||
<th>Description</th>
|
<p>Only works with the following API endpoints:</p>
|
||||||
</tr>
|
<ul>
|
||||||
</thead>
|
<li><a href="#list-checks">Get a list of existing checks</a></li>
|
||||||
<tbody>
|
<li><a href="#get-check">Get a single check</a></li>
|
||||||
<tr>
|
<li><a href="#list-flips">Get a list of check's status changes</a></li>
|
||||||
<td>Regular API key</td>
|
</ul>
|
||||||
<td>Has full access to all documented API endpoints.</td>
|
<p>Omits some fields from the API responses (documented below).</p>
|
||||||
</tr>
|
</dd>
|
||||||
<tr>
|
</dl>
|
||||||
<td>Read-only API key</td>
|
<p>The client can authenticate itself by including an <code>X-Api-Key: <your-api-key></code>
|
||||||
<td>Only works with the <a href="#list-checks">Get a list of existing checks</a> and <a href="#get-check">Get a single check</a> endpoints. Some fields are omitted from the API responses.</td>
|
header in a HTTP request. Alternatively, for POST requests with a JSON request body,
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p>The client can authenticate itself by sending an appropriate HTTP
|
|
||||||
request header. The header's name should be <code>X-Api-Key</code> and
|
|
||||||
its value should be your API key.</p>
|
|
||||||
<p>Alternatively, for POST requests with a JSON request body,
|
|
||||||
the client can include an <code>api_key</code> field in the JSON document.
|
the client can include an <code>api_key</code> field in the JSON document.
|
||||||
See below the "Create a check" section for an example.</p>
|
See the <a href="#create-check">Create a new check</a> section for an example.</p>
|
||||||
<h2>API Requests</h2>
|
<h2>API Requests</h2>
|
||||||
<p>For POST requests, the SITE_NAME API expects request body to be
|
<p>For POST requests, the SITE_NAME API expects request body to be
|
||||||
a JSON document (<em>not</em> a <code>multipart/form-data</code> encoded form data).</p>
|
a JSON document (<em>not</em> a <code>multipart/form-data</code> encoded form data).</p>
|
||||||
|
@ -8,37 +8,38 @@ checks in user's account.
|
|||||||
Endpoint Name | Endpoint Address
|
Endpoint Name | Endpoint Address
|
||||||
------------------------------------------------------|-------
|
------------------------------------------------------|-------
|
||||||
[Get a list of existing checks](#list-checks) | `GET SITE_ROOT/api/v1/checks/`
|
[Get a list of existing checks](#list-checks) | `GET SITE_ROOT/api/v1/checks/`
|
||||||
[Get a single check](#get-check) | `GET SITE_ROOT/api/v1/checks/<uuid>`
|
[Get a single check](#get-check) | `GET SITE_ROOT/api/v1/checks/<uuid>`<br>`GET SITE_ROOT/api/v1/checks/<unique_key>`
|
||||||
[Get a check by its unique_key](#get-check) | `GET SITE_ROOT/api/v1/checks/<unique_key>`
|
|
||||||
[Create a new check](#create-check) | `POST SITE_ROOT/api/v1/checks/`
|
[Create a new check](#create-check) | `POST SITE_ROOT/api/v1/checks/`
|
||||||
[Update an existing check](#update-check) | `POST SITE_ROOT/api/v1/checks/<uuid>`
|
[Update an existing check](#update-check) | `POST SITE_ROOT/api/v1/checks/<uuid>`
|
||||||
[Pause monitoring of a check](#pause-check) | `POST SITE_ROOT/api/v1/checks/<uuid>/pause`
|
[Pause monitoring of a check](#pause-check) | `POST SITE_ROOT/api/v1/checks/<uuid>/pause`
|
||||||
[Delete check](#delete-check) | `DELETE SITE_ROOT/api/v1/checks/<uuid>`
|
[Delete check](#delete-check) | `DELETE SITE_ROOT/api/v1/checks/<uuid>`
|
||||||
[Get a list of check's logged pings](#list-pings) | `GET SITE_ROOT/api/v1/checks/<uuid>/pings/`
|
[Get a list of check's logged pings](#list-pings) | `GET SITE_ROOT/api/v1/checks/<uuid>/pings/`
|
||||||
[Get a list of check's status changes](#list-flips) | `GET SITE_ROOT/api/v1/checks/<uuid>/flips/`
|
[Get a list of check's status changes](#list-flips) | `GET SITE_ROOT/api/v1/checks/<uuid>/flips/`<br>`GET SITE_ROOT/api/v1/checks/<unique_key>/flips/`
|
||||||
[Get a list of existing integrations](#list-channels) | `GET SITE_ROOT/api/v1/channels/`
|
[Get a list of existing integrations](#list-channels) | `GET SITE_ROOT/api/v1/channels/`
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
Your requests to SITE_NAME Management API must authenticate using an
|
Your requests to SITE_NAME Management API must authenticate using an
|
||||||
API key. Each project in your SITE_NAME account has separate API keys.
|
API key. API keys are project-specific, there are no account-wide API keys.
|
||||||
There are no account-wide API keys. By default, a project on SITE_NAME doesn't have
|
By default, a project on SITE_NAME doesn't have an API key. You can create read-write
|
||||||
an API key. You can create read-write and read-only API keys in the
|
and read-only API keys in the **Project Settings** page.
|
||||||
**Project Settings** page.
|
|
||||||
|
|
||||||
Key Type | Description
|
read-write key
|
||||||
-------------------|------------
|
: Has full access to all documented API endpoints.
|
||||||
Regular API key | Has full access to all documented API endpoints.
|
|
||||||
Read-only API key | Only works with the [Get a list of existing checks](#list-checks) and [Get a single check](#get-check) endpoints. Some fields are omitted from the API responses.
|
|
||||||
|
|
||||||
The client can authenticate itself by sending an appropriate HTTP
|
read-only key
|
||||||
request header. The header's name should be `X-Api-Key` and
|
: Only works with the following API endpoints:
|
||||||
its value should be your API key.
|
|
||||||
|
|
||||||
|
* [Get a list of existing checks](#list-checks)
|
||||||
|
* [Get a single check](#get-check)
|
||||||
|
* [Get a list of check's status changes](#list-flips)
|
||||||
|
|
||||||
Alternatively, for POST requests with a JSON request body,
|
Omits some fields from the API responses (documented below).
|
||||||
|
|
||||||
|
The client can authenticate itself by including an `X-Api-Key: <your-api-key>`
|
||||||
|
header in a HTTP request. Alternatively, for POST requests with a JSON request body,
|
||||||
the client can include an `api_key` field in the JSON document.
|
the client can include an `api_key` field in the JSON document.
|
||||||
See below the "Create a check" section for an example.
|
See the [Create a new check](#create-check) section for an example.
|
||||||
|
|
||||||
## API Requests
|
## API Requests
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user