---
title: "Query documents in a namespace (Mango selector)"
method: POST
path: "/api/object-store/:namespace/query"
tags: ["Object Store"]
---

# Query documents in a namespace (Mango selector)

`POST /api/object-store/:namespace/query`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/api/object-store/:namespace/query`
- Auth: none declared

Searches for documents within a namespace using PouchDB Mango query syntax. The `ns` namespace guard is injected automatically into every selector — callers cannot escape their namespace. Use dotted paths to filter on payload fields: `{ "payload.status": "active" }`.

## Path parameters

- `namespace` string, required

## Query parameters

- `token` string

## Request body

- object
  - `selector` object: Mango selector for payload fields (namespace guard injected automatically).
  - `limit` integer: Maximum results to return (1–1000).
  - `skip` integer: Number of documents to skip (for pagination).
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

Query results

- object
  - `docs` object[]
    - `namespace` string
    - `key` string
    - `payload` object
    - `createdAt` string
    - `updatedAt` string
  - `totalDocs` integer

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
