---
title: "Execute a Query"
method: POST
path: "/searchConfigs/{queryId}/execute"
tags: ["Search Configs", "Query"]
---

# Execute a Query

`POST /searchConfigs/{queryId}/execute`

## Request

- Base URL: `https://env.unqork.io/api/1.0`
- URL: `https://env.unqork.io/api/1.0/searchConfigs/{queryId}/execute`
- Auth: OAuth 2
  - Client credentials
  - Password
  - Token URL: `https://xyzfinancial.unqork.io/api/1.0/oauth2/access_token`
- TypeScript: <https://skmtc.dev/unqork/apis/unqork-customer-api/docs/searchConfigs/:queryId/execute/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires "enable-search-service-for-query" feature flag. Must be an administrator or super-user to use this endpoint. Executes a Query to return records.
### Authorization Required:
  - Express Super User or Designer Administrator

## Path parameters

- `queryId` string, required

## Query parameters

- `countOnly` boolean
- `limit` integer
- `offset` integer
- `sort` string

## Request body

- object

## Response `201`

Array of records matching the query

- ModelRecord[]
  - `id` string: Id of Model Record
  - `data` object: Data Model data stored in Model Record
  - `owner` string: Owner of Data Model Record
  - `created` string: Timestamp of Model Record creation
  - `archived` boolean: Whether or not the Model Record has been archived

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/unqork/apis/unqork-customer-api.md) - [All operations](https://skmtc.dev/unqork/apis/unqork-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unqork/apis/unqork-customer-api/revisions/13dad4096373?raw)
