---
# @generated by sylphx-gen. Do not edit.
title: "Query catalog targets on a database"
description: "`data.databases.query_catalog_targets` (POST /v1/{parent}/databases:queryCatalogTargets): Pages the complete authorized production database population, including legacy bindings and protected resources which cannot be observed."
type: reference
product: database
summary: "Pages the complete authorized production database population, including legacy bindings and protected resources which cannot be observed."
updated: 2026-09-28
nav: false
---

Pages the complete authorized production database population, including legacy bindings and protected resources which cannot be observed.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/databases:queryCatalogTargets`
- **Scope** `data:read`
- **Effect** `read` — nothing is written.
- **Collection** [databases](/docs/api/databases)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `parent` | `string` | Exact organization, project and environment parent. Required. |
| `page_size` | `int32` | Maximum targets to return; defaults to 100 and is capped at 1000. |
| `page_token` | `string` | Opaque cursor from the preceding page in the same environment. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `targets` | `DatabaseCatalogTarget[]` | Targets in stable resource order, including protected and legacy entries. |
| `next_page_token` | `string` | Cursor for the next page; empty when the census is complete. |

### DatabaseCatalogTarget

| Field | Type | What it is |
| --- | --- | --- |
| `resource` | `string` | Exact authorized database name from the owner census. Output only. |
| `observed_generation` | `int64` | Resource generation against which the observation is fenced. Output only. |
| `collection_reason` | `CatalogReadinessReason` | Protected and unsupported entries stay in the census with an explicit reason. CATALOG_READY here means pending collection, not observed reader eligibility or proven health. Output only. One of `catalog_ready`, `credential_missing`, `authority_denied`, `connect_failed`, `catalog_unavailable`, `reachable_zero_declared_functions`, `declared_function_missing`, `execute_missing`, `generation_mismatch`, `reader_boundary_failed`, `unsupported_legacy`, `protected_resource`, `reader_not_ready`, `declaration_invalid`, `platform_owned_policy_excluded`. |
| `legacy` | `bool` | The existing resource binding is authoritative rather than a canonical Data record. Output only. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`PAGE_TOKEN_MISMATCH`](/docs/api/errors/PAGE_TOKEN_MISMATCH) — A page token was reused with different parameters.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/databases:queryCatalogTargets" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

**TypeScript**

```ts
const response = await sylphx.data.databases.queryCatalogTargets({ parent: 'orgs/acme/projects/shop/envs/production' })
```

**Rust**

```rust
let mut req = sylphx::data::QueryDatabaseCatalogTargetsRequest::default();
req.parent = "orgs/acme/projects/shop/envs/production".to_string();
let response = sx.data().databases().query_catalog_targets(req).await?;
```

**CLI**

```bash
sylphx data databases query-catalog-targets orgs/acme/projects/shop/envs/production
```

**MCP**

```json
{ "method_id": "data.databases.query_catalog_targets", "args": {"parent":"orgs/acme/projects/shop/envs/production"} }
```
