---
title: "Run App Query"
method: POST
path: "/api/v1/apps/{app_id}/query"
tags: ["apps-query"]
---

# Run App Query

`POST /api/v1/apps/{app_id}/query`

Run a guarded SELECT against the app's bound ontology entities.

## Path parameters

- `app_id` string, uuid, required

## Request body

- AppQueryRequest — Body for POST /api/v1/apps/{app_id}/query. Single mode: caller passes optional ``limit`` (default 1000, max 5000). Pagination is NOT supported at this endpoint — write ``LIMIT N OFFSET M`` directly in your SQL if you need it. Earlier ``page`` / ``page_size`` params were removed because the engine never threaded ``page`` into a real OFFSET (silently returned the same first ``page_size`` rows on every page) — see PR #375 review.
  - `sql` string, required
  - `limit` integer, nullable

## Response `200`

Successful Response

- AppQueryResponse
  - `columns` string[], required
  - `rows` object[], required
  - `total_rows` integer, required
  - `truncated` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/netter/apis/dmi-backend.md) · [All operations](https://skmtc.net/netter/apis/dmi-backend/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netter/dmi-backend/versions/a59877bf911b/schema)
