Endpoints
The Endpoints package contains nodes that expose platform data to the outside. It currently comprises the PostgreSQL CSV API node, which publishes configurable PostgreSQL tables as CSV downloads behind an open data endpoint. Node-RED acts as the data pipeline, an API gateway such as APISIX handles public access. The package was commissioned by the City of Menden (Sauerland) and released as open source.
- Package
- @htag/node-red-contrib-hypertegrity-endpoints
- Version
- 0.3.1
- Nodes
- 1 (plus 2 config nodes)
- Licence
- EUPL-1.2
Included nodes
PostgreSQL CSV API
Publishes PostgreSQL tables defined in the model registry as CSV via GET /api/opendata/v1/:model.csv, with column and entity exclusion.
Open nodeThe node comes with the config nodes PostgreSQL CSV API: Connection (postgresql-csv-api-connection) for the database connection and PostgreSQL CSV API: Model Registry (postgresql-csv-api-registry) for the published models. Both are described on the node page.
Installation
npm install @htag/node-red-contrib-hypertegrity-endpoints
Alternatively install the package in the Node-RED editor via Menu → Manage palette → Install and search for hypertegrity-endpoints. Node-RED 4.0.5 or later and Node.js 20.18 or later are required. The node appears in the palette under DataOps.
Shared notes
- Dependencies: The package installs the PostgreSQL client
pg. The optional coordinate output requires the PostGIS extension in the database. - Database access: The connection is stored in the config node; user and password are kept encrypted in
flows_cred.json. All fields support placeholders of the form${VAR}; empty fields fall back to the environment variablesDB_HOST,DB_PORT,DB_NAME,DB_USERandDB_PASSWORD. Use a database user with read-only privileges. The connection to the database is made without SSL, so run Node-RED and PostgreSQL in the same trusted network. - Access control: The endpoint itself checks no credentials. Node-RED must not be directly reachable from the public network; an API gateway (APISIX) with an API key is intended that exposes only the open data route and hides the Node-RED editor.
- Proxy: The node only connects to the database; no proxy configuration is provided.
- Personal data: Published tables can contain personal data. The node removes nothing automatically. Exclude affected columns and
entity_idvalues in the model registry and review every model before releasing it as open data.