Web services are available for the various data and models released by risk.EFEHR. These web services allow advanced users to implement automated access to the data and models, and use them in their own applications. For example, many of these web services are used to make the data available through the Integrated Core Services platform of the European Plate Observing System (EPOS).
Two main categories of web services are currently available:
1) web services to access the data available in the interactive map viewers that follow the Open Geospatial Consortium (OGC) and Open Source Geospatial Foundation (OSGeo) standards.
2) web services to access the data, models and files stored in the various GitLab repositories, making use of the GitLab API.
Geospatial Web Services
Web services for geospatial data (e.g. exposure data, site response model data, seismic risk data) have been made available through the interactive map viewers. The URL for each web service can be found from the interactive viewer by clicking on the button in the top right of the web browser, and then clicking the ‘web services’ drop down menu (see image below). The URL can then be copied and used in other applications, for example QGIS, as shown in the tutorial here.
GitLab API Services
Data can be obtained from the GitLab repositories using any program supporting the HTTP-GET method, e.g. web browser or CURL. Below are some example requests using CURL and the valid query options.
Sample request with CURL to download the .csv file of a given exposure model:
curl https://gitlab.seismo.ethz.ch/api/v4/projects/186/repository/files/_exposure_models%2FExposure_Model_Albania_Res.csv/raw?ref=v1.0 -o <path/to/save/file>
Valid query options:
|Option / description||Available options|
|European country for which exposure models are available
|Albania, Andorra, Austria, Belgium, Bosnia_and_Herzegovina, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Gibraltar, Greece, Hungary, Ireland, Iceland, Isle_of_Man, Italy, Kosovo, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Moldova, Monaco, Montenegro, the Netherlands, Norway, North Macedonia, Poland, Portugal, Romania, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, Turkey, United Kingdom|
|Occupancy type of the exposure model (commercial, industrial or residential)
|Com, Ind, Res|
|Version of the exposure model, identified by the tag of the repository
|Run https://gitlab.seismo.ethz.ch/api/v4/projects/186/repository/tags to get the latest stable version|
Sample request with CURL to download the .csv files for the capacity curves of a specific typologies:
curl https://gitlab.seismo.ethz.ch/api/v4/projects/188/repository/files/ESRM20_capacity_curves%2FcapCurves_CR_LDUAL-DUH_H1.csv/raw?ref=v2.0 -o <path/to/save/file>
Run https://gitlab.seismo.ethz.ch/api/v4/projects/188/repository/tree?path=ESRM20_capacity_curves to see the list of available capacity curves. Note that the building typologies are described using the GEM Building Taxonomy attributes with the following attributes:
1) Materials. CR: reinforced concrete, MR: reinforced masonry, MCF: confined masonry, MUR: unreinforced masonry, MUR-ADO: adobe, MUR-CB99: concrete block masonry, MUR-CL99: clay brick masonry, MUR-STDRE: dressed stone masonry, MUR-STRUB: rubble stone masonry, S: steel, W: wood/timber
(2a) Lateral load resisting systems. LDUAL: dual frame-wall system, LFINF: infilled frame, LWAL: load bearing wall, LFM: moment frame, LFBR: braced frame
(2b) Code Level or Ductility. CDN: absence of seismic design, CDL: low code level (designed for lateral resistance using allowable stress design), CDM: moderate code level (designed for lateral resistance with modern limit state design), CDH: high code level (designed for lateral resistance coupled with target ductility requirements and capacity design), DNO: non-ductile, DUL: low ductility, DUM: moderate ductility, DUH: high ductility
(2c) Lateral Force Coefficient. For CDL, CDM and CDH, the value of the lateral force coefficient, i.e. the fraction of the weight that was specified as the design lateral force in the seismic design code (see Code Level), expressed in % (applied to reinforced concrete moment and infilled frames only)
(3) Height. H: number of storeys