---
title: "Bind Snapquery To Results"
method: GET
path: "/bind_snapquery_to_results/{snapquery_id}"
---

# Bind Snapquery To Results

`GET /bind_snapquery_to_results/{snapquery_id}`

When the same query is run multiple times, it is wasteful to repeat the actual query, both in terms of time and disk space.

For queries saved with the snapshot feature, this endpoint allows us to avoid rerunning the query.

Here we are just associating the snapshot data with the query_id of results in the database. When the frontend next sees a snapshot with this snapquery_id, the frontend will skip the query and instead load cached results.

## Path parameters

- `snapquery_id` integer, required

## Query parameters

- `query_id` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/merck/apis/matcher-backend.md) · [All operations](https://skmtc.dev/merck/apis/matcher-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/merck/matcher-backend/revisions/59028f512f31/schema)
