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.
| Language | What It Connects To | What It Shows |
|---|---|---|
| PQL | PostgreSQL | Metadata — assets · tags · users · settings |
| CQL | Aster TSDB | Raw sensor values · aggregations · BLOB metadata |
| SQL | Kyuubi (Spark) | Iceberg cold tier · warehouse |
| TQL | Time 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
| Method | When to Use |
|---|---|
REST POST /api/v1/query · /query/stream | External systems · scripts · agents |
SQL Console https://<server-ip>:5501/ | For humans in a browser — Data Gateway Console |
Java SDK plantpulse-data-gateway-client | Embedded 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
| Page | When to Read |
|---|---|
| API | Endpoints · headers · parameter binding · error contract |
| Controls and Limits | What gets blocked and what gets logged — DDL · rate limits · quotas |
Related Documents
plantpulse-data-gatewayComponent — modules · paths · configuration files- Data Gateway Console
- Data Gateway Client
- Data Query — which to use: PQL · CQL · Spark SQL