diff --git a/apigw/br/swagger.json b/apigw/br/swagger.json new file mode 100644 index 0000000..c1c6335 --- /dev/null +++ b/apigw/br/swagger.json @@ -0,0 +1,1837 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-08-28T20:48:01Z", + "title": "cognicity" + }, + "host": "data.riskmap.us", + "schemes": [ + "https" + ], + "paths": { + "/": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.us", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "type": "http_proxy" + } + } + }, + "/cards": { + "post": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.us/cards", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "type": "http_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/cards/{cardId}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "cardId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "400": { + "description": "400 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "404": { + "description": "404 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "409": { + "description": "409 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "500": { + "description": "500 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "400": { + "statusCode": "400", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "404": { + "statusCode": "404", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "409": { + "statusCode": "409", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "500": { + "statusCode": "500", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.path.cardId": "method.request.path.cardId" + }, + "uri": "https://${stageVariables.env}.riskmap.us/cards/{cardId}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "type": "http" + } + } + }, + "/cards/{cardId}/images": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "content-type", + "in": "header", + "required": true, + "type": "string" + }, + { + "name": "cardId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.path.cardId": "method.request.path.cardId", + "integration.request.header.content-type": "method.request.header.content-type" + }, + "uri": "https://${stageVariables.env}.riskmap.us/cards/{cardId}/images", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "content-type", + "in": "header", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/cities": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.us/cities", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "h1la88", + "cacheKeyParameters": [ + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/feeds": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/feeds/qlue": { + "post": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "https://${stageVariables.env}.riskmap.us/feeds/qlue", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/floodgauges": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.us/floodgauges", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "so358j", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/floodgauges/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.us/floodgauges/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "p829iq", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/floods": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "minimum_state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Content-Type": "integration.response.header.Content-Type", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.format": "method.request.querystring.format", + "integration.request.querystring.minimum_state": "method.request.querystring.minimum_state" + }, + "uri": "https://${stageVariables.env}.riskmap.us/floods/", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "nvy9s5", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat", + "method.request.querystring.minimum_state" + ], + "type": "http" + } + }, + "head": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/floods/states": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "minimum_state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.format": "method.request.querystring.format", + "integration.request.querystring.minimum_state": "method.request.querystring.minimum_state" + }, + "uri": "https://${stageVariables.env}.riskmap.us/floods/states", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "cxp4qo", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.minimum_state" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/floods/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.us/floods/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "8q9uet", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/infrastructure": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/infrastructure/{type+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.type": "method.request.path.type" + }, + "uri": "https://${stageVariables.env}.riskmap.us/infrastructure/{type}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "qtdnlp", + "cacheKeyParameters": [ + "method.request.path.type", + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http_proxy" + } + } + }, + "/reports": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timeperiod", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.timeperiod": "method.request.querystring.timeperiod", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.us/reports", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "8vxlp8", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.geoformat", + "method.request.querystring.timeperiod", + "method.request.querystring.format" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/reports/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.us/reports/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "5tep32", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/stats": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/stats/floodedRWsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:917524458155:function:cognicity-statistics-${stageVariables.stage}-floodedRWsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/stats/floodedRegionsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:917524458155:function:cognicity-statistics-${stageVariables.stage}-floodedRegionsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/stats/reportsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:917524458155:function:cognicity-statistics-${stageVariables.stage}-reportsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + }, + "/twilio": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "text/xml" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + ".*": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + }, + "responseTemplates": { + "text/xml": "#set ($errorMessageObj = $util.parseJson($input.path('$.errorMessage')))\n$errorMessageObj.message\n" + } + } + }, + "requestTemplates": { + "application/x-www-form-urlencoded": "{\n \"reqbody\":\"$input.path('$')\"\n}" + }, + "uri": "arn:aws:apigateway:ap-southeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-1:917524458155:function:twilio/invocations", + "passthroughBehavior": "when_no_templates", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "passthroughBehavior": "when_no_match", + "type": "mock" + } + } + } + }, + "securityDefinitions": { + "api_key": { + "type": "apiKey", + "name": "x-api-key", + "in": "header" + } + }, + "definitions": { + "Empty": { + "type": "object", + "title": "Empty Schema" + } + }, + "x-amazon-apigateway-binary-media-types": [ + "application/gzip", + "application/x-gzip", + "application/x-compressed", + "image/png", + "image/jpeg", + "image/gif" + ] +} \ No newline at end of file diff --git a/swagger-api.json b/apigw/pb/swagger.json similarity index 98% rename from swagger-api.json rename to apigw/pb/swagger.json index 3bef6f4..1c16689 100644 --- a/swagger-api.json +++ b/apigw/pb/swagger.json @@ -1,10 +1,10 @@ { "swagger": "2.0", "info": { - "version": "2017-12-04T20:41:17Z", + "version": "2017-12-15T20:27:30Z", "title": "cognicity" }, - "host": "data-dev.petabencana.id", + "host": "data.petabencana.id", "schemes": [ "https" ], @@ -945,20 +945,28 @@ "description": "200 response", "schema": { "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } } } }, "x-amazon-apigateway-integration": { "responses": { "default": { - "statusCode": "200" + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } } }, "requestParameters": { "integration.request.querystring.start": "method.request.querystring.start", "integration.request.querystring.end": "method.request.querystring.end" }, - "uri": "https://${stageVariables.env}.petabencana.id/reports/archive", + "uri": "https://${stageVariables.env}.petabencana.id/floods/archive", "passthroughBehavior": "when_no_match", "httpMethod": "GET", "cacheNamespace": "bvx1ea", @@ -1131,20 +1139,28 @@ "description": "200 response", "schema": { "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } } } }, "x-amazon-apigateway-integration": { "responses": { "default": { - "statusCode": "200" + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } } }, "requestParameters": { "integration.request.querystring.start": "method.request.querystring.start", "integration.request.querystring.end": "method.request.querystring.end" }, - "uri": "https://${stageVariables.env}.petabencana.id/reports/timeseries", + "uri": "https://${stageVariables.env}.petabencana.id/floods/timeseries", "passthroughBehavior": "when_no_match", "httpMethod": "GET", "cacheNamespace": "5r93vu", @@ -1573,13 +1589,21 @@ "description": "200 response", "schema": { "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } } } }, "x-amazon-apigateway-integration": { "responses": { "default": { - "statusCode": "200" + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } } }, "requestParameters": { @@ -1673,7 +1697,10 @@ "x-amazon-apigateway-integration": { "responses": { "default": { - "statusCode": "200" + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } } }, "requestParameters": { diff --git a/apigw/rm/swagger.json b/apigw/rm/swagger.json new file mode 100644 index 0000000..78c1fbf --- /dev/null +++ b/apigw/rm/swagger.json @@ -0,0 +1,1829 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-05-11T05:43:00Z", + "title": "cognicity" + }, + "host": "data.riskmap.in", + "schemes": [ + "https" + ], + "paths": { + "/": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.in", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "type": "http_proxy" + } + } + }, + "/cards": { + "post": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.in/cards", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "type": "http_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/cards/{cardId}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "cardId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "400": { + "description": "400 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "404": { + "description": "404 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "409": { + "description": "409 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + }, + "500": { + "description": "500 response", + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "400": { + "statusCode": "400", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "404": { + "statusCode": "404", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "409": { + "statusCode": "409", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "500": { + "statusCode": "500", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + }, + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.path.cardId": "method.request.path.cardId" + }, + "uri": "https://${stageVariables.env}.riskmap.in/cards/{cardId}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "type": "http" + } + } + }, + "/cards/{cardId}/images": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "content-type", + "in": "header", + "required": false, + "type": "string" + }, + { + "name": "cardId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.path.cardId": "method.request.path.cardId", + "integration.request.header.content-type": "method.request.header.content-type" + }, + "uri": "https://${stageVariables.env}.riskmap.in/cards/{cardId}/images", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/cities": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "https://${stageVariables.env}.riskmap.in/cities", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "h1la88", + "cacheKeyParameters": [ + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/feeds": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/feeds/qlue": { + "post": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "https://${stageVariables.env}.riskmap.in/feeds/qlue", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/floodgauges": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.in/floodgauges", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "so358j", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/floodgauges/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.in/floodgauges/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "p829iq", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/floods": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "minimum_state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Content-Type": "integration.response.header.Content-Type", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.minimum_state": "method.request.querystring.minimum_state", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.in/floods/", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "nvy9s5", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat", + "method.request.querystring.minimum_state" + ], + "type": "http" + } + }, + "head": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/floods/states": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "minimum_state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.minimum_state": "method.request.querystring.minimum_state", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.in/floods/states", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "cxp4qo", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.minimum_state" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/floods/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.in/floods/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "8q9uet", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/infrastructure": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/infrastructure/{type+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "type", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.type": "method.request.path.type" + }, + "uri": "https://${stageVariables.env}.riskmap.in/infrastructure/{type}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "qtdnlp", + "cacheKeyParameters": [ + "method.request.path.type", + "method.request.querystring.city", + "method.request.querystring.format", + "method.request.querystring.geoformat" + ], + "type": "http_proxy" + } + } + }, + "/reports": { + "get": { + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "city", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "timeperiod", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "geoformat", + "in": "query", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "requestParameters": { + "integration.request.querystring.city": "method.request.querystring.city", + "integration.request.querystring.geoformat": "method.request.querystring.geoformat", + "integration.request.querystring.timeperiod": "method.request.querystring.timeperiod", + "integration.request.querystring.format": "method.request.querystring.format" + }, + "uri": "https://${stageVariables.env}.riskmap.in/reports", + "passthroughBehavior": "when_no_match", + "httpMethod": "GET", + "cacheNamespace": "8vxlp8", + "cacheKeyParameters": [ + "method.request.querystring.city", + "method.request.querystring.geoformat", + "method.request.querystring.timeperiod", + "method.request.querystring.format" + ], + "type": "http" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/reports/{id+}": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + }, + "x-amazon-apigateway-any-method": { + "parameters": [ + { + "name": "format", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": {}, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "requestParameters": { + "integration.request.path.id": "method.request.path.id" + }, + "uri": "https://${stageVariables.env}.riskmap.in/reports/{id}", + "passthroughBehavior": "when_no_match", + "httpMethod": "ANY", + "cacheNamespace": "5tep32", + "cacheKeyParameters": [ + "method.request.path.id", + "method.request.querystring.format" + ], + "type": "http_proxy" + } + } + }, + "/stats": { + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/stats/floodedRWsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:917524458155:function:cognicity-statistics-${stageVariables.stage}-floodedRWsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/stats/floodedRegionsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "uri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:917524458155:function:cognicity-statistics-${stageVariables.stage}-floodedRegionsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/stats/reportsSummary": { + "get": { + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200" + } + }, + "uri": "arn:aws:apigateway:ap-south-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-south-1:917524458155:function:cognicity-statistics-${stageVariables.stage}-reportsSummary/invocations", + "passthroughBehavior": "when_no_match", + "httpMethod": "POST", + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws_proxy" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + }, + "/twilio": { + "post": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "text/xml" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + ".*": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Origin": "'*'" + }, + "responseTemplates": { + "text/xml": "#set ($errorMessageObj = $util.parseJson($input.path('$.errorMessage')))\n$errorMessageObj.message\n" + } + } + }, + "uri": "arn:aws:apigateway:ap-southeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-1:917524458155:function:twilio/invocations", + "passthroughBehavior": "when_no_templates", + "httpMethod": "POST", + "requestTemplates": { + "application/x-www-form-urlencoded": "{\n \"reqbody\":\"$input.path('$')\"\n}" + }, + "contentHandling": "CONVERT_TO_TEXT", + "type": "aws" + } + }, + "options": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 response", + "schema": { + "$ref": "#/definitions/Empty" + }, + "headers": { + "Access-Control-Allow-Origin": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, + "Access-Control-Allow-Headers": { + "type": "string" + } + } + } + }, + "x-amazon-apigateway-integration": { + "responses": { + "default": { + "statusCode": "200", + "responseParameters": { + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin": "'*'" + } + } + }, + "passthroughBehavior": "when_no_match", + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, + "type": "mock" + } + } + } + }, + "securityDefinitions": { + "api_key": { + "type": "apiKey", + "name": "x-api-key", + "in": "header" + } + }, + "definitions": { + "Empty": { + "type": "object", + "title": "Empty Schema" + } + }, + "x-amazon-apigateway-binary-media-types": [ + "application/gzip", + "application/x-gzip", + "application/x-compressed", + "image/png", + "image/jpeg", + "image/gif" + ] +} \ No newline at end of file