> For the complete documentation index, see [llms.txt](https://docs.apica.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apica.io/data-sources/ascent-synthetics/checks.md).

# Checks

### Follow the steps below to create and execute a query using the Ascent Checks Data Source.

***

### 1. Go to the Queries Page

* Navigate to the queries page in your dashboard to begin
* In the Queries page, click on the "New Query" button to start a new query

<figure><picture><source srcset="/files/HhNfq7eX1GEYA008XLNo" media="(prefers-color-scheme: dark)"><img src="/files/fNcABYCyBu4nmJsTykiX" alt=""></picture><figcaption></figcaption></figure>

### 2. Select "Ascent Checks" from the Left Sidebar

* On the left sidebar, click on **Ascent Checks**. This will display a list of all available checks that you can query.

<figure><picture><source srcset="/files/B3dBwyGEkOskYM2huMQp" media="(prefers-color-scheme: dark)"><img src="/files/Be268B519mnniS5SYDUl" alt=""></picture><figcaption></figcaption></figure>

### 3. Expand a check to uncover more details

* From the list, expand the check you want to query by clicking on it. This will show more details about the check.

<div align="left"><figure><picture><source srcset="/files/a610dNNonSxDP7zJlF35" media="(prefers-color-scheme: dark)"><img src="/files/uojNUHz09VB42Byk6qoM" alt="" width="325"></picture><figcaption></figcaption></figure></div>

### 4. Append the CheckID to the Query Editor to consume this check.

* Click on the right arrow next to the check id to append it to the query editor

<figure><picture><source srcset="/files/rmXOFB0im1MDklF8VmBO" media="(prefers-color-scheme: dark)"><img src="/files/U4fVgjngHRWbngRhfKXI" alt=""></picture><figcaption></figcaption></figure>

### 5. Add Duration or Start/End Date

* **To use a specific time range**, enter the **start** and **end** times as Unix epoch values.
* **To query relative durations**, use the **duration** option with a human-readable format (e.g., `1d` for one day, `2h` for two hours, etc.)
* Example:
  * **Start**: `1609459200` (Unix epoch for the start time)
  * **End**: `1609545600` (Unix epoch for the end time)
  * **Duration**: `1d` (relative to the current time)

<figure><picture><source srcset="/files/VePMdVn8xpLJkLfsr4X0" media="(prefers-color-scheme: dark)"><img src="/files/uPLehEcDkSH1tfo57nA1" alt=""></picture><figcaption></figcaption></figure>

### 6. Execute the Query

* Once your query is complete, click on **Execute** to run the query and see the results.

<figure><picture><source srcset="/files/MnfnromzfGZkNEadu73c" media="(prefers-color-scheme: dark)"><img src="/files/flEVEfdF1hALkSExXt2j" alt=""></picture><figcaption></figcaption></figure>

{% hint style="info" %}

### Check Data Source Query Options

The query for the **Ascent Checks Data Source** is written in **YAML** format. The following options are supported:

* **check\_id** (Mandatory):\
  The `check_id` refers to the **checkguid** of the check. You can find this in the sidebar when expanding a check.
* **start (mandatory if no duration)**:\
  The **start** time, provided as a Unix epoch value, defines the beginning of the time range for your query.
* **end (mandatory if no duration)**:\
  The **end** time, also in Unix epoch format, defines the end of the time range for your query.
* **duration (mandatory if no start/end)**:\
  A human-readable format for relative durations. It supports the following units:
  * `s` for seconds
  * `m` for minutes
  * `h` for hours
  * `d` for days\
    Example: `2d` for two days ago, `1h` for one hour ago.
* **limit(optional)**:\
  The **limit** option allows you to specify the maximum number of check results to retrieve. This helps to control the size of the query results.

***

#### Query Execution Notes

* By default, results are sorted by time in **descending** chronological order.
  {% endhint %}
