Introduction
Info
This guide assumes that you:
- understand what an API is and know how you can make REST API calls
- have a valid Nexus Web API token
Not the case? Check the API Basics first before continuing here.
Root and authentication¶
Nexus Web API can be reached at https://nexus.stellaspark.com/api/v1/.
The Nexus Web API token must be provided as URL query parameter:
curl "https://nexus.stellaspark.com/api/v1/{api_service}/?token={web_api_token}"
Nexus API services for data consumption¶
Nexus offers standardized services for geospatial data, so that data exchange between software programs can take place without much additional work. The API services differ in the type of data that they serve.
| API Service | Meaning | Data type | Formats |
|---|---|---|---|
| WFS | Web Feature Service | Vector data | csv, json, xml, kml, shp |
| WMS | Web Map Service | Raster data as pre-rendered maps | png, jpg |
| WCS | Web Coverage Service | Raw raster data | geotiff |
| Events | Events service | Timeseries events | csv |
| Data sources | Overview of data sources | Metadata | json |
| Data subscriptions | Overview of data subscriptions | Metadata | json |
| Sync tasks | Sync tasks with data connections | Metadata | json |
Let's try it out¶
Get a GeoJSON with spatial objects¶
For retrieving a GeoJSON file with all weather stations in the Sandbox world, we use the WFS API service.
curl "https://nexus.stellaspark.com/api/v1/wfs/?world=sandbox&request=getfeature&typenames=weather_station&outputformat=json&count=1&token={web_api_token}"
This request returns the following (GeoJSON) response:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "weather_station.3",
"geometry": {
"type": "Point",
"coordinates": [
140802.69754,
456881.77153
]
},
"geometry_name": "centroid",
"properties": {
"dc_id": 18,
"id_src": "260",
"label": "De Bilt",
"id": 3
},
"bbox": [
140802.69754,
456881.77153,
140802.69754,
456881.77153
]
}
],
"totalFeatures": 3,
"numberMatched": 3,
"numberReturned": 1,
"timeStamp": "2021-08-13T08:56:02.507Z",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::28992"
}
},
"bbox": [
140802.69754,
456881.77153,
140802.69754,
456881.77153
]
}
Get a pre-rendered raster¶
For obtaining a pre-rendered map of the Sandbox world, you'd need to use the WMS API service.
curl "https://nexus.stellaspark.com/api/v1/wms/?layers=sandbox:waterbody&token={web_api_token}"
The API returns the following image with return code 200:

Connect Nexus to a GIS application¶
Using WMS or WFS, you connect Nexus to common desktop GIS applications, like QGIS or ArcGIS (version 10.1 and higher). Check the tutorial Using Nexus data in QGIS to see how you can visualize Nexus tables directly in QGIS.