From 3ee4967d3e9d2d5bbf8daf29f7550261cf89f6d9 Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Wed, 9 Aug 2023 16:19:08 -0500 Subject: [PATCH] 253 upgrade swagger UI version to latest (#256) * upgrade swagger ui to be the latest 5.3.1 * use relative path and directly point swagger doc to autogenerated openapi definition * no need to copy json * changelog * add a message to remind user to login first * forget to return the text * interceptor doesn't work --- CHANGELOG.md | 3 + restapi/Dockerfile | 1 - restapi/data.json | 1157 ------------- restapi/dfr3.json | 1371 --------------- restapi/hazard.json | 3753 ---------------------------------------- restapi/index.html | 36 +- restapi/maestro.json | 264 --- restapi/semantics.json | 239 --- restapi/space.json | 600 ------- 9 files changed, 30 insertions(+), 7394 deletions(-) delete mode 100644 restapi/data.json delete mode 100644 restapi/dfr3.json delete mode 100644 restapi/hazard.json delete mode 100644 restapi/maestro.json delete mode 100644 restapi/semantics.json delete mode 100644 restapi/space.json diff --git a/CHANGELOG.md b/CHANGELOG.md index caa7ea0d..505523c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### 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/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 - +
- - + +