diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b1af38f..135f1d8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,17 @@ All notable changes to the INCORE documents generated by Sphinx package will be
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [4.3.0] - 2023-08-16
+
+### Added
+- Interdependent Network Design Problem (INDP) [#250](https://github.com/IN-CORE/incore-docs/issues/250)
+
+### Fixed
+- Broken tornado visualization in pyincore-viz example notebook [#254](https://github.com/IN-CORE/incore-docs/issues/254)
+
+### Changed
+- Upgrade swagger ui to 5.3.1 and use auto generated openapi json [#253](https://github.com/IN-CORE/incore-docs/issues/253)
+
## [4.2.0] - 2023-06-14
### Added
diff --git a/manual_jb/content/_config.yml b/manual_jb/content/_config.yml
index 3e9962a6..3ecb733d 100644
--- a/manual_jb/content/_config.yml
+++ b/manual_jb/content/_config.yml
@@ -1,9 +1,9 @@
-title: "IN-CORE Manual
4.2.0"
+title: "IN-CORE Manual
4.3.0"
project: "IN-CORE Manual"
author: IN-CORE Community
copyright: "2023" # Copyright year to be placed in the footer
logo: images/resilience-logo.png
-version: "4.2.0" # Version is not part of JB config, we use it for autobuild of incore-docs
+version: "4.3.0" # Version is not part of JB config, we use it for autobuild of incore-docs
exclude_patterns: [_build, .DS_Store, "**.ipynb_checkpoints"]
repository:
diff --git a/manual_jb/content/analyses.md b/manual_jb/content/analyses.md
index b2035a1e..f1da1bc9 100644
--- a/manual_jb/content/analyses.md
+++ b/manual_jb/content/analyses.md
@@ -16,28 +16,29 @@
14. [Galveston Computable General Equilibrium (CGE)](analyses/galveston_cge.md)
15. [Housing recovery](analyses/housing_recovery)
16. [Housing unit allocation](analyses/housingunitallocation)
-17. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
-18. [Joplin empirical restoration](analyses/joplin_empirical_restoration)
-19. [Mean damage](analyses/mean_dmg)
-20. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
-21. [Monte Carlo failure probability](analyses/mc_failure_prob)
-22. [Network cascading interdependency functionality](analyses/nci_functionality)
-23. [Nonstructural building damage](analyses/non_structural_building_dmg)
-24. [Pipeline damage](analyses/pipeline_dmg)
-25. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
-26. [Pipeline functionality](analyses/pipeline_functionality)
-27. [Pipeline repair cost](analyses/pipeline_repair_cost)
-28. [Pipeline restoration](analyses/pipeline_restoration)
-29. [Population dislocation](analyses/populationdislocation)
-30. [Portfolio recovery](analyses/portfolio_recovery)
-31. [Residential building recovery](analyses/residential_building_recovery)
-32. [Road damage](analyses/road_dmg)
-33. [Salt Lake City Computable General Equilibrium (CGE)](analyses/slc_cge.md)
-34. [Seaside Computable General Equilibrium (CGE)](analyses/seaside_cge)
-35. [Social Vulnerability](analyses/social_vulnerability)
-36. [Tornado electric power network (EPN) damage](analyses/tornadoepn_dmg)
-37. [Transportation recovery](analyses/transportation_recovery)
-38. [Water facility damage](analyses/waterfacility_dmg)
-39. [Water network functionality](analyses/wfn_functionality)
-40. [Water facility repair cost](analyses/water_facility_repair_cost)
-41. [Water facility restoration](analyses/water_facility_restoration)
\ No newline at end of file
+17. [Interdependent Network Design Problem](analyses/indp)
+18. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
+19. [Joplin empirical restoration](analyses/joplin_empirical_restoration)
+20. [Mean damage](analyses/mean_dmg)
+21. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
+22. [Monte Carlo failure probability](analyses/mc_failure_prob)
+23. [Network cascading interdependency functionality](analyses/nci_functionality)
+24. [Nonstructural building damage](analyses/non_structural_building_dmg)
+25. [Pipeline damage](analyses/pipeline_dmg)
+26. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
+27. [Pipeline functionality](analyses/pipeline_functionality)
+28. [Pipeline repair cost](analyses/pipeline_repair_cost)
+29. [Pipeline restoration](analyses/pipeline_restoration)
+30. [Population dislocation](analyses/populationdislocation)
+31. [Portfolio recovery](analyses/portfolio_recovery)
+32. [Residential building recovery](analyses/residential_building_recovery)
+33. [Road damage](analyses/road_dmg)
+34. [Salt Lake City Computable General Equilibrium (CGE)](analyses/slc_cge.md)
+35. [Seaside Computable General Equilibrium (CGE)](analyses/seaside_cge)
+36. [Social Vulnerability](analyses/social_vulnerability)
+37. [Tornado electric power network (EPN) damage](analyses/tornadoepn_dmg)
+38. [Transportation recovery](analyses/transportation_recovery)
+39. [Water facility damage](analyses/waterfacility_dmg)
+40. [Water network functionality](analyses/wfn_functionality)
+41. [Water facility repair cost](analyses/water_facility_repair_cost)
+42. [Water facility restoration](analyses/water_facility_restoration)
diff --git a/manual_jb/content/analyses/indp.md b/manual_jb/content/analyses/indp.md
new file mode 100644
index 00000000..4163b9a0
--- /dev/null
+++ b/manual_jb/content/analyses/indp.md
@@ -0,0 +1,140 @@
+# Interdependent Network Design Problem (INDP)
+
+**Description**
+
+This analysis takes a decentralized approach to solve the Interdependent Network Design Problem (INDP), a family of
+centralized Mixed-Integer Programming (MIP) models, which find the optimal restoration strategy of disrupted networked
+systems subject to budget and operational constraints.
+
+**Contributors**
+
+- Implementation: Hesam Talebiyan, Chen Wang, and NCSA IN-CORE Dev Team
+
+**Input parameters**
+
+ key name | type | name | description
+--------------------------------|---------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ `network_type` * | `str` | Network Type | Type of the network, which is set to `from_csv` for Seaside networks. e.g. *from_csv*, *incore*.
+ `MAGS` * | `list` | MAGS | The earthquake return period.
+ `sample_range` * | `range` | Sample Range | The range of sample scenarios to be analyzed.
+ `dislocation_data_type` | `str` | Dislocation Data Type | Dislocation Data Type.
+ `return_model` | `str` | Return Model | Type of the model for the return of the dislocated population. Options: *step_function* and *linear*.
+ `testbed_name` | `str` | Testbed Name | Sets the name of the testbed in analysis.
+ `extra_commodity` * | `dict` | Extra Commodity | Multi-commodity parameters dictionary.
+ `RC` * | `list` | Resource Caps | List of resource caps or the number of available resources in each step of the analysis. Each item of the list is a dictionary whose items show the type of resource and the available number of that type of resource. For example: * If `network_type`=*from_csv*, you have two options:* if, for example, `R_c`= [{"budget": 3}, {"budget": 6}], then the analysis is done for the cases when there are 3 and 6 resources available of type "budget" (total resource assignment).* if, for example, `R_c`= [{"budget": {1:1, 2:1}}, {"budget": {1:1, 2:2}}, {"budget": {1:3, 2:3}}] and given there are 2 layers, then the analysis is done for the case where each layer gets 1 resource of type "budget", AND the case where layer 1 gets 1 and layer 2 gets 2 resources of type "budget", AND the case where each layer gets 3 resources of type "budget" (Prescribed resource for each layer).
+ `layers` * | `list` | Layers | List of layers in the analysis.
+ `method` * | `str` | Method | There are two choices of method: 1. `INDP`: runs Interdependent Network Restoration Problem (INDP). 2. `TDINDP`: runs time-dependent INDP (td-INDP). In both cases, if "time_resource" is True, then the repair time for each element is considered in devising the restoration plans.
+ `t_steps` | `int` | Time steps | Number of time steps of the analysis.
+ `time_resource` | `bool` | Time Resource | If time resource is True, then the repair time for each element is considered in devising the restoration plans.
+ `save_model` | `bool` | Save Model | If the optimization model should be saved to file. The default is False.
+ `solver_engine` | `str` | Solver Engine | Solver to use for optimization model. Default to use SCIP solver.
+ `solver_path` | `str` | Solver Engine Path | Executable Path to the Solver to use for optimization model. Default to SCIP solver.
+ `solver_time_limit` | `int` | Solve Time Limit | Solving time limit in seconds.
+
+**Input datasets**
+
+ key name | type | name | description
+---------------------------------------------|----------------------------------------|--------------------------------------------|-------------------------------------------------------------------------------
+ `wf_repair_cost` * | `incore:repairCost` | Water Facility Repair Cost | Repair cost for each water facility.
+ `wf_restoration_time` * | `incore:waterFacilityRepairTime` | Water Facility Repair Time | Repair time at certain functionality recovery for each class and limit state.
+ `epf_repair_cost` * | `incore:repairCost` | Electric Power Facility Repair Cost | Repair cost for each electric power facility.
+ `epf_restoration_time` * | `incore:epfRepairTime` | Electric Power Facility Repair Time | Repair time at certain functionality recovery for each class and limit state.
+ `pipeline_repair_cost` * | `incore:pipelineRepairCost` | Water Pipeline Repair Cost | Repair cost for each water pipeline.
+ `pipeline_restoration_time` * | `incore:pipelineRestorationVer1` | Water Pipeline Resotarting Time | Pipeline restoration times.
+ `power_network` * | `incore:epnNetwork` | Electric Power Network Dataset | Electric power network dataset.
+ `water_network` * | `incore:waterNetwork` | Water Network Dataset | Water network dataset.
+ `powerline_supply_demand_info` * | `incore:powerLineSupplyDemandInfo` | Powerline Supply Demand Info | Supply and demand information for powerlines.
+ `epf_supply_demand_info` * | `incore:epfSupplyDemandInfo` | Electric Power Facility Supply Demand Info | Supply and demand information for electric power facilities.
+ `wf_supply_demand_info` * | `incore:waterFacilitySupplyDemandInfo` | Water Facility Supply Demand Info | Supply and demand information for water facilities.
+ `pipeline_supply_demand_info` * | `incore:pipelineSupplyDemandInfo` | Water Pipeline Supply Demand Info | Supply and demand information for water pipelines.
+ `interdep` * | `incore:interdep` | Interdependency | Interdepenency between water and electric power facilities.
+ `wf_failure_state` * | `incore:sampleFailureState` | Water Facility Failure State | MCS failure state of water facilities.
+ `wf_damage_state` * | `incore:sampleDamageState` | Water Facility Damage State | MCS damage state of water facilities.
+ `pipeline_failure_state` * | `incore:sampleFailureState` | Water Pipeline Failure State | Failure state of pipeline from pipeline functionality analysis.
+ `epf_failure_state` * | `incore:sampleFailureState` | Electric Power Facility Failure State | MCS failure state of electric power facilities.
+ `epf_damage_state` * | `incore:sampleDamageState` | Electric Power Facility Damage State | MCS damage state of electric power facilities
+ `pop_dislocation` * | `incore:popDislocation` | Population Dislocation | Population dislocation.
+ `bldgs2elec` | `incore:bldgs2elec` | Building To Electric Power Facility | Relation between building and electric power facility.
+ `bldgs2wter` | `incore:bldgs2wter` | Building To Water Facility | Relation between building and water facility.
+
+**Output datasets**
+
+ key name | type | parent key | name | description
+------------------------|----------------------|------------|----------|--------------------------------------------------------------------------
+ `action` * | `incore:indpAction` | | Action | Restoration action plans.
+ `cost` * | `incore:indpCost` | | Cost | Restoration cost plans
+ `runtime` * | `incore:indpRuntime` | | Run Time | Run time duration (in second) to execute computations for each time step
+
+(* required)
+
+**Execution**
+
+code snippet:
+
+```
+ indp_analysis = INDP(client)
+ indp_analysis.set_parameter("network_type", "from_csv")
+ indp_analysis.set_parameter("MAGS", [1000])
+ indp_analysis.set_parameter("sample_range", sample_range)
+ indp_analysis.set_parameter("dislocation_data_type", "incore")
+ indp_analysis.set_parameter("return_model", "step_function")
+ indp_analysis.set_parameter("testbed_name", "seaside")
+ indp_analysis.set_parameter("extra_commodity", {1: ["PW"], 3: []})
+ indp_analysis.set_parameter("RC", [{"budget": 240000, "time": 700}, {"budget": 300000, "time": 600}])
+ indp_analysis.set_parameter("layers", [1, 3])
+
+ indp_analysis.set_parameter("method", "INDP")
+ # indp_analysis.set_parameter("method", "TDINDP")
+
+ indp_analysis.set_parameter("t_steps", 10)
+ indp_analysis.set_parameter("time_resource", True)
+
+ indp_analysis.set_parameter("save_model", False)
+ # indp_analysis.set_parameter("save_model", True)
+
+ # scip
+ indp_analysis.set_parameter("solver_engine", "scip")
+ indp_analysis.set_parameter("solver_path", "/usr/local/bin/scip")
+
+ # glpk
+ # indp_analysis.set_parameter("solver_engine", "glpk")
+ # indp_analysis.set_parameter("solver_path", "/usr/local/bin/glpsol")
+
+ # cbc
+ # indp_analysis.set_parameter("solver_engine", "cbc")
+ # indp_analysis.set_parameter("solver_path", "/usr/local/bin/cbc")
+
+ # gurobi
+ # indp_analysis.set_parameter("solver_engine", "gurobi")
+
+ indp_analysis.set_parameter("solver_time_limit", 3600) # if not set default to never timeout
+
+ indp_analysis.set_input_dataset("wf_restoration_time", wf_restoration_time)
+ indp_analysis.set_input_dataset("wf_repair_cost", wf_repair_cost_result)
+ indp_analysis.set_input_dataset("epf_restoration_time", epf_restoration_time)
+ indp_analysis.set_input_dataset("epf_repair_cost", epf_repair_cost_result)
+ indp_analysis.set_input_dataset("pipeline_restoration_time", pipeline_restoration_time)
+ indp_analysis.set_input_dataset("pipeline_repair_cost", pipeline_repair_cost_result)
+ indp_analysis.set_input_dataset("power_network", power_network_dataset)
+ indp_analysis.set_input_dataset("water_network", water_network_dataset) # with distribution noes
+ indp_analysis.load_remote_input_dataset("powerline_supply_demand_info", powerline_supply_demand_info_id)
+ indp_analysis.load_remote_input_dataset("epf_supply_demand_info", epf_supply_demand_info_id)
+ indp_analysis.load_remote_input_dataset("wf_supply_demand_info", wf_supply_demand_info_id)
+ indp_analysis.load_remote_input_dataset("pipeline_supply_demand_info", pipeline_supply_demand_info_id)
+ indp_analysis.load_remote_input_dataset("interdep", interdep_id)
+ indp_analysis.set_input_dataset("wf_failure_state", wterfclty_sample_failure_state)
+ indp_analysis.set_input_dataset("wf_damage_state", wterfclty_sample_damage_states)
+ indp_analysis.set_input_dataset("pipeline_failure_state", pipeline_sample_failure_state)
+ indp_analysis.set_input_dataset("epf_failure_state", epf_sample_failure_state)
+ indp_analysis.set_input_dataset("epf_damage_state", epf_sample_damage_states)
+ indp_analysis.set_input_dataset("pop_dislocation", pop_dislocation_result)
+
+ # # optional inputs
+ # indp_analysis.load_remote_input_dataset("bldgs2elec", bldgs2elec_id)
+ # indp_analysis.load_remote_input_dataset("bldgs2wter", bldgs2wter_id)
+
+ # Run Analysis
+ indp_analysis.run_analysis()
+```
+
+full analysis: [indp.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/indp.ipynb)
diff --git a/manual_jb/content/notebooks_other.md b/manual_jb/content/notebooks_other.md
index 94fe1a85..815ceaca 100644
--- a/manual_jb/content/notebooks_other.md
+++ b/manual_jb/content/notebooks_other.md
@@ -19,6 +19,7 @@ Note that some Notebooks might not work with the latest version of pyIncore.
[galveston_cge.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/galveston_cge.ipynb)
[housing household recovery](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housing_household_recovery.ipynb)
[housing_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housing_recovery.ipynb)
+[indp.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/indp.ipynb)
[housingunitallocation.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housingunitallocation.ipynb)
[joplin_cge.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_cge.ipynb)
[joplin_empirical_restoration.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/joplin_empirical_restoration.ipynb)
diff --git a/notebooks/indp.ipynb b/notebooks/indp.ipynb
new file mode 100644
index 00000000..e7c06a2a
--- /dev/null
+++ b/notebooks/indp.ipynb
@@ -0,0 +1,690 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ed1b42c8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "from pyincore import IncoreClient, Dataset, RestorationService, MappingSet, FragilityService, NetworkDataset\n",
+ "from pyincore.analyses.buildingdamage import BuildingDamage\n",
+ "from pyincore.analyses.epfrepaircost import EpfRepairCost\n",
+ "from pyincore.analyses.epfrestoration import EpfRestoration\n",
+ "from pyincore.analyses.housingunitallocation import HousingUnitAllocation\n",
+ "from pyincore.analyses.indp import INDP\n",
+ "import pyincore.globals as pyglobals\n",
+ "from pyincore.analyses.pipelinerepaircost import PipelineRepairCost\n",
+ "from pyincore.analyses.populationdislocation import PopulationDislocation\n",
+ "from pyincore.analyses.waterfacilitydamage import WaterFacilityDamage\n",
+ "from pyincore.analyses.epfdamage import EpfDamage\n",
+ "from pyincore.analyses.pipelinedamagerepairrate import PipelineDamageRepairRate\n",
+ "from pyincore.analyses.montecarlofailureprobability import MonteCarloFailureProbability\n",
+ "from pyincore.analyses.pipelinefunctionality import PipelineFunctionality\n",
+ "from pyincore.analyses.pipelinerestoration import PipelineRestoration\n",
+ "from pyincore.analyses.waterfacilityrepaircost import WaterFacilityRepairCost\n",
+ "from pyincore.analyses.waterfacilityrestoration import WaterFacilityRestoration\n",
+ "from pyincore.dataservice import DataService"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ba0a8f53",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "client = IncoreClient()\n",
+ "datasvc = DataService(client)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f4271b35",
+ "metadata": {},
+ "source": [
+ "### Preparing dataset and common parameters"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3e58274c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "hazard_type = \"earthquake\"\n",
+ "hazard_id = \"5ba8f127ec2309043520906c\" # 1000 yr eq\n",
+ "num_cpu = 8\n",
+ "sim_number = 2\n",
+ "sample_range = range(0, sim_number)\n",
+ "result_name = \"seaside_indp\"\n",
+ "\n",
+ "bldg_inv_id = \"613ba5ef5d3b1d6461e8c415\"\n",
+ "seed = 1111\n",
+ "\n",
+ "# power and water networks\n",
+ "power_network_dataset = Dataset.from_data_service(\"64adbc47c36a346b1f3969f0\", data_service=datasvc)\n",
+ "power_network = NetworkDataset.from_dataset(power_network_dataset)\n",
+ "water_network_dataset = Dataset.from_data_service(\"64adbed3e1b74b4e158210ed\", data_service=datasvc)\n",
+ "water_network = NetworkDataset.from_dataset(water_network_dataset)\n",
+ "water_facilities = water_network.nodes\n",
+ "epfs = power_network.nodes\n",
+ "pipeline = water_network.links"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5625e178",
+ "metadata": {},
+ "source": [
+ "### Water Facility Damage"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "d5f00d01",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "wterfclty_dmg = WaterFacilityDamage(client)\n",
+ "fragility_service = FragilityService(client)\n",
+ "wterfclty_dmg.set_input_dataset(\"water_facilities\", water_facilities)\n",
+ "mapping_id = \"5d39e010b9219cc18bd0b0b6\" # 5 DS\n",
+ "mapping_set = MappingSet(fragility_service.get_mapping(mapping_id))\n",
+ "wterfclty_dmg.set_input_dataset(\"dfr3_mapping_set\", mapping_set)\n",
+ "wterfclty_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
+ "wterfclty_dmg.set_parameter(\"fragility_key\", \"pga\")\n",
+ "wterfclty_dmg.set_parameter(\"num_cpu\", num_cpu)\n",
+ "wterfclty_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
+ "wterfclty_dmg.set_parameter(\"result_name\", result_name + \"_wf_damage\")\n",
+ "wterfclty_dmg.run_analysis()\n",
+ "wterfclty_dmg_result = wterfclty_dmg.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b530389f",
+ "metadata": {},
+ "source": [
+ "### Water Facility Monte Carlo Simulation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "be8e87c4",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [],
+ "source": [
+ "wterfclty_mc = MonteCarloFailureProbability(client)\n",
+ "wterfclty_mc.set_input_dataset(\"damage\", wterfclty_dmg_result)\n",
+ "wterfclty_mc.set_parameter(\"num_cpu\", num_cpu)\n",
+ "wterfclty_mc.set_parameter(\"num_samples\", sim_number)\n",
+ "wterfclty_mc.set_parameter(\"damage_interval_keys\", [\"DS_0\", \"DS_1\", \"DS_2\", \"DS_3\", \"DS_4\"])\n",
+ "wterfclty_mc.set_parameter(\"failure_state_keys\", [\"DS_1\", \"DS_2\", \"DS_3\", \"DS_4\"])\n",
+ "wterfclty_mc.set_parameter(\"result_name\", result_name + \"_wf\") # name of csv file with results\n",
+ "wterfclty_mc.run()\n",
+ "wterfclty_sample_failure_state = wterfclty_mc.get_output_dataset(\"sample_failure_state\")\n",
+ "wterfclty_sample_damage_states = wterfclty_mc.get_output_dataset(\"sample_damage_states\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "30c8ece0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "wterfclty_sample_damage_states.get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bd27d77e",
+ "metadata": {},
+ "source": [
+ "### Water Facility Repair Time"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "1291c384",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "wterfclty_rest = WaterFacilityRestoration(client)\n",
+ "restorationsvc = RestorationService(client)\n",
+ "mapping_set = MappingSet(restorationsvc.get_mapping(\"61f075ee903e515036cee0a5\"))\n",
+ "wterfclty_rest.set_input_dataset(\"water_facilities\", water_facilities)\n",
+ "wterfclty_rest.set_input_dataset(\"dfr3_mapping_set\", mapping_set)\n",
+ "wterfclty_rest.set_input_dataset('damage', wterfclty_dmg_result)\n",
+ "wterfclty_rest.set_parameter(\"result_name\", result_name + \"_wf_restoration\")\n",
+ "wterfclty_rest.set_parameter(\"discretized_days\", [1, 3, 7, 30, 90])\n",
+ "wterfclty_rest.set_parameter(\"restoration_key\", \"Restoration ID Code\")\n",
+ "wterfclty_rest.set_parameter(\"end_time\", 100.0)\n",
+ "wterfclty_rest.set_parameter(\"time_interval\", 1.0)\n",
+ "wterfclty_rest.set_parameter(\"pf_interval\", 0.01)\n",
+ "wterfclty_rest.run_analysis()\n",
+ "wf_restoration_time = wterfclty_rest.get_output_dataset(\"repair_times\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "486672c6",
+ "metadata": {},
+ "source": [
+ "### Water Facility Repair Cost "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "84ca2cf9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "wf_repair_cost = WaterFacilityRepairCost(client)\n",
+ "wf_repair_cost.set_input_dataset(\"water_facilities\", water_facilities)\n",
+ "wf_repair_cost.load_remote_input_dataset(\"replacement_cost\", \"64833bcdd3f39a26a0c8b147\")\n",
+ "wf_repair_cost.set_input_dataset(\"sample_damage_states\", wterfclty_sample_damage_states)\n",
+ "wf_repair_cost.load_remote_input_dataset(\"wf_dmg_ratios\", \"647e423d7ae18139d9758607\")\n",
+ "wf_repair_cost.set_parameter(\"result_name\", result_name + \"_wf_repair_cost\")\n",
+ "wf_repair_cost.set_parameter(\"num_cpu\", num_cpu)\n",
+ "wf_repair_cost.run_analysis()\n",
+ "wf_repair_cost_result = wf_repair_cost.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "00f0e871",
+ "metadata": {},
+ "source": [
+ "### Electric Power Facililty Damage"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "c8de373c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "epf_dmg = EpfDamage(client)\n",
+ "fragility_service = FragilityService(client)\n",
+ "epf_dmg.set_input_dataset(\"epfs\", epfs)\n",
+ "mapping_id = \"64ac5f3ad2122d1f95f36356\" # 5 DS\n",
+ "mapping_set = MappingSet(fragility_service.get_mapping(mapping_id))\n",
+ "epf_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
+ "epf_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
+ "epf_dmg.set_parameter(\"num_cpu\", num_cpu)\n",
+ "epf_dmg.set_parameter('fragility_key', \"pga\")\n",
+ "epf_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
+ "epf_dmg.set_parameter(\"result_name\", result_name + \"_epf_dmg\")\n",
+ "epf_dmg.run_analysis()\n",
+ "epf_dmg_result = epf_dmg.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "febf8e95",
+ "metadata": {},
+ "source": [
+ "### Electric Power Repair Time"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "2b5f2d41",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "epf_rest = EpfRestoration(client)\n",
+ "restorationsvc = RestorationService(client)\n",
+ "mapping_set = MappingSet(restorationsvc.get_mapping(\"61f302e6e3a03e465500b3eb\"))\n",
+ "epf_rest.set_input_dataset(\"epfs\", epfs)\n",
+ "epf_rest.set_input_dataset(\"dfr3_mapping_set\", mapping_set)\n",
+ "epf_rest.set_input_dataset('damage', epf_dmg_result)\n",
+ "epf_rest.set_parameter(\"result_name\", result_name + \"_epf_restoration\")\n",
+ "epf_rest.set_parameter(\"discretized_days\", [1, 3, 7, 30, 90])\n",
+ "epf_rest.set_parameter(\"restoration_key\", \"Restoration ID Code\")\n",
+ "epf_rest.set_parameter(\"end_time\", 100.0)\n",
+ "epf_rest.set_parameter(\"time_interval\", 1.0)\n",
+ "epf_rest.set_parameter(\"pf_interval\", 0.01)\n",
+ "epf_rest.run_analysis()\n",
+ "epf_restoration_time = epf_rest.get_output_dataset(\"repair_times\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a467d0d1",
+ "metadata": {},
+ "source": [
+ "### Electric Power Facility Monte Carlos Simulation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "9230e77d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "epf_mc = MonteCarloFailureProbability(client)\n",
+ "epf_mc.set_input_dataset(\"damage\", epf_dmg_result)\n",
+ "epf_mc.set_parameter(\"num_cpu\", num_cpu)\n",
+ "epf_mc.set_parameter(\"num_samples\", sim_number)\n",
+ "epf_mc.set_parameter(\"damage_interval_keys\", [\"DS_0\", \"DS_1\", \"DS_2\", \"DS_3\", \"DS_4\"])\n",
+ "epf_mc.set_parameter(\"failure_state_keys\", [\"DS_1\", \"DS_2\", \"DS_3\", \"DS_4\"])\n",
+ "epf_mc.set_parameter(\"result_name\", result_name + \"_epf\") # name of csv file with results\n",
+ "epf_mc.run()\n",
+ "epf_sample_failure_state = epf_mc.get_output_dataset(\"sample_failure_state\")\n",
+ "epf_sample_damage_states = epf_mc.get_output_dataset(\"sample_damage_states\")\n",
+ "epf_sample_damage_states.get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a4b91790",
+ "metadata": {},
+ "source": [
+ "### Electric Power Facility Repair Cost"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "498475c6",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "epf_repair_cost = EpfRepairCost(client)\n",
+ "epf_repair_cost.set_input_dataset(\"epfs\", epfs)\n",
+ "epf_repair_cost.load_remote_input_dataset(\"replacement_cost\", \"647dff5b4dd25160127ca192\")\n",
+ "epf_repair_cost.set_input_dataset(\"sample_damage_states\", epf_sample_damage_states)\n",
+ "epf_repair_cost.load_remote_input_dataset(\"epf_dmg_ratios\", \"6483354b41181d20004efbd7\")\n",
+ "epf_repair_cost.set_parameter(\"result_name\", result_name + \"_epf_repair_cost\")\n",
+ "epf_repair_cost.set_parameter(\"num_cpu\", num_cpu)\n",
+ "epf_repair_cost.run_analysis()\n",
+ "epf_repair_cost_result = epf_repair_cost.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1ef03d87",
+ "metadata": {},
+ "source": [
+ "### Pipeline Repair Rate damage"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "2d6bd1aa",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pipeline_dmg = PipelineDamageRepairRate(client)\n",
+ "fragility_service = FragilityService(client)\n",
+ "pipeline_dmg.set_input_dataset(\"pipeline\", pipeline)\n",
+ "mapping_id = \"5b47c227337d4a38464efea8\"\n",
+ "mapping_set = MappingSet(fragility_service.get_mapping(mapping_id))\n",
+ "pipeline_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
+ "pipeline_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
+ "pipeline_dmg.set_parameter(\"fragility_key\", 'pgv')\n",
+ "pipeline_dmg.set_parameter(\"num_cpu\", num_cpu)\n",
+ "pipeline_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
+ "pipeline_dmg.set_parameter(\"result_name\", result_name + \"_pipeline_dmg\")\n",
+ "pipeline_dmg.run_analysis()\n",
+ "pipeline_dmg_result = pipeline_dmg.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "79f14989",
+ "metadata": {},
+ "source": [
+ "### Pipeline Functionality"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "1172cc50",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pipeline_func = PipelineFunctionality(client)\n",
+ "pipeline_func.set_input_dataset(\"pipeline_repair_rate_damage\", pipeline_dmg_result)\n",
+ "pipeline_func.set_parameter(\"result_name\", result_name + \"_pipeline\")\n",
+ "pipeline_func.set_parameter(\"num_samples\", sim_number)\n",
+ "pipeline_func.run_analysis()\n",
+ "pipeline_sample_failure_state = pipeline_func.get_output_dataset(\"sample_failure_state\")\n",
+ "pipeline_sample_failure_state.get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5396072e",
+ "metadata": {},
+ "source": [
+ "### Pipeline Repair Time"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "76651f2f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pipeline_rest = PipelineRestoration(client)\n",
+ "restorationsvc = RestorationService(client)\n",
+ "mapping_set = MappingSet(restorationsvc.get_mapping(\"61f35f09903e515036cee106\"))\n",
+ "pipeline_rest.set_input_dataset(\"pipeline\", pipeline)\n",
+ "pipeline_rest.set_input_dataset(\"pipeline_damage\", pipeline_dmg_result)\n",
+ "pipeline_rest.set_input_dataset(\"dfr3_mapping_set\", mapping_set)\n",
+ "pipeline_rest.set_parameter(\"num_available_workers\", 4)\n",
+ "pipeline_rest.set_parameter(\"result_name\", result_name + \"_pipeline_restoration\")\n",
+ "pipeline_rest.run_analysis()\n",
+ "pipeline_restoration_time = pipeline_rest.get_output_dataset(\"pipeline_restoration\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "92eb500b",
+ "metadata": {},
+ "source": [
+ "### Pipeline Repair Cost"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3444f5ea",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pipeline_repair_cost = PipelineRepairCost(client)\n",
+ "pipeline_repair_cost.set_input_dataset(\"pipeline\", pipeline)\n",
+ "pipeline_repair_cost.load_remote_input_dataset(\"replacement_cost\", \"6480a2787ae18139d975e919\")\n",
+ "pipeline_repair_cost.set_input_dataset(\"pipeline_dmg\", pipeline_dmg_result)\n",
+ "pipeline_repair_cost.load_remote_input_dataset(\"pipeline_dmg_ratios\", \"6480a2d44dd25160127d2fcc\")\n",
+ "pipeline_repair_cost.set_parameter(\"result_name\", result_name + \"_pipeline_repair_cost\")\n",
+ "pipeline_repair_cost.set_parameter(\"num_cpu\", num_cpu)\n",
+ "pipeline_repair_cost.run_analysis()\n",
+ "pipeline_repair_cost_result = pipeline_repair_cost.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c4bed413",
+ "metadata": {},
+ "source": [
+ "### Building Damage"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "2d6cbfcb",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "bldg_dmg = BuildingDamage(client)\n",
+ "fragility_service = FragilityService(client)\n",
+ "bldg_dmg.load_remote_input_dataset(\"buildings\", bldg_inv_id)\n",
+ "mapping_id = \"5d2789dbb9219c3c553c7977\" # 4 DS\n",
+ "mapping_set = MappingSet(fragility_service.get_mapping(mapping_id))\n",
+ "bldg_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)\n",
+ "bldg_dmg.set_parameter(\"hazard_type\", hazard_type)\n",
+ "bldg_dmg.set_parameter(\"num_cpu\", 4)\n",
+ "bldg_dmg.set_parameter(\"hazard_id\", hazard_id)\n",
+ "bldg_dmg.set_parameter(\"result_name\", result_name + \"_bldg_dmg\")\n",
+ "bldg_dmg.run_analysis()\n",
+ "building_dmg_result = bldg_dmg.get_output_dataset(\"ds_result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "e8e4d138",
+ "metadata": {},
+ "source": [
+ "### Housing Unit Allocation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "19dd9144",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "hua = HousingUnitAllocation(client)\n",
+ "housing_unit_inv_id = \"5d543087b9219c0689b98234\"\n",
+ "address_point_inv_id = \"5d542fefb9219c0689b981fb\"\n",
+ "hua.load_remote_input_dataset(\"housing_unit_inventory\", housing_unit_inv_id)\n",
+ "hua.load_remote_input_dataset(\"address_point_inventory\", address_point_inv_id)\n",
+ "hua.load_remote_input_dataset(\"buildings\", bldg_inv_id)\n",
+ "hua.set_parameter(\"result_name\", result_name + \"_hua\")\n",
+ "hua.set_parameter(\"seed\", seed)\n",
+ "hua.set_parameter(\"iterations\", 1)\n",
+ "hua.run_analysis()\n",
+ "hua_result = hua.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "22c24d66",
+ "metadata": {},
+ "source": [
+ "### Population Dislocation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "c4ed9e91",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pop_dis = PopulationDislocation(client)\n",
+ "pop_dis.set_input_dataset(\"building_dmg\", building_dmg_result)\n",
+ "pop_dis.set_input_dataset(\"housing_unit_allocation\", hua_result)\n",
+ "pop_dis.load_remote_input_dataset(\"block_group_data\", \"5d542bd8b9219c0689b90408\")\n",
+ "pop_dis.load_remote_input_dataset(\"value_loss_param\", \"60354810e379f22e16560dbd\")\n",
+ "pop_dis.set_parameter(\"result_name\", result_name + \"_popdislocation\")\n",
+ "pop_dis.set_parameter(\"seed\", seed)\n",
+ "pop_dis.run_analysis()\n",
+ "pop_dislocation_result = pop_dis.get_output_dataset(\"result\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "93e1f26d",
+ "metadata": {},
+ "source": [
+ "### INDP"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "a92ed656",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "indp_analysis = INDP(client)\n",
+ "indp_analysis.set_parameter(\"network_type\", \"from_csv\")\n",
+ "indp_analysis.set_parameter(\"MAGS\", [1000])\n",
+ "indp_analysis.set_parameter(\"sample_range\", range(0,1))\n",
+ "indp_analysis.set_parameter(\"dislocation_data_type\", \"incore\")\n",
+ "indp_analysis.set_parameter(\"return_model\", \"step_function\")\n",
+ "indp_analysis.set_parameter(\"testbed_name\", \"seaside\")\n",
+ "indp_analysis.set_parameter(\"extra_commodity\", {1: [\"PW\"], 3: []})\n",
+ "indp_analysis.set_parameter(\"RC\", [{\"budget\": 2400000, \"time\": 70}])\n",
+ "indp_analysis.set_parameter(\"layers\", [1, 3])\n",
+ "indp_analysis.set_parameter(\"method\", \"INDP\")\n",
+ "# indp_analysis.set_parameter(\"method\", \"TDINDP\")\n",
+ "indp_analysis.set_parameter(\"t_steps\", 10)\n",
+ "indp_analysis.set_parameter(\"time_resource\", True)\n",
+ "indp_analysis.set_parameter(\"save_model\", False)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "13cfeecd",
+ "metadata": {},
+ "source": [
+ "### With different solver engines"
+ ]
+ },
+ {
+ "cell_type": "raw",
+ "id": "8ce46213",
+ "metadata": {},
+ "source": [
+ "# glpk\n",
+ "indp_analysis.set_parameter(\"solver_engine\", \"glpk\")\n",
+ "indp_analysis.set_parameter(\"solver_path\", \"/usr/local/bin/glpsol\")\n",
+ "indp_analysis.set_parameter(\"solver_time_limit\", 3600) # if not set default to never timeout"
+ ]
+ },
+ {
+ "cell_type": "raw",
+ "id": "db78ca59",
+ "metadata": {},
+ "source": [
+ "# scip\n",
+ "indp_analysis.set_parameter(\"solver_engine\", \"scip\")\n",
+ "indp_analysis.set_parameter(\"solver_path\", \"/usr/local/bin/scip\")\n",
+ "indp_analysis.set_parameter(\"solver_time_limit\", 3600) # if not set default to never timeout"
+ ]
+ },
+ {
+ "cell_type": "raw",
+ "id": "f2b96d06",
+ "metadata": {},
+ "source": [
+ "# cbc\n",
+ "indp_analysis.set_parameter(\"solver_engine\", \"cbc\")\n",
+ "indp_analysis.set_parameter(\"solver_path\", \"/usr/local/bin/cbc\")\n",
+ "indp_analysis.set_parameter(\"solver_time_limit\", 3600) # if not set default to never timeout"
+ ]
+ },
+ {
+ "cell_type": "raw",
+ "id": "0963727a",
+ "metadata": {},
+ "source": [
+ "# gurobi\n",
+ "indp_analysis.set_parameter(\"solver_engine\", \"gurobi\")\n",
+ "indp_analysis.set_parameter(\"solver_time_limit\", 3600) # if not set default to never timeout"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0355ee16",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "indp_analysis.set_input_dataset(\"wf_restoration_time\", wf_restoration_time)\n",
+ "indp_analysis.set_input_dataset(\"wf_repair_cost\", wf_repair_cost_result)\n",
+ "indp_analysis.set_input_dataset(\"epf_restoration_time\", epf_restoration_time)\n",
+ "indp_analysis.set_input_dataset(\"epf_repair_cost\", epf_repair_cost_result)\n",
+ "indp_analysis.set_input_dataset(\"pipeline_restoration_time\", pipeline_restoration_time)\n",
+ "indp_analysis.set_input_dataset(\"pipeline_repair_cost\", pipeline_repair_cost_result)\n",
+ "indp_analysis.set_input_dataset(\"power_network\", power_network_dataset)\n",
+ "indp_analysis.set_input_dataset(\"water_network\", water_network_dataset) # with distribution noes\n",
+ "indp_analysis.load_remote_input_dataset(\"powerline_supply_demand_info\", \"64adbfdeae71103fb41906e6\")\n",
+ "indp_analysis.load_remote_input_dataset(\"epf_supply_demand_info\", \"64adc019e1b74b4e1582110d\")\n",
+ "indp_analysis.load_remote_input_dataset(\"wf_supply_demand_info\", \"64adc051ae71103fb41906e7\")\n",
+ "indp_analysis.load_remote_input_dataset(\"pipeline_supply_demand_info\", \"64adc08ee1b74b4e1582110e\")\n",
+ "indp_analysis.load_remote_input_dataset(\"interdep\", \"64adc0c4ae71103fb41906e8\")\n",
+ "indp_analysis.set_input_dataset(\"wf_failure_state\", wterfclty_sample_failure_state)\n",
+ "indp_analysis.set_input_dataset(\"wf_damage_state\", wterfclty_sample_damage_states)\n",
+ "indp_analysis.set_input_dataset(\"pipeline_failure_state\", pipeline_sample_failure_state)\n",
+ "indp_analysis.set_input_dataset(\"epf_failure_state\", epf_sample_failure_state)\n",
+ "indp_analysis.set_input_dataset(\"epf_damage_state\", epf_sample_damage_states)\n",
+ "indp_analysis.set_input_dataset(\"pop_dislocation\", pop_dislocation_result)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "915f6ce1",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Run Analysis\n",
+ "indp_analysis.run_analysis()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "c04a9575",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "indp_analysis.get_output_dataset(\"action\").get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "fd2566d4",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "indp_analysis.get_output_dataset(\"cost\").get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "431b14f0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "indp_analysis.get_output_dataset(\"runtime\").get_dataframe_from_csv().head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3a7e0b8f",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.8.16"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/notebooks/pyincore-viz-example.ipynb b/notebooks/pyincore-viz-example.ipynb
index 7c70781f..e085a673 100644
--- a/notebooks/pyincore-viz-example.ipynb
+++ b/notebooks/pyincore-viz-example.ipynb
@@ -206,11 +206,11 @@
"outputs": [],
"source": [
"# visualize multiple vector based dataset\n",
- "joplin_random_angle_tornado = '5d49ddc5b9219c0689f184ca'\n",
- "joplin_tornado = '5f4f0ec78e5e451825ccabbf'\n",
+ "joplin_dataset_tornado = '6373de2d55ad1e1a262d848e'\n",
+ "joplin_scenario_tornado = '63237dd25503e755037f4b04'\n",
"joplin_power_facility_substations = '5d92355bb9219c06ae7e386a'\n",
- "tornado1_metadata = HazardService(client).get_tornado_hazard_metadata(joplin_random_angle_tornado)\n",
- "tornado2_metadata = HazardService(client).get_tornado_hazard_metadata(joplin_tornado)\n",
+ "tornado1_metadata = HazardService(client).get_tornado_hazard_metadata(joplin_dataset_tornado)\n",
+ "tornado2_metadata = HazardService(client).get_tornado_hazard_metadata(joplin_scenario_tornado)\n",
"dataset1 = Dataset.from_data_service(tornado1_metadata[\"datasetId\"], DataService(client))\n",
"dataset2 = Dataset.from_data_service(tornado2_metadata[\"datasetId\"], DataService(client))\n",
"dataset3 = Dataset.from_data_service(joplin_power_facility_substations, DataService(client))\n",
@@ -362,7 +362,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -376,7 +376,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.7"
+ "version": "3.10.11"
}
},
"nbformat": 4,
diff --git a/restapi/Dockerfile b/restapi/Dockerfile
index 75946365..907adbea 100644
--- a/restapi/Dockerfile
+++ b/restapi/Dockerfile
@@ -4,7 +4,6 @@ RUN apt-get -qq update && apt-get -qq install git
RUN mkdir /usr/share/nginx/html/doc && \
mkdir /usr/share/nginx/html/doc/api
-COPY *.json /usr/share/nginx/html/doc/api/
COPY index.html /usr/share/nginx/html/doc/api/.
COPY api.conf /etc/nginx/conf.d/default.conf
diff --git a/restapi/data.json b/restapi/data.json
deleted file mode 100644
index 75c5a565..00000000
--- a/restapi/data.json
+++ /dev/null
@@ -1,1157 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "description": "IN-CORE Data Service for creating and accessing datasets",
- "version": "1.14.0",
- "title": "Data Service",
- "contact": {
- "name": "IN-CORE Dev Team",
- "url": "https://incore.ncsa.illinois.edu",
- "email": "incore-dev@lists.illinois.edu"
- },
- "license": {
- "name": "Mozilla Public License 2.0 (MPL 2.0)",
- "url": "https://www.mozilla.org/en-US/MPL/2.0/"
- }
- },
- "host": "incore.ncsa.illinois.edu",
- "basePath": "/data/api",
- "tags": [
- {
- "name": "datasets"
- },
- {
- "name": "datatypes"
- },
- {
- "name": "status"
- }
- ],
- "schemes": [
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/datasets": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Gets a list of datasets",
- "description": "Can filter by type, title, creator etc.",
- "operationId": "getDatasets",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "type",
- "in": "query",
- "description": "DataType of IN-CORE datasets. Can filter by partial datatype strings. ex: ergo:buildingInventoryVer5, ergo:census",
- "required": false,
- "type": "string"
- },
- {
- "name": "title",
- "in": "query",
- "description": "Title of dataset. Can filter by partial title strings",
- "required": false,
- "type": "string"
- },
- {
- "name": "creator",
- "in": "query",
- "description": "Username of the creator",
- "required": false,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "excludeHazard",
- "in": "query",
- "description": "Exclusion of the hazard dataset",
- "required": false,
- "type": "boolean",
- "default": true
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Dataset"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "datasets"
- ],
- "summary": "Ingest dataset object as json",
- "description": "Files have to uploaded to the dataset separately using {id}/files endpoint",
- "operationId": "ingestDataset",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "dataset",
- "in": "formData",
- "description": "JSON representing an input dataset",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Dataset"
- }
- }
- }
- }
- },
- "/datasets/{id}": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Gets a dataset from the Dataset collection",
- "description": "",
- "operationId": "getDatasetbyId",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Dataset"
- }
- }
- }
- },
- "put": {
- "tags": [
- "datasets"
- ],
- "summary": "Updates the dataset's JSON associated with a dataset id",
- "description": "Only allows updating string attributes of the dataset. This will not upload file content of the dataset to the server, they should be done separately using {id}/files endpoint",
- "operationId": "updateObject",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- },
- {
- "name": "update",
- "in": "formData",
- "description": "JSON representing an input dataset",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "object"
- }
- }
- }
- },
- "delete": {
- "tags": [
- "datasets"
- ],
- "summary": "Deletes a dataset",
- "description": "Also deletes attached information like files and geoserver layer",
- "operationId": "deleteDataset",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Dataset"
- }
- }
- }
- }
- },
- "/datasets/{id}/blob": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Returns a zip file that contains all the files attached to a dataset specified by {id}",
- "description": "",
- "operationId": "getFileByDataset",
- "produces": [
- "application/octet-stream"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "default": {
- "description": "successful operation"
- }
- }
- }
- },
- "/datasets/{id}/files": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Gets the list of files associated with the dataset and their metadata",
- "description": "",
- "operationId": "getDatasetsFiles",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FileDescriptor"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "datasets"
- ],
- "summary": "Upload file(s) to attach to a dataset",
- "description": "GIS files like shp, tif etc. are also uploaded to IN-CORE geoserver",
- "operationId": "uploadFiles",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "description": "Form inputs representing the file(s). The id/key of each input file has to be 'file'",
- "required": true,
- "schema": {
- "$ref": "#/definitions/FormDataMultiPart"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Dataset"
- }
- }
- }
- }
- },
- "/datasets/{id}/files/{file_id}": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Gets metadata of a file associated to a dataset",
- "description": "",
- "operationId": "getFileByDatasetIdFileDescriptor",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- },
- {
- "name": "file_id",
- "in": "path",
- "description": "FileDescriptor Object Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/FileDescriptor"
- }
- }
- }
- }
- },
- "/datasets/{id}/files/{file_id}/blob": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Returns a file that is attached to a FileDescriptor of a dataset",
- "description": "",
- "operationId": "getFileByFileDescriptor",
- "produces": [
- "application/octet-stream"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "id",
- "in": "path",
- "description": "Dataset Id from data service",
- "required": true,
- "type": "string"
- },
- {
- "name": "file_id",
- "in": "path",
- "description": "FileDescriptor Object Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "default": {
- "description": "successful operation"
- }
- }
- }
- },
- "/datasets/search": {
- "get": {
- "tags": [
- "datasets"
- ],
- "summary": "Search for a text in all datasets",
- "description": "Gets all datasets that contain a specific text",
- "operationId": "findDatasets",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "excludeHazard",
- "in": "query",
- "description": "Exclusion of the hazard dataset",
- "required": false,
- "type": "boolean",
- "default": true
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Dataset"
- }
- }
- },
- "404": {
- "description": "No datasets found with the searched text"
- }
- }
- }
- },
- "/datatypes": {
- "get": {
- "tags": [
- "datatypes"
- ],
- "summary": "Gets the list of unique datatypes associated with the datasets",
- "description": "",
- "operationId": "getDatatypes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Filter by space name",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/DatasetType"
- }
- }
- }
- }
- }
- },
- "/status": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the status of the service.",
- "description": "This will provide the status of the service as a JSON.",
- "operationId": "getStatus",
- "produces": [
- "application/json"
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/status/usage/datasets": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the count and size of datasets.",
- "description": "This excludes datasets created by hazard service.",
- "operationId": "getUserStatusDataset",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/status/usage/hazards": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the count and size of datasets created by the hazard service.",
- "description": "",
- "operationId": "getUserStatusHazard",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- }
- },
- "definitions": {
- "Dataset": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "deleted": {
- "type": "boolean"
- },
- "title": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "contributors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "fileDescriptors": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FileDescriptor"
- }
- },
- "dataType": {
- "type": "string"
- },
- "storedUrl": {
- "type": "string"
- },
- "format": {
- "type": "string"
- },
- "sourceDataset": {
- "type": "string"
- },
- "boundingBox": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "networkDataset": {
- "$ref": "#/definitions/NetworkDataset"
- }
- }
- },
- "FileDescriptor": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "deleted": {
- "type": "boolean"
- },
- "filename": {
- "type": "string"
- },
- "mimeType": {
- "type": "string"
- },
- "size": {
- "type": "integer",
- "format": "int64"
- },
- "dataURL": {
- "type": "string"
- },
- "md5sum": {
- "type": "string"
- }
- }
- },
- "NetworkData": {
- "type": "object",
- "properties": {
- "networkType": {
- "type": "string"
- },
- "fileName": {
- "type": "string"
- }
- }
- },
- "NetworkDataset": {
- "type": "object",
- "properties": {
- "link": {
- "$ref": "#/definitions/NetworkData"
- },
- "node": {
- "$ref": "#/definitions/NetworkData"
- },
- "graph": {
- "$ref": "#/definitions/NetworkData"
- }
- }
- },
- "BodyPart": {
- "type": "object",
- "properties": {
- "contentDisposition": {
- "$ref": "#/definitions/ContentDisposition"
- },
- "entity": {
- "type": "object"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "mediaType": {
- "$ref": "#/definitions/MediaType"
- },
- "messageBodyWorkers": {
- "$ref": "#/definitions/MessageBodyWorkers"
- },
- "parent": {
- "$ref": "#/definitions/MultiPart"
- },
- "providers": {
- "$ref": "#/definitions/Providers"
- },
- "parameterizedHeaders": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ParameterizedHeader"
- }
- }
- }
- }
- },
- "ContentDisposition": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "parameters": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "fileName": {
- "type": "string"
- },
- "creationDate": {
- "type": "string",
- "format": "date-time"
- },
- "modificationDate": {
- "type": "string",
- "format": "date-time"
- },
- "readDate": {
- "type": "string",
- "format": "date-time"
- },
- "size": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "FormDataBodyPart": {
- "type": "object",
- "properties": {
- "contentDisposition": {
- "$ref": "#/definitions/ContentDisposition"
- },
- "entity": {
- "type": "object"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "mediaType": {
- "$ref": "#/definitions/MediaType"
- },
- "messageBodyWorkers": {
- "$ref": "#/definitions/MessageBodyWorkers"
- },
- "parent": {
- "$ref": "#/definitions/MultiPart"
- },
- "providers": {
- "$ref": "#/definitions/Providers"
- },
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "formDataContentDisposition": {
- "$ref": "#/definitions/FormDataContentDisposition"
- },
- "simple": {
- "type": "boolean"
- },
- "parameterizedHeaders": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ParameterizedHeader"
- }
- }
- }
- }
- },
- "FormDataContentDisposition": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "parameters": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "fileName": {
- "type": "string"
- },
- "creationDate": {
- "type": "string",
- "format": "date-time"
- },
- "modificationDate": {
- "type": "string",
- "format": "date-time"
- },
- "readDate": {
- "type": "string",
- "format": "date-time"
- },
- "size": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "FormDataMultiPart": {
- "type": "object",
- "properties": {
- "contentDisposition": {
- "$ref": "#/definitions/ContentDisposition"
- },
- "entity": {
- "type": "object"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "mediaType": {
- "$ref": "#/definitions/MediaType"
- },
- "messageBodyWorkers": {
- "$ref": "#/definitions/MessageBodyWorkers"
- },
- "parent": {
- "$ref": "#/definitions/MultiPart"
- },
- "providers": {
- "$ref": "#/definitions/Providers"
- },
- "bodyParts": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/BodyPart"
- }
- },
- "fields": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FormDataBodyPart"
- }
- }
- },
- "parameterizedHeaders": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ParameterizedHeader"
- }
- }
- }
- }
- },
- "MediaType": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "subtype": {
- "type": "string"
- },
- "parameters": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "wildcardType": {
- "type": "boolean"
- },
- "wildcardSubtype": {
- "type": "boolean"
- }
- }
- },
- "MessageBodyWorkers": {
- "type": "object"
- },
- "MultiPart": {
- "type": "object",
- "properties": {
- "contentDisposition": {
- "$ref": "#/definitions/ContentDisposition"
- },
- "entity": {
- "type": "object"
- },
- "headers": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "mediaType": {
- "$ref": "#/definitions/MediaType"
- },
- "messageBodyWorkers": {
- "$ref": "#/definitions/MessageBodyWorkers"
- },
- "parent": {
- "$ref": "#/definitions/MultiPart"
- },
- "providers": {
- "$ref": "#/definitions/Providers"
- },
- "bodyParts": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/BodyPart"
- }
- },
- "parameterizedHeaders": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ParameterizedHeader"
- }
- }
- }
- }
- },
- "ParameterizedHeader": {
- "type": "object",
- "properties": {
- "value": {
- "type": "string"
- },
- "parameters": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- }
- },
- "Providers": {
- "type": "object"
- },
- "DatasetType": {
- "type": "object",
- "properties": {
- "dataType": {
- "type": "string"
- },
- "space": {
- "type": "string"
- }
- }
- }
- }
-}
diff --git a/restapi/dfr3.json b/restapi/dfr3.json
deleted file mode 100644
index 0970f65e..00000000
--- a/restapi/dfr3.json
+++ /dev/null
@@ -1,1371 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "description": "IN-CORE Service For Fragilities, Repairs, Restorations and Inventory Mappings",
- "version": "1.14.0",
- "title": "DFR3 Service",
- "contact": {
- "name": "IN-CORE Dev Team",
- "url": "https://incore.ncsa.illinois.edu",
- "email": "incore-dev@lists.illinois.edu"
- },
- "license": {
- "name": "Mozilla Public License 2.0 (MPL 2.0)",
- "url": "https://www.mozilla.org/en-US/MPL/2.0/"
- }
- },
- "host": "incore.ncsa.illinois.edu",
- "basePath": "/dfr3/api",
- "tags": [
- {
- "name": "fragilities"
- },
- {
- "name": "repairs"
- },
- {
- "name": "restorations"
- },
- {
- "name": "mappings"
- },
- {
- "name": "status"
- }
- ],
- "schemes": [
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/fragilities": {
- "get": {
- "tags": [
- "fragilities"
- ],
- "summary": "Gets list of fragilities",
- "description": "Apply filters to get the desired set of fragilities",
- "operationId": "getFragilities",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demand",
- "in": "query",
- "description": "demand type filter",
- "required": false,
- "type": "string",
- "x-example": "PGA"
- },
- {
- "name": "hazard",
- "in": "query",
- "description": "hazard type filter",
- "required": false,
- "type": "string",
- "x-example": "earthquake"
- },
- {
- "name": "inventory",
- "in": "query",
- "description": "Inventory type",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "legacy_id",
- "in": "query",
- "description": "Legacy fragility Id from v1",
- "required": false,
- "type": "string"
- },
- {
- "name": "creator",
- "in": "query",
- "description": "Fragility creator's username",
- "required": false,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "fragilities"
- ],
- "summary": "Create a fragility set",
- "description": "Post a fragility set to the dfr3 service",
- "operationId": "uploadFragilitySet",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "description": "json representing the fragility set",
- "required": false,
- "schema": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- }
- }
- },
- "/fragilities/{fragilityId}": {
- "get": {
- "tags": [
- "fragilities"
- ],
- "summary": "Gets a fragility by Id",
- "description": "Get a particular fragility based on the id provided",
- "operationId": "getFragilityById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "fragilityId",
- "in": "path",
- "description": "fragility id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d8337d4a36187c6727"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- }
- },
- "delete": {
- "tags": [
- "fragilities"
- ],
- "summary": "Deletes a fragility by id",
- "description": "",
- "operationId": "deleteFragilityById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "fragilityId",
- "in": "path",
- "description": "fragility id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d8337d4a36187c6727"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- }
- }
- },
- "/fragilities/search": {
- "get": {
- "tags": [
- "fragilities"
- ],
- "summary": "Search for a text in all fragilities",
- "description": "Gets all fragilities that contain a specific text",
- "operationId": "findFragilities",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "steel"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FragilitySet"
- }
- }
- },
- "404": {
- "description": "No fragilities found with the searched text"
- }
- }
- }
- },
- "/repairs": {
- "get": {
- "tags": [
- "repairs"
- ],
- "summary": "Gets list of repairs",
- "description": "Apply filters to get the desired set of repairs",
- "operationId": "getRepairs",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hazard",
- "in": "query",
- "description": "hazard type filter",
- "required": false,
- "type": "string",
- "x-example": "earthquake"
- },
- {
- "name": "inventory",
- "in": "query",
- "description": "Inventory type",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "creator",
- "in": "query",
- "description": "Repair creator's username",
- "required": false,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "repairs"
- ],
- "summary": "Create a repair set",
- "description": "Post a repair set to the repair service",
- "operationId": "uploadRepairSet",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "description": "json representing the repair set",
- "required": false,
- "schema": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- }
- }
- },
- "/repairs/{repairId}": {
- "get": {
- "tags": [
- "repairs"
- ],
- "summary": "Gets a repair by Id",
- "description": "Get a particular repair based on the id provided",
- "operationId": "getRepairSetById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "repairId",
- "in": "path",
- "description": "hexadecimal repair id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d8337d4a36187c6727"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- }
- },
- "delete": {
- "tags": [
- "repairs"
- ],
- "summary": "Deletes a repair by id",
- "description": "",
- "operationId": "deleteRepairById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "repairId",
- "in": "path",
- "description": "repair id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d8337d4a36187c6727"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- }
- }
- },
- "/repairs/search": {
- "get": {
- "tags": [
- "repairs"
- ],
- "summary": "Search for a text in all repairs",
- "description": "Gets all repairs that contain a specific text",
- "operationId": "findRepairs",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "steel"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RepairSet"
- }
- }
- },
- "404": {
- "description": "No repairs found with the searched text"
- }
- }
- }
- },
- "/restorations": {
- "get": {
- "tags": [
- "restorations"
- ],
- "summary": "Gets list of restorations",
- "description": "Apply filters to get the desired set of restorations",
- "operationId": "getRestorations",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hazard",
- "in": "query",
- "description": "hazard type filter",
- "required": false,
- "type": "string",
- "x-example": "earthquake"
- },
- {
- "name": "inventory",
- "in": "query",
- "description": "Inventory type",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "creator",
- "in": "query",
- "description": "Restoration creator's username",
- "required": false,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RestorationSet"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "restorations"
- ],
- "summary": "Create a restoration set",
- "description": "Post a restoration set to the restoration service",
- "operationId": "uploadRestorationSet",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "description": "json representing the restoration set",
- "required": false,
- "schema": {
- "$ref": "#/definitions/RestorationSet"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/RestorationSet"
- }
- }
- }
- }
- },
- "/restorations/search": {
- "get": {
- "tags": [
- "restorations"
- ],
- "summary": "Search for a text in all restorations",
- "description": "Gets all restorations that contain a specific text",
- "operationId": "findRestorations",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "steel"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RestorationSet"
- }
- }
- },
- "404": {
- "description": "No restorations found with the searched text"
- }
- }
- }
- },
- "/mappings": {
- "get": {
- "tags": [
- "mappings"
- ],
- "summary": "Gets list of all inventory mappings",
- "description": "Apply filters to get the desired set of mappings",
- "operationId": "getMappings",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hazard",
- "in": "query",
- "description": "hazard type filter",
- "required": false,
- "type": "string",
- "x-example": "earthquake"
- },
- {
- "name": "inventory",
- "in": "query",
- "description": "Inventory type",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "mappingType",
- "in": "query",
- "description": "DFR3 Mapping type",
- "required": false,
- "type": "string",
- "x-example": "fragility, restoration, repair"
- },
- {
- "name": "creator",
- "in": "query",
- "description": "Creator's username",
- "required": false,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- }
- }
- },
- "post": {
- "tags": [
- "mappings"
- ],
- "summary": "Create an inventory mapping",
- "description": "Post a json that represents mapping between inventory's attributes and DFR3 object sets",
- "operationId": "uploadMapping",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "description": "json representing the fragility mapping",
- "required": false,
- "schema": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- }
- }
- },
- "/mappings/{mappingId}": {
- "get": {
- "tags": [
- "mappings"
- ],
- "summary": "Gets a mapping set by Id",
- "description": "Get a particular mapping set based on the id provided",
- "operationId": "getMappingSetById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "mappingId",
- "in": "path",
- "description": "mapping id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d9337d4a36187c7563"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- }
- },
- "delete": {
- "tags": [
- "mappings"
- ],
- "summary": "Deletes a mapping by id",
- "description": "",
- "operationId": "deleteMappingById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "mappingId",
- "in": "path",
- "description": "mapping id",
- "required": true,
- "type": "string",
- "x-example": "5b47b2d8337d4a36187c6727"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- }
- }
- },
- "/mappings/search": {
- "get": {
- "tags": [
- "mappings"
- ],
- "summary": "Search for a text in all mappings",
- "description": "Gets all mappings that contain a specific text",
- "operationId": "findMappings",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "steel"
- },
- {
- "name": "mappingType",
- "in": "query",
- "description": "DFR3 Mapping type",
- "required": false,
- "type": "string",
- "x-example": "fragility, restoration, repair"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/MappingSet"
- }
- }
- }
- }
- }
- },
- "/status": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the status of the service.",
- "description": "This will provide the status of the service as a JSON.",
- "operationId": "getStatus",
- "produces": [
- "application/json"
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/status/usage": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the count for each dfr3 database.",
- "description": "",
- "operationId": "getUserStatusHazards",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- }
- },
- "definitions": {
- "FragilityCurve": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- }
- }
- },
- "FragilityCurveParameter": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "unit": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "fullName": {
- "type": "string"
- },
- "expression": {
- "type": "string"
- }
- }
- },
- "FragilitySet": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "legacyId": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "authors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "paperReference": {
- "$ref": "#/definitions/PaperReference"
- },
- "resultUnit": {
- "type": "string"
- },
- "resultType": {
- "type": "string"
- },
- "hazardType": {
- "type": "string"
- },
- "inventoryType": {
- "type": "string"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "demandTypes": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "demandUnits": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "fragilityCurves": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FragilityCurve"
- }
- },
- "fragilityCurveParameters": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FragilityCurveParameter"
- }
- }
- }
- },
- "PaperReference": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "doi": {
- "type": "string"
- },
- "yearPublished": {
- "type": "string"
- }
- }
- },
- "Mapping": {
- "type": "object",
- "properties": {
- "legacyEntry": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "entry": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "rules": {
- "type": "object"
- }
- }
- },
- "MappingSet": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "hazardType": {
- "type": "string"
- },
- "inventoryType": {
- "type": "string"
- },
- "mappings": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Mapping"
- }
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "mappingType": {
- "type": "string"
- }
- }
- },
- "RepairCurve": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- }
- }
- },
- "RepairSet": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "legacyId": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "authors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "paperReference": {
- "$ref": "#/definitions/PaperReference"
- },
- "resultUnit": {
- "type": "string"
- },
- "resultType": {
- "type": "string"
- },
- "hazardType": {
- "type": "string"
- },
- "inventoryType": {
- "type": "string"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "timeUnits": {
- "type": "string"
- },
- "repairCurves": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RepairCurve"
- }
- }
- }
- },
- "RestorationCurve": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- }
- }
- },
- "RestorationSet": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "legacyId": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "authors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "paperReference": {
- "$ref": "#/definitions/PaperReference"
- },
- "resultUnit": {
- "type": "string"
- },
- "resultType": {
- "type": "string"
- },
- "hazardType": {
- "type": "string"
- },
- "inventoryType": {
- "type": "string"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "timeUnits": {
- "type": "string"
- },
- "restorationCurves": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/RestorationCurve"
- }
- }
- }
- }
- }
-}
diff --git a/restapi/hazard.json b/restapi/hazard.json
deleted file mode 100644
index 5308565b..00000000
--- a/restapi/hazard.json
+++ /dev/null
@@ -1,3753 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "description": "IN-CORE Hazard Service For Earthquake, Tornado, Tsunami, Hurricane and Flood",
- "version": "1.14.0",
- "title": "Hazard Service",
- "contact": {
- "name": "IN-CORE Dev Team",
- "url": "https://incore.ncsa.illinois.edu",
- "email": "incore-dev@lists.illinois.edu"
- },
- "license": {
- "name": "Mozilla Public License 2.0 (MPL 2.0)",
- "url": "https://www.mozilla.org/en-US/MPL/2.0/"
- }
- },
- "host": "incore.ncsa.illinois.edu",
- "basePath": "/hazard/api",
- "tags": [
- {
- "name": "earthquakes"
- },
- {
- "name": "floods"
- },
- {
- "name": "hurricanes"
- },
- {
- "name": "hurricaneWindfields"
- },
- {
- "name": "tornadoes"
- },
- {
- "name": "tsunamis"
- },
- {
- "name": "status"
- }
- ],
- "schemes": [
- "https"
- ],
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "paths": {
- "/earthquakes": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns all earthquakes.",
- "description": "",
- "operationId": "getEarthquakes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of the space.",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results.",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit number of results to return.",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Earthquake"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "post": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Creates a new earthquake, the newly created earthquake is returned.",
- "description": "Additionally, a GeoTiff (raster) is created by default and publish to data repository. User can create both model earthquakes (with attenuation) and dataset-based earthquakes with GeoTiff files uploaded.",
- "operationId": "createEarthquake",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "useWorkflow",
- "in": "query",
- "description": "Use workflow service.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- {
- "name": "earthquake",
- "in": "formData",
- "description": "Earthquake json.",
- "required": true,
- "type": "string"
- },
- {
- "name": "file",
- "in": "formData",
- "description": "Earthquake files.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Earthquake"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns the earthquake with matching id.",
- "description": "",
- "operationId": "getEarthquake",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "Id of the earthquake.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Earthquake"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "delete": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Deletes an earthquake",
- "description": "Also deletes attached dataset and related files",
- "operationId": "deleteEarthquake",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "Earthquake Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Earthquake"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}/raster": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns SeismicHazardResults for a given attenuation model-based earthquake id, demand type and unit, coordinates and grid spacing.",
- "description": " SeismicHazardResults contains the metadata about the raster data along with a list of HazardResults. Each HazardResult is a lat, long and hazard value.",
- "operationId": "getEarthquakeHazardForBox",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "ID of the Earthquake.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandType",
- "in": "query",
- "description": "Ground motion demand type. Ex: PGA, PGV, 0.2 SA, etc",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandUnits",
- "in": "query",
- "description": "Ground motion demand unit. Ex: g, %g, cm/s, etc",
- "required": true,
- "type": "string"
- },
- {
- "name": "minX",
- "in": "query",
- "description": "Bounding box of a raster. Min X.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "minY",
- "in": "query",
- "description": "Bounding box of a raster. Min Y.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "maxX",
- "in": "query",
- "description": "Bounding box of a raster. Max X.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "maxY",
- "in": "query",
- "description": "Bounding box of a raster. max Y.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "gridSpacing",
- "in": "query",
- "description": "Grid spacing.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "amplifyHazard",
- "in": "query",
- "description": "Amplify hazard.",
- "required": false,
- "type": "boolean",
- "default": true
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/SeismicHazardResults"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}/values": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns hazard values for the given earthquake id.",
- "description": "The results contain ground shaking parameter (PGA, SA, etc) for specific locations.",
- "operationId": "getEarthquakeHazardValues",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "ID of the Earthquake.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandType",
- "in": "query",
- "description": "Ground motion demand type. Ex: PGA, PGV, 0.2 SA, etc.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandUnits",
- "in": "query",
- "description": "Ground motion demand unit. Ex: g, %g, cm/s, etc.",
- "required": true,
- "type": "string"
- },
- {
- "name": "amplifyHazard",
- "in": "query",
- "description": "Amplify hazard by soil type.",
- "required": false,
- "type": "boolean",
- "default": true
- },
- {
- "name": "point",
- "in": "query",
- "description": "List of points provided as lat,long. Ex: '28.01,-83.85'.",
- "required": true,
- "type": "array",
- "items": {
- "type": "string"
- },
- "collectionFormat": "multi"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SeismicHazardResult"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- },
- "deprecated": true
- },
- "post": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns earthquake values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postEarthquakeValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "Earthquake Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- },
- {
- "name": "siteClassId",
- "in": "formData",
- "description": "Site class dataset from data service.",
- "required": false,
- "type": "string"
- },
- {
- "name": "amplifyHazard",
- "in": "formData",
- "description": "Amplify earthquake by soil type",
- "required": false,
- "type": "boolean",
- "default": true
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}/aleatoryuncertainty": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns aleatory uncertainties for a model based earthquake",
- "description": "",
- "operationId": "getEarthquakeAleatoricUncertainties",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "ID of the Earthquake.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandType",
- "in": "query",
- "description": "Demand Type. Ex: PGA.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "object",
- "additionalProperties": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}/variance/{variance-type}": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns total and epistemic variance for a model based earthquake",
- "description": "",
- "operationId": "getEarthquakeVariance",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "ID of the Earthquake.",
- "required": true,
- "type": "string"
- },
- {
- "name": "variance-type",
- "in": "path",
- "description": "Type of Variance. epistemic or total",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandType",
- "in": "query",
- "description": "Demand Type. Ex: PGA.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandUnits",
- "in": "query",
- "description": "Demand unit. Ex: g.",
- "required": true,
- "type": "string"
- },
- {
- "name": "point",
- "in": "query",
- "description": "List of points provided as lat,long. Ex: '28.01,-83.85'.",
- "required": true,
- "type": "array",
- "items": {
- "type": "string"
- },
- "collectionFormat": "multi"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/VarianceResult"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/{earthquake-id}/liquefaction/values": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns liquefaction (PGD) values, probability of liquefaction, and probability of ground failure.",
- "description": "This needs a valid susceptibility dataset as a shapefile for the earthquake location.",
- "operationId": "getEarthquakeLiquefaction",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "ID of the Earthquake.",
- "required": true,
- "type": "string"
- },
- {
- "name": "geologyDataset",
- "in": "query",
- "description": "Geology dataset from data service.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandUnits",
- "in": "query",
- "description": "Liquefaction demand unit. Ex: in, cm, etc",
- "required": true,
- "type": "string"
- },
- {
- "name": "point",
- "in": "query",
- "description": "List of points provided as lat,long. Ex: '28.01,-83.85'",
- "required": true,
- "type": "array",
- "items": {
- "type": "string"
- },
- "collectionFormat": "multi"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/LiquefactionHazardResult"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- },
- "deprecated": true
- },
- "post": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns liquefaction (PGD) values, probability of liquefaction, and probability of ground failure",
- "description": "This needs a valid susceptibility dataset as a shapefile for a set of earthquake locations.",
- "operationId": "postEarthquakeLiquefactionValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "earthquake-id",
- "in": "path",
- "description": "Earthquake Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types(pgd) and units",
- "required": true,
- "type": "string"
- },
- {
- "name": "geologyDataset",
- "in": "formData",
- "description": "Geology dataset from data service.",
- "required": true,
- "type": "string"
- },
- {
- "name": "siteClassId",
- "in": "formData",
- "description": "Site class dataset from data service.",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/LiquefactionValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/soil/amplification": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Returns earthquake site hazard amplification.",
- "description": " This returns the amplified hazard given a methodology (e.g. NEHRP), soil map dataset id (optional), latitude, longitude, ground shaking parameter (PGA, Sa, etc), hazard value, and default site class to use.",
- "operationId": "getEarthquakeSiteAmplification",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "method",
- "in": "query",
- "description": "Method to get hazard amplification.",
- "required": true,
- "type": "string"
- },
- {
- "name": "datasetId",
- "in": "query",
- "description": "ID of site class dataset from data service.",
- "required": true,
- "type": "string"
- },
- {
- "name": "siteLat",
- "in": "query",
- "description": "Latitude coordinate of the site.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "siteLong",
- "in": "query",
- "description": "Longitude coordinate of the site.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "demandType",
- "in": "query",
- "description": "Ground motion demand type. Ex: PGA, PGV, 0.2 SA, etc.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hazard",
- "in": "query",
- "description": "Hazard value.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "defaultSiteClass",
- "in": "query",
- "description": "Default site classification. Expected A, B, C, D, E or F.",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/earthquakes/search": {
- "get": {
- "tags": [
- "earthquakes"
- ],
- "summary": "Search for a text in all earthquakes",
- "description": "Gets all earthquakes that contain a specific text",
- "operationId": "findEarthquakes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit number of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Earthquake"
- }
- }
- },
- "404": {
- "description": "No earthquakes found with the searched text"
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/floods": {
- "get": {
- "tags": [
- "floods"
- ],
- "summary": "Returns all floods.",
- "description": "",
- "operationId": "getFloods",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space.",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Flood"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "post": {
- "tags": [
- "floods"
- ],
- "summary": "Creates a new flood, the newly created flood is returned.",
- "description": "Additionally, a GeoTiff (raster) is created by default and publish to data repository. User can create dataset-based floods only.",
- "operationId": "createFlood",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "flood",
- "in": "formData",
- "description": "Flood json.",
- "required": true,
- "type": "string"
- },
- {
- "name": "file",
- "in": "formData",
- "description": "Flood files.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Flood"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/floods/{flood-id}": {
- "get": {
- "tags": [
- "floods"
- ],
- "summary": "Returns the flood with matching id.",
- "description": "",
- "operationId": "getFloodById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "flood-id",
- "in": "path",
- "description": "Flood dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Flood"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "delete": {
- "tags": [
- "floods"
- ],
- "summary": "Deletes a flood",
- "description": "Also deletes attached datasets and related files",
- "operationId": "deleteFlood",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "flood-id",
- "in": "path",
- "description": "Flood Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Flood"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/floods/{flood-id}/values": {
- "post": {
- "tags": [
- "floods"
- ],
- "summary": "Returns flood values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postFloodValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "flood-id",
- "in": "path",
- "description": "Glood Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/floods/search": {
- "get": {
- "tags": [
- "floods"
- ],
- "summary": "Search for a text in all floods",
- "description": "Gets all floods that contain a specific text",
- "operationId": "findFloods",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Flood"
- }
- }
- },
- "404": {
- "description": "No floods found with the searched text"
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricanes": {
- "get": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Returns all hurricanes.",
- "description": "",
- "operationId": "getHurricanes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space.",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Hurricane"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "post": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Creates a new hurricane, the newly created hurricane is returned.",
- "description": "Additionally, a GeoTiff (raster) is created by default and publish to data repository. User can create dataset-based hurricanes only.",
- "operationId": "createHurricane",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricane",
- "in": "formData",
- "description": "Hurricane json.",
- "required": true,
- "type": "string"
- },
- {
- "name": "file",
- "in": "formData",
- "description": "Hurricane files.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Hurricane"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricanes/{hurricane-id}": {
- "get": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Returns the hurricane with matching id.",
- "description": "",
- "operationId": "getHurricaneById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricane-id",
- "in": "path",
- "description": "Hurricane dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Hurricane"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "delete": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Deletes a Hurricane",
- "description": "Also deletes attached datasets and related files",
- "operationId": "deleteHurricanes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricane-id",
- "in": "path",
- "description": "Hurricane Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Hurricane"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricanes/{hurricane-id}/values": {
- "post": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Returns hurricane values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postHurricaneValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricane-id",
- "in": "path",
- "description": "Hurricane Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricanes/search": {
- "get": {
- "tags": [
- "hurricanes"
- ],
- "summary": "Search for a text in all hurricanes",
- "description": "Gets all hurricanes that contain a specific text",
- "operationId": "findHurricanes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Hurricane"
- }
- }
- },
- "404": {
- "description": "No hurricanes found with the searched text"
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricaneWindfields": {
- "get": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Returns all hurricanes.",
- "description": "",
- "operationId": "getHurricaneWindfields",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "coast",
- "in": "query",
- "description": "Hurricane coast. Ex: 'gulf, florida or east'.",
- "required": true,
- "type": "string"
- },
- {
- "name": "category",
- "in": "query",
- "description": "Hurricane category. Ex: between 1 and 5.",
- "required": true,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space.",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "post": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Creates a new hurricane, simulation of hurricane windfields is returned.",
- "description": "One dataset for each time frame of the simulation is returned representing the hurricane windfield's raster. Each cell represents the windspeed at 10m elevation and 3-sec wind gust by default",
- "operationId": "createHurricaneWindfields",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "in": "body",
- "name": "body",
- "required": false,
- "schema": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricaneWindfields/{hurricaneId}": {
- "get": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Returns the hurricane with matching id.",
- "description": "",
- "operationId": "getHurricaneWindfieldsById",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricaneId",
- "in": "path",
- "description": "Hurricane dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- },
- "delete": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Deletes a Hurricane Windfield",
- "description": "Also deletes attached datasets and related files",
- "operationId": "deleteHurricaneWindfields",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricaneId",
- "in": "path",
- "description": "Hurricane Windfield Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricaneWindfields/{hurricaneId}/values": {
- "post": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Returns hurricane wind field values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postHurricaneWindFieldValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "hurricaneId",
- "in": "path",
- "description": "hurricane wind field Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- },
- {
- "name": "elevation",
- "in": "formData",
- "description": "Elevation in meters at which wind speed has to be calculated.",
- "required": false,
- "type": "number",
- "default": 10.0,
- "format": "double"
- },
- {
- "name": "roughness",
- "in": "formData",
- "description": "Terrain exposure or roughness length. Acceptable range is 0.003 to 2.5 ",
- "required": false,
- "type": "number",
- "default": 0.03,
- "format": "double"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/hurricaneWindfields/search": {
- "get": {
- "tags": [
- "hurricaneWindfields"
- ],
- "summary": "Search for a text in all hurricanes",
- "description": "Gets all hurricanes that contain a specific text",
- "operationId": "findHurricaneWindfields",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HurricaneWindfields"
- }
- }
- },
- "404": {
- "description": "No hurricanes found with the searched text"
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/tornadoes": {
- "get": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Returns all tornadoes.",
- "description": "",
- "operationId": "getTornadoes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Name of space.",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Tornado"
- }
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- },
- "post": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Creates a new tornado, the newly created tornado is returned.",
- "description": "Additionally, a GeoTiff (raster) is created by default and publish to data repository. User can create both model tornadoes and dataset-based tornadoes with GeoTiff files uploaded.",
- "operationId": "createTornado",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado",
- "in": "formData",
- "description": "Tornado json.",
- "required": true,
- "type": "string"
- },
- {
- "name": "file",
- "in": "formData",
- "description": "Tornado files.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tornado"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tornadoes/{tornado-id}": {
- "get": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Returns the tornado with matching id.",
- "description": "",
- "operationId": "getTornado",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado-id",
- "in": "path",
- "description": "Tornado dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tornado"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- },
- "delete": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Deletes a tornado",
- "description": "Also deletes attached dataset and related files",
- "operationId": "deleteTornado",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado-id",
- "in": "path",
- "description": "Tornado Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tornado"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tornadoes/{tornado-id}/value": {
- "get": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Returns the wind speed at given location using the specified tornado.",
- "description": "",
- "operationId": "getTornadoHazard",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado-id",
- "in": "path",
- "description": "Tornado dataset guid from data service.",
- "required": true,
- "type": "string"
- },
- {
- "name": "demandUnits",
- "in": "query",
- "description": "Tornado demand unit. Ex: 'm'.",
- "required": true,
- "type": "string"
- },
- {
- "name": "siteLat",
- "in": "query",
- "description": "Latitude of a site. Ex: 35.027.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "siteLong",
- "in": "query",
- "description": "Longitude of a site. Ex: -90.131.",
- "required": true,
- "type": "number",
- "format": "double"
- },
- {
- "name": "simulation",
- "in": "query",
- "description": "Simulated wind hazard. Ex: 0.",
- "required": false,
- "type": "integer",
- "default": 0,
- "format": "int32"
- },
- {
- "name": "seed",
- "in": "query",
- "description": "Seed value for random values. Ex: 1000",
- "required": false,
- "type": "integer",
- "default": -1,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/WindHazardResult"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- },
- "deprecated": true
- }
- },
- "/tornadoes/{tornado-id}/values": {
- "post": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Returns tornado values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postTornadoValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado-id",
- "in": "path",
- "description": "Tornado Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- },
- {
- "name": "simulation",
- "in": "formData",
- "description": "Simulated wind hazard index. Ex: 0 for first, 1 for second and so on",
- "required": false,
- "type": "integer",
- "default": 0,
- "format": "int32"
- },
- {
- "name": "seed",
- "in": "formData",
- "description": "Seed value for random values. Ex: 1000",
- "required": false,
- "type": "integer",
- "default": -1,
- "format": "int32"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tornadoes/{tornado-id}/dataset": {
- "get": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Returns a zip shapefile representing tornado defined by given id.",
- "description": "",
- "operationId": "getFile",
- "produces": [
- "text/plain"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tornado-id",
- "in": "path",
- "description": "Tornado dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tornadoes/search": {
- "get": {
- "tags": [
- "tornadoes"
- ],
- "summary": "Search for a text in all tornadoes",
- "description": "Gets all tornadoes that contain a specific text",
- "operationId": "findTornadoes",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Tornado"
- }
- }
- },
- "404": {
- "description": "No tornadoes found with the searched text"
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tsunamis": {
- "get": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Returns all tsunamis.",
- "description": "",
- "operationId": "getTsunamis",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "space",
- "in": "query",
- "description": "Space name",
- "required": false,
- "type": "string"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Tsunami"
- }
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- },
- "post": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Creates a new tsunami, the newly created tsunami is returned.",
- "description": "Additionally, a GeoTiff (raster) is created by default and publish to data repository. User can create dataset-based tsunamis only.",
- "operationId": "createTsunami",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tsunami",
- "in": "formData",
- "description": "Tsunami json.",
- "required": true,
- "type": "string"
- },
- {
- "name": "file",
- "in": "formData",
- "description": "Tsunami files.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tsunami"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tsunamis/{tsunami-id}": {
- "get": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Returns the scenario tsunami matching the given id.",
- "description": "",
- "operationId": "getTsunami",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tsunami-id",
- "in": "path",
- "description": "Tsunami dataset guid from data service.",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tsunami"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- },
- "delete": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Deletes a Tsunami",
- "description": "Also deletes attached dataset and related files",
- "operationId": "deleteTsunami",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tsunami-id",
- "in": "path",
- "description": "Tsunami Id",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Tsunami"
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tsunamis/{tsunami-id}/values": {
- "post": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Returns tsunami values for a set of locations",
- "description": "Outputs hazard values, demand types, unit and location.",
- "operationId": "postTsunamiValues",
- "consumes": [
- "multipart/form-data"
- ],
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "tsunami-id",
- "in": "path",
- "description": "Tsunami Id",
- "required": true,
- "type": "string"
- },
- {
- "name": "points",
- "in": "formData",
- "description": "Json of the points along with demand types and units",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ValuesResponse"
- }
- }
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/tsunamis/search": {
- "get": {
- "tags": [
- "tsunamis"
- ],
- "summary": "Search for a text in all tsunamis",
- "description": "Gets all tsunamis that contain a specific text",
- "operationId": "findTsunamis",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "description": "User credentials.",
- "required": true,
- "type": "string"
- },
- {
- "name": "text",
- "in": "query",
- "description": "Text to search by",
- "required": false,
- "type": "string",
- "x-example": "building"
- },
- {
- "name": "skip",
- "in": "query",
- "description": "Skip the first n results",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Limit no of results to return",
- "required": false,
- "type": "integer",
- "default": 100,
- "format": "int32"
- },
- {
- "name": "sortBy",
- "in": "query",
- "description": "Specify the field or attribute on which the sorting is to be performed",
- "required": false,
- "type": "string",
- "default": "date"
- },
- {
- "name": "order",
- "in": "query",
- "description": "Specify the order of sorting, either ascending or descending",
- "required": false,
- "type": "string",
- "default": "desc"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Tsunami"
- }
- }
- },
- "404": {
- "description": "No tsunamis found with the searched text"
- },
- "500": {
- "description": "Internal Server Error."
- }
- }
- }
- },
- "/status": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the status of the service.",
- "description": "This will provide the status of the service as a JSON.",
- "operationId": "getStatus",
- "produces": [
- "application/json"
- ],
- "parameters": [],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- },
- "/status/usage": {
- "get": {
- "tags": [
- "status"
- ],
- "summary": "Gives the count for each hazard.",
- "description": "",
- "operationId": "getUserStatusHazards",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "x-auth-userinfo",
- "in": "header",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "type": "string"
- }
- },
- "500": {
- "description": "Internal Server Error"
- }
- }
- }
- }
- },
- "definitions": {
- "DeterministicHazardDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/HazardDataset"
- },
- {
- "type": "object",
- "properties": {
- "eqParameters": {
- "$ref": "#/definitions/EqParameters"
- }
- }
- }
- ]
- },
- "Earthquake": {
- "type": "object",
- "discriminator": "eqType",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "Earthquake dataset": {
- "allOf": [
- {
- "$ref": "#/definitions/Earthquake"
- },
- {
- "type": "object",
- "properties": {
- "hazardDatasets": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HazardDataset"
- }
- }
- },
- "description": "Contains id, description, name, privileges and the hazard datasets"
- }
- ]
- },
- "EarthquakeModel": {
- "allOf": [
- {
- "$ref": "#/definitions/Earthquake"
- },
- {
- "type": "object",
- "properties": {
- "attenuations": {
- "type": "object",
- "additionalProperties": {
- "type": "number",
- "format": "double"
- }
- },
- "eqParameters": {
- "$ref": "#/definitions/EqParameters"
- },
- "visualizationParameters": {
- "$ref": "#/definitions/EqVisualization"
- },
- "defaultSiteClass": {
- "type": "string"
- },
- "siteAmplification": {
- "type": "string"
- },
- "rasterDataset": {
- "$ref": "#/definitions/HazardDataset"
- }
- }
- }
- ]
- },
- "EqParameters": {
- "type": "object",
- "properties": {
- "srcLatitude": {
- "type": "number",
- "format": "double"
- },
- "srcLongitude": {
- "type": "number",
- "format": "double"
- },
- "magnitude": {
- "type": "number",
- "format": "double"
- },
- "coseismicRuptureDepth": {
- "type": "number",
- "format": "double"
- },
- "dipAngle": {
- "type": "number",
- "format": "double"
- },
- "azimuthAngle": {
- "type": "number",
- "format": "double"
- },
- "rakeAngle": {
- "type": "number",
- "format": "double"
- },
- "seismogenicDepth": {
- "type": "number",
- "format": "double"
- },
- "depth": {
- "type": "number",
- "format": "double"
- },
- "depth2p5KmPerSecShearWaveVelocity": {
- "type": "number",
- "format": "double"
- },
- "shearWaveDepth1p0": {
- "type": "number",
- "format": "double"
- },
- "faultTypeMap": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "region": {
- "type": "string"
- }
- }
- },
- "EqVisualization": {
- "type": "object",
- "properties": {
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "minX": {
- "type": "number",
- "format": "double"
- },
- "minY": {
- "type": "number",
- "format": "double"
- },
- "maxX": {
- "type": "number",
- "format": "double"
- },
- "maxY": {
- "type": "number",
- "format": "double"
- },
- "numPoints": {
- "type": "integer",
- "format": "int32"
- },
- "amplifyHazard": {
- "type": "boolean"
- }
- }
- },
- "HazardDataset": {
- "type": "object",
- "discriminator": "hazardType",
- "properties": {
- "datasetId": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "period": {
- "type": "number",
- "format": "double"
- },
- "threshold": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "ProbabilisticHazardDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/HazardDataset"
- },
- {
- "type": "object",
- "properties": {
- "recurrenceInterval": {
- "type": "integer",
- "format": "int32"
- },
- "recurrenceUnit": {
- "type": "string"
- }
- }
- }
- ]
- },
- "HazardResult": {
- "type": "object",
- "properties": {
- "latitude": {
- "type": "number",
- "format": "double"
- },
- "longitude": {
- "type": "number",
- "format": "double"
- },
- "hazardValue": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "SeismicHazardResults": {
- "type": "object",
- "properties": {
- "period": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "units": {
- "type": "string"
- },
- "hazardResults": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HazardResult"
- }
- }
- }
- },
- "ValuesResponse": {
- "type": "object",
- "properties": {
- "hazardValues": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "demands": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "units": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "loc": {
- "type": "string"
- }
- }
- },
- "SeismicHazardResult": {
- "type": "object",
- "properties": {
- "period": {
- "type": "string"
- },
- "demand": {
- "type": "string"
- },
- "units": {
- "type": "string"
- },
- "hazardValue": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "VarianceResult": {
- "type": "object",
- "properties": {
- "latitude": {
- "type": "number",
- "format": "double"
- },
- "longitude": {
- "type": "number",
- "format": "double"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "variance": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "LiquefactionValuesResponse": {
- "type": "object",
- "properties": {
- "pgdValues": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "liqProbability": {
- "type": "number",
- "format": "double"
- },
- "groundFailureProb": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "demands": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "units": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "loc": {
- "type": "string"
- }
- }
- },
- "LiquefactionHazardResult": {
- "type": "object",
- "properties": {
- "latitude": {
- "type": "number",
- "format": "double"
- },
- "longitude": {
- "type": "number",
- "format": "double"
- },
- "pgdUnits": {
- "type": "string"
- },
- "pgd": {
- "type": "number",
- "format": "double"
- },
- "liqProbability": {
- "type": "number",
- "format": "double"
- },
- "groundFailureProb": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- }
- }
- },
- "DeterministicFloodHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/FloodHazardDataset"
- },
- {
- "type": "object",
- "properties": {
- "floodParameters": {
- "$ref": "#/definitions/FloodDeterministicParameters"
- }
- }
- }
- ]
- },
- "Flood": {
- "type": "object",
- "discriminator": "floodType",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "FloodDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/Flood"
- },
- {
- "type": "object",
- "properties": {
- "hazardDatasets": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/FloodHazardDataset"
- }
- }
- }
- }
- ]
- },
- "FloodDeterministicParameters": {
- "type": "object",
- "properties": {
- "model": {
- "type": "string"
- }
- }
- },
- "FloodHazardDataset": {
- "type": "object",
- "discriminator": "hazardType",
- "properties": {
- "datasetId": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "threshold": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "ProbabilisticFloodHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/FloodHazardDataset"
- },
- {
- "type": "object",
- "properties": {}
- }
- ]
- },
- "DeterministicHurricaneHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/HurricaneHazardDataset"
- },
- {
- "type": "object",
- "properties": {
- "hurricaneParameters": {
- "$ref": "#/definitions/HurricaneDeterministicParameters"
- }
- }
- }
- ]
- },
- "Hurricane": {
- "type": "object",
- "discriminator": "hurricaneType",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "HurricaneDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/Hurricane"
- },
- {
- "type": "object",
- "properties": {
- "hazardDatasets": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HurricaneHazardDataset"
- }
- }
- }
- }
- ]
- },
- "HurricaneDeterministicParameters": {
- "type": "object",
- "properties": {
- "model": {
- "type": "string"
- }
- }
- },
- "HurricaneHazardDataset": {
- "type": "object",
- "discriminator": "hazardType",
- "properties": {
- "datasetId": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "threshold": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "ProbabilisticHurricaneHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/HurricaneHazardDataset"
- },
- {
- "type": "object",
- "properties": {}
- }
- ]
- },
- "HurricaneSimulationDataset": {
- "type": "object",
- "properties": {
- "absTime": {
- "type": "string"
- },
- "datasetId": {
- "type": "string"
- }
- }
- },
- "HurricaneWindfields": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "gridResolutionUnits": {
- "type": "string"
- },
- "rasterResolutionUnits": {
- "type": "string"
- },
- "transDUnits": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string",
- "enum": [
- "mph",
- "kt",
- "mps",
- "kmph"
- ]
- },
- "gridResolution": {
- "type": "integer",
- "format": "int32"
- },
- "rasterResolution": {
- "type": "number",
- "format": "double"
- },
- "transD": {
- "type": "number",
- "format": "double"
- },
- "landfallLocation": {
- "type": "string"
- },
- "modelUsed": {
- "type": "string"
- },
- "coast": {
- "type": "string"
- },
- "category": {
- "type": "integer",
- "format": "int32"
- },
- "gridPoints": {
- "type": "integer",
- "format": "int32"
- },
- "rfMethod": {
- "type": "string"
- },
- "times": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "hazardDatasets": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HurricaneSimulationDataset"
- }
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "EFBox": {
- "type": "object",
- "properties": {
- "efBoxWidths": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- }
- }
- },
- "Tornado": {
- "type": "object",
- "discriminator": "tornadoType",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "creator": {
- "type": "string"
- },
- "threshold": {
- "type": "number",
- "format": "double"
- },
- "thresholdUnit": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- },
- "date": {
- "type": "string",
- "format": "date-time"
- }
- }
- },
- "TornadoDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/Tornado"
- },
- {
- "type": "object",
- "properties": {
- "datasetId": {
- "type": "string"
- }
- }
- }
- ]
- },
- "TornadoModel": {
- "allOf": [
- {
- "$ref": "#/definitions/Tornado"
- },
- {
- "type": "object",
- "properties": {
- "tornadoModel": {
- "type": "string"
- },
- "tornadoParameters": {
- "$ref": "#/definitions/TornadoParameters"
- },
- "tornadoWidth": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "efBoxes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/EFBox"
- }
- },
- "datasetId": {
- "type": "string"
- }
- }
- }
- ]
- },
- "TornadoParameters": {
- "type": "object",
- "properties": {
- "efRating": {
- "type": "string"
- },
- "maxWindSpeed": {
- "type": "number",
- "format": "double"
- },
- "startLatitude": {
- "type": "number",
- "format": "double"
- },
- "startLongitude": {
- "type": "number",
- "format": "double"
- },
- "randomSeed": {
- "type": "integer",
- "format": "int32"
- },
- "windSpeedMethod": {
- "type": "integer",
- "format": "int32"
- },
- "numSimulations": {
- "type": "integer",
- "format": "int32"
- },
- "endLatitude": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- },
- "endLongitude": {
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- }
- }
- }
- },
- "WindHazardResult": {
- "type": "object",
- "properties": {
- "demand": {
- "type": "string"
- },
- "units": {
- "type": "string"
- },
- "hazardValue": {
- "type": "number",
- "format": "double"
- }
- }
- },
- "DeterministicTsunamiHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/TsunamiHazardDataset"
- },
- {
- "type": "object",
- "properties": {}
- }
- ]
- },
- "ProbabilisticTsunamiHazard": {
- "allOf": [
- {
- "$ref": "#/definitions/TsunamiHazardDataset"
- },
- {
- "type": "object",
- "properties": {
- "recurrenceInterval": {
- "type": "integer",
- "format": "int32"
- },
- "recurrenceUnit": {
- "type": "string"
- }
- }
- }
- ]
- },
- "Tsunami": {
- "type": "object",
- "discriminator": "tsunamiType",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "date": {
- "type": "string",
- "format": "date-time"
- },
- "creator": {
- "type": "string"
- },
- "spaces": {
- "type": "array",
- "readOnly": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "TsunamiDataset": {
- "allOf": [
- {
- "$ref": "#/definitions/Tsunami"
- },
- {
- "type": "object",
- "properties": {
- "hazardDatasets": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/TsunamiHazardDataset"
- }
- }
- }
- }
- ]
- },
- "TsunamiHazardDataset": {
- "type": "object",
- "discriminator": "hazardType",
- "properties": {
- "datasetId": {
- "type": "string"
- },
- "demandType": {
- "type": "string"
- },
- "demandUnits": {
- "type": "string"
- },
- "threshold": {
- "type": "number",
- "format": "double"
- }
- }
- }
- }
-}
diff --git a/restapi/index.html b/restapi/index.html
index d1ab0a92..8c4fdccb 100644
--- a/restapi/index.html
+++ b/restapi/index.html
@@ -6,26 +6,25 @@
IN-CORE RESTAPI Documentation - Data, Hazard & Fragility Services
-
+
-
-
+
+