open connection
This block is part of the NS group and was last modified in core v15.0.0.
open connection v15.0.0 Open a connection with the NS (Nederlandse Spoorwegen) Reisinformatie API. Reuse the resulting connection in the other NS blocks.
In pins 2 + flow
- flow
flow - API key required
valueYour NS API subscription key (Ocp-Apim-Subscription-Key) from the NS API portal.
- Base URL
valueOptional override for the API base URL. Defaults to the public NS gateway.
Out pins 3 + flow
- flow
flow - Connection
nsconnectionThe NS connection.
- Success
conditionTrue if a valid connection could be created.
- Error
valueError message if the connection could not be established.
trein |
spoor |
ns api |
reisinformatie |
A typical wiring for open connection: get setting feeds the api_key pin; the flow out pin feeds branch; the connection out pin feeds get nearest stations.

Commonly used with
In production blueprints, this block is most often wired together with:
- branch: this block feeds into it.
- get nearest stations: this block feeds into it. Find the NS stations closest to a coordinate. Provide a geo point, or a separate latitude and longitude.
- get stations: this block feeds into it. List or search NS stations. Leave the search empty to retrieve all stations.
- create: feeds into this block. Creates a new function that can be executed using the given name.
- get setting: feeds into this block. get a created system setting.
Version history
Introduced in v15.0.0.
Back to
NS Return to the main group to view all sub-groups Back to NS Return to the group to view all blocks within this group
