Glass API – Section MetaData using the EPOS ICS Portal

Endpoint /stations/v2/bbox/{minLon}/{minLat}/{maxLon}/{maxLat}

This endpoint returns all the stations inside the bounding box. The output format is GeoJson.

The parameters are the dimensions of the bounding box so they are all mandatory.

The coordinates shown in the example form a rectangle around Portugal.


The maximum Latitude of the bounding box

  • 44.08

The maximum Longitude of the bounding box

  • -5.53

The minimum Latitude of the bounding box

  • 35.10

The minimum Latitude of the bounding box

  • -12.21
Example Links

Endpoint /stations/v2/geojson/{format}/{geojson}

This endpoint returns all stations that are inside the geometry of geoJSON.

All parameters are mandatory.


The format of the output

  • json
  • geojson

The geojson input that must be made on the following website:

You need to copy all the json code after drawing the figure on the map, after that you can use the following page to minimize the geojson to ensure that it is correctly read by the API:

Then you just need to place the geojson in the respective field

Example Links

Type of Errors Explanation

Code 200
  • Ok -> Everything went well and results returned
Code 204
  • The response to your request is empty, please check the request made or check the information in the database.
Code 400
  • Bad Request -> Check the entered parameters;Verifies that the API server link is correct; Checks the entered parameters.; If everything above is fine, then the API may not be working.
  • SocketException -> The connection was closed without the results being returned, something may be wrong in the connection with the database.
  • SQLException -> An error in the SQL queries, probably some information that you wanted to retrieve has an error or there is no connection in a table.
  • ClassNotFoundException -> The Java class could not be found, this implies a serious error in the API, probably a compilation/installation error.