> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slice Run telemetry for targeted analysis

> Analyze specific events without the noise of the surrounding data.

After completing this workflow, you can turn a section of existing telemetry in Explore into an ad hoc Run.

## Before you begin

* Identify the Asset or Run with the telemetry you want to use, and the time range within it you want to turn into a new Run, referred to as an ad hoc Run.
* To create an ad hoc Run using the API, you also need [a Sift API key and your base URLs](/documentation/manage/set-up-api-access), and the ID of each Asset you want to include.

## How ad hoc Runs work

An ad hoc Run is a Run created from a segment of historical data in a Time Series Panel in Explore. Ad hoc Runs let you perform diagnostic zooming or event isolation by stripping out unrelated noise.

For an explanation on how ad hoc Runs differs from Runs, see [Runs and ad hoc Runs](/documentation/reference/runs-reference#runs-and-ad-hoc-runs).

<Note>
  **Historical data only**: You can't create an ad hoc Run from a live stream.
</Note>

## Create an ad hoc Run

<Tabs sync={false}>
  <Tab title="UI">
    1. In **Explore**, open a **Time Series** Panel and plot one Channel from an Asset or Run.

    2. Optional. To include more than one Asset or Run, click **Select data**, open the **Assets** or **Runs** tab, select the additional Assets or Runs, and select **Update**.

    3. Click <Icon icon="square-dashed-circle-plus" /> **Select X** in the toolbar.

           <Note>
             **Select X** is disabled in live mode.
           </Note>

    4. Click and drag over the time range you want the Run to cover.

    5. Right-click the selection and select <Icon icon="plus" /> **Create Run**.

           <Note>
             **Create Run** is disabled unless the Panel is in **Absolute/UTC** time alignment.
           </Note>

    6. Enter a name for the Run.

    7. Optional. Enter a description for the Run.

    8. Select **Create**.
  </Tab>

  <Tab title="API">
    1. Call [`CreateAdhocRun`](/api-reference/runservice/createadhocrun) with [`name`](/api-reference/runservice/createadhocrun#body-name), [`description`](/api-reference/runservice/createadhocrun#body-description), [`start_time`](/api-reference/runservice/createadhocrun#body-start-time), [`stop_time`](/api-reference/runservice/createadhocrun#body-stop-time), and [`asset_ids`](/api-reference/runservice/createadhocrun#body-asset-ids). All five are required, and `start_time` must be before `stop_time`. `start_time` and `stop_time` use RFC 3339 format, for example `2024-05-26T13:59:28.569Z`.

       ```bash curl theme={null}
       curl -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" $SIFT_REST_URL/api/v2/runs:adhoc -d '{
         "name": "YOUR_AD_HOC_RUN_NAME",
         "description": "YOUR_AD_HOC_RUN_DESCRIPTION",
         "startTime": "2024-05-26T13:59:28.569Z",
         "stopTime": "2024-05-26T14:02:52.232Z",
         "assetIds": ["YOUR_ASSET_ID", "YOUR_OTHER_ASSET_ID"]
       }'
       ```

           <Info>
             **Client keys**: [`client_key`](/api-reference/runservice/createadhocrun#body-client-key) is an optional parameter on [`CreateAdhocRun`](/api-reference/runservice/createadhocrun) that lets you assign your own unique identifier to the Run. It's recommended because it makes querying the Run more convenient later. It can only be set once, at creation or on the first update.
           </Info>
  </Tab>
</Tabs>

## Verify

<Tabs sync={false}>
  <Tab title="UI">
    Open the new ad hoc Run and confirm:

    * **Name**: shows the name you gave it.
    * **Data**: returns data from the selected Asset(s) within the time range you defined.
    * **Availability**: appears as a data source you can add to the current investigation or navigate to directly.
  </Tab>

  <Tab title="API">
    In the [`CreateAdhocRun`](/api-reference/runservice/createadhocrun) response, confirm `run.runId` is populated and `run.isAdhoc` is `true`.
  </Tab>
</Tabs>

## Reference

* [Runs and ad hoc Runs](/documentation/reference/runs-reference#runs-and-ad-hoc-runs)
