Skip to main content

Data Gateway Overview

Analysts, external systems, BI, and AI agents do not connect directly to the store. The data gateway (Port 5500 · TLS Port 5501) receives four query languages on a single endpoint, blocks statements that alter the schema, limits results, and logs every query.

LanguageWhat It Connects ToWhat It Shows
PQLPostgreSQLMetadata — assets · tags · users · settings
CQLAster TSDBRaw sensor values · aggregations · BLOB metadata
SQLKyuubi (Spark)Iceberg cold tier · warehouse
TQLTime Series Engine (TSE)Metrics · rollups
Open, but not exposed

The gateway is not a "blocking gate" but a "controlled gate." Reads are broadly open; only statements that change the structure and excessive results are blocked.

Architecture​

AI agents also enter through the same gate

The platform's MCP tools run internally under the same permissions · same logs · same limits as this gateway. There is no wider path for an agent.

Three Ways to Access​

MethodWhen to Use
REST POST /api/v1/query · /query/streamExternal systems · scripts · agents
SQL Console https://<server-ip>:5501/For humans in a browser — Data Gateway Console
Java SDK plantpulse-data-gateway-clientEmbedded in applications — Data Gateway Client

For BI tools that must connect directly to the store, a separate set of JDBC drivers is available — Data Query.

Run a One-Liner in 5 Minutes​

# 1. 살아 있나 (익명 readiness — 이 경로만 HTTPS 강제에서 빠집니다)
curl -fsS http://127.0.0.1:5500/api/health
# {"status":"UP","service":"plantpulse-data-gateway-web",…,
# "checks":{"database":true,"inmemory":true,"query_log":true}}

# 2. 메타데이터 한 줄 (PQL)
curl -fsS -X POST -H "X-API-Key: ${PP_DATA_GATEWAY_API_KEY}" -H "X-Lang: PQL" \
-H "Content-Type: application/json" \
-d "SELECT tablename FROM pg_tables WHERE schemaname='pp'" \
http://127.0.0.1:5500/api/v1/query

# 3. 큰 결과는 스트림으로 (NDJSON)
curl -fsS -X POST -H "X-API-Key: ${PP_DATA_GATEWAY_API_KEY}" -H "X-Lang: CQL" \
-H "Content-Type: application/json" \
-d "SELECT * FROM pp.tm_tag_value WHERE tag_id='TAG_001' LIMIT 100" \
http://127.0.0.1:5500/api/v1/query/stream

What's in This Section​

PageWhen to Read
APIEndpoints · headers · parameter binding · error contract
Controls and LimitsWhat gets blocked and what gets logged — DDL · rate limits · quotas