{"swagger":"2.0","info":{"version":"1","title":"4d"},"host":"api.4dml.com","schemes":["https"],"paths":{"/alarms":{"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"}}},"/alarms/token":{"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"}}},"/alarms/token/{tokenid}":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tokenid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DProcessAlarmToken/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,AuthorizationToken,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"}}},"/alarms/token/{tokenid}/acknowledge":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tokenid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DProcessAlarmToken/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,AuthorizationToken,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"}}},"/alarms/token/{tokenid}/managesub":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tokenid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DManageSubscriptions/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/alarms/{alarmid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"alarmid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAlarmController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_alarm\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/alarms/{alarmid}/state":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"alarmid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostAlarmState/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,AuthorizationToken,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"}}},"/alerts":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"401 response","schema":{"$ref":"#/definitions/Error"},"headers":{"x-amzn-ErrorType":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAlerts/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","type":"aws"}},"post":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthExternalLog/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/alerts/actions":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetAlertActions/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/alerts/{alertid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"alertid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAlerts/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"alertid\" : $input.params(\"alertid\")\n}"},"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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/alerts/{alertid}/state":{"get":{"produces":["application/json"],"parameters":[{"name":"alertid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetAlertActions/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"alertid","in":"path","required":true,"type":"string"},{"in":"body","name":"SetAlertState","required":true,"schema":{"$ref":"#/definitions/SetAlertState"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthSetAlarmState/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"alertid\": \"$input.params(\"alertid\")\",\n  \"state\" : $inputRoot.state,\n  \"externalRef\" : \"$inputRoot.externalRef\",\n  \"notes\" : \"$inputRoot.notes\"\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/assets":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostAssets/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/assets/historic":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assets","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetAssetHistoric/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/assets/types":{"get":{"consumes":["application/json"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTypes/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"type\" : \"asset\"\n}"},"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":"'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"}}},"/assets/{assetid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params(\"assetid\")\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"delete":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'DELETE,GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/assets/{assetid}/shadow":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:AssetGetShadow/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"assetid\" : $input.params(\"assetid\")\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:AssetSetShadow/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n#set($allParams = $input.params())\n{\n  \"assetid\" : $input.params(\"assetid\"),\n  \"desired\" : $input.json('$')\n}\n\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/batch":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DBatchController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_all\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DBatchController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"post\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/batch/{batchid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DBatchController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_one\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"delete":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DBatchController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"delete\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'DELETE,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/businesshours":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetBusinesshours/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostBusinesshours/invocations","passthroughBehavior":"when_no_match","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/businesshours/{businesshoursid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"businesshoursid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetBusinesshours/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params(\"businesshoursid\")\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"businesshoursid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostBusinesshours/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params('businesshoursid')\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/dashboard":{"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"}}},"/device/{token}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"token","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DManageDevice/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"token","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DManageDevice/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/gateways":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"state","in":"query","required":false,"type":"string"},{"name":"type","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetGateways/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n}\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostGateways/invocations","passthroughBehavior":"when_no_match","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/discovered":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetGateways/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"dataset\" : \"discovered\"\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/timeline":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTimeline/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"admin\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/types":{"get":{"consumes":["application/json"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTypes/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"type\" : \"gateway\"\n}"},"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":"'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"}}},"/gateways/{gatewayid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetGateways/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : \"$input.params(\"gatewayid\")\"\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostGateways/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/alerts/{alertid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"alertid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAlerts/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\": \"$input.params(\"gatewayid\")\",\n  \"alertid\" : $input.params(\"alertid\")\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/assets":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\" : \"$input.params(\"gatewayid\")\"\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostAssets/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/assets/{assetid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\": \"$input.params(\"gatewayid\")\",\n  \"id\" : $input.params(\"assetid\")\n}"},"type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostAssets/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/assets/{assetid}/compare/image":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_compare_image\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/gateways/{gatewayid}/assets/{assetid}/setpoints":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetSetPoints/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/gateways/{gatewayid}/assets/{assetid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetAssetTelemetry/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\": \"$input.params(\"gatewayid\")\",\n  \"assetid\" : \"$input.params(\"assetid\")\"\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/cleanup":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCleanUp/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : \"$input.params(\"gatewayid\")\"\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCleanUp/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : \"$input.params(\"gatewayid\")\",\n  \"cleanup\" : $input.json('$')\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/gateways/{gatewayid}/commands/1wreset":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"ResetOneWireCommand","required":true,"schema":{"$ref":"#/definitions/ResetOneWireCommand"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-request-validator":"Validate body","x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"reason\" : \"$inputRoot.reason\",\n  \"action\" : \"1WRESET\",\n  \"id\" : \"$input.params('gatewayid')\"\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,Authorizationtoken,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"}}},"/gateways/{gatewayid}/commands/config":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"ConfigCommand","required":true,"schema":{"$ref":"#/definitions/ConfigCommand"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"payload\" : $inputRoot.config,\n  \"action\" : \"SET_CONFIG\",\n  \"id\" : \"$input.params(\"gatewayid\")\"\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,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/commands/deploy":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"DeployCommand","required":true,"schema":{"$ref":"#/definitions/DeployCommand"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"reason\" : \"$inputRoot.reason\",\n  \"action\" : \"DEPLOY\",\n  \"id\" : \"$input.params('gatewayid')\"\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,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/commands/polling":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"SetPollingCommand","required":true,"schema":{"$ref":"#/definitions/SetPollingCommand"}}],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"payload\" : $inputRoot.value,\n  \"action\" : \"SET_POLLING\",\n  \"id\" : \"$input.params('gatewayid')\"\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,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/commands/relay":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"SetRelayCommand","required":true,"schema":{"$ref":"#/definitions/SetRelayCommand"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\r\n{\r\n  \"payload\" : { \"channel\" : $inputRoot.channel, \"state\" :  $inputRoot.state },\r\n  \"action\" : \"RELAY\",\r\n  \"id\" : \"$input.params('gatewayid')\"\r\n}\r\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,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/commands/script":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetGatewayOutput/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\r\n{\r\n  \"gatewayid\" : \"$input.params('gatewayid')\"\r\n}\r\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCommand/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\r\n{\r\n  \"payload\" : { \"script\" :  \"$util.urlEncode($inputRoot.script)\"},\r\n  \"action\" : \"SCRIPT\",\r\n  \"id\" : \"$input.params('gatewayid')\"\r\n}\r\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/footfall":{"post":{"consumes":["application/x-www-form-urlencoded"],"produces":["text/html"],"parameters":[{"name":"Content-Type","in":"header","required":false,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","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":"'html/text'","method.response.header.Access-Control-Allow-Origin":"'*'"},"responseTemplates":{"text/html":"$input.path('$')"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DIncommingFootfall/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/x-www-form-urlencoded":"{\n \"data\" :  \"$input.path('$')\",\n \"gatewayid\": \"$input.params(\"gatewayid\")\",\n \"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n}\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,AuthorizationToken,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"}}},"/gateways/{gatewayid}/profiling":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetProfiling/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostProfiling/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/gateways/{gatewayid}/rules":{"get":{"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetRules/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"in":"body","name":"PostRule","required":true,"schema":{"$ref":"#/definitions/PostRule"}}],"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":"'*'","method.response.header.Access-Control-Allow-Headers":"'*'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:PostRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"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,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"}}},"/gateways/{gatewayid}/rules/{ruleid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"ruleid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params('ruleid')\n}"},"type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"ruleid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:PostRules/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/satellites":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetSatellites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"gatewayid\" : \"$input.params(\"gatewayid\")\",\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/gateways/{gatewayid}/shadow":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayGetShadow/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\" : \"$input.params(\"gatewayid\")\"\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GatewayCreateThing/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"gatewayid\" : \"$input.params(\"gatewayid\")\"\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/gateways/{gatewayid}/timeline":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"lastid","in":"query","required":false,"type":"string"},{"name":"telemetry","in":"query","required":false,"type":"string"},{"name":"connection","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"string"},{"name":"polling","in":"query","required":false,"type":"string"},{"name":"yesterday","in":"query","required":false,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"alert","in":"query","required":false,"type":"string"},{"name":"swVersion","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTimeline/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_gateway_timeline\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/inspect":{"post":{"consumes":["application/json","application/x-www-form-urlencoded","application/form-data"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:Inspect/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n","application/x-www-form-urlencoded":"{\r\n\"type\": \"application/form-data\",\r\n\"formparams\" : $input.json('$')\r\n}","application/form-data":"{\r\n\"type\": \"application/form-data\",\r\n\"formparams\" : $input.json('$')\r\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,AuthorizationToken,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"}}},"/inventory":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"dataset","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInventoryController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"list\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInventoryController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/inventory/collections":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInventoryController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_surveys\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/inventory/{inventoryid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"inventoryid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInventoryController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_one\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"inventoryid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInventoryController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"put\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/invite/{token}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"token","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInviteUser/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"check_token\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"token","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInviteUser/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,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"}}},"/invite/{token}/config":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"token","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"token_config\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,Authorizationtoken,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"}}},"/login":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"app","in":"header","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthLogin/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/login/forgot":{"post":{"consumes":["application/json"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthLostPassword/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,AuthorizationToken,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"}}},"/login/reset":{"post":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthResetPassword/invocations","passthroughBehavior":"when_no_match","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,AuthorizationToken,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"}}},"/orders":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"list\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\":\"post\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orders/saved":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_saved\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orders/{orderid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orderid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orderid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"put\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"delete":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orderid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'DELETE,GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orders/{orderid}/status/editing":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orderid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"editing\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orders/{orderid}/submit":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orderid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrderController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"submit\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}}},"/orgs":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"stats","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetOrgs/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostOrgs/invocations","passthroughBehavior":"when_no_match","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/orgs/{orgid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetOrgs/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n  \"id\" : $input.params('orgid'),\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostOrgs/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/orgs/{orgid}/alarms":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"state","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetAlarms/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/assets":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"inError","in":"query","required":false,"type":"string"},{"name":"sort","in":"query","required":false,"type":"string"},{"name":"assetType","in":"query","required":false,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"},{"name":"actions","in":"query","required":false,"type":"string"},{"name":"purposeId","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/assets/cameras":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_cameras\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/inerror":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/assets/setpoints":{"get":{"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetSetPoints/invocations","passthroughBehavior":"when_no_match","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":"'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"}}},"/orgs/{orgid}/assets/setpoints/range/{rangeid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rangeid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rangeid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/setpoints/range/{rangeid}/history":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rangeid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_setpoint_history_org\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/{assetid}":{"get":{"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_match","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":"'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"}}},"/orgs/{orgid}/assets/{assetid}/images":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DImageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"asset\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/{assetid}/setpoints/ranges/{rangeid}":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rangeid","in":"path","required":true,"type":"string"},{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/{assetid}/setpoints/ranges/{rangeid}/history":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rangeid","in":"path","required":true,"type":"string"},{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"days","in":"query","required":false,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAssetsController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_setpoint_history\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/assets/{assetid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"start","in":"query","required":false,"type":"string"},{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"},{"name":"end","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRealtime/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n#set($inputRoot = $input.path('$'))\n{\n  \"orgid\" : \"$input.params(\"orgid\")\",\n  \"assetid\" : \"$input.params(\"assetid\")\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/dashboards":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetDashboards/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/gateways":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":false,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetGateways/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($allParams = $input.params())\n#set($inputRoot = $input.path('$'))\n{\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    },\n    \"dataset\" : \"org\",\n    \"orgid\" : $input.params('orgid'),\n    \"params\" : {\n    #foreach($type in $allParams.keySet())\n        #set($params = $allParams.get($type))\n    \"$type\" : {\n        #foreach($paramName in $params.keySet())\n        \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n            #if($foreach.hasNext),#end\n        #end\n    }\n        #if($foreach.hasNext),#end\n    #end\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/gateways/timeline":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTimeline/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/gateways/{gatewayid}/assets/{assetid}/images":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DImageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"asset\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/gateways/{gatewayid}/assets/{assetid}/images/capture":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DImageCapture/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"capture\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/gateways/{gatewayid}/images":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DImageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"gateway\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/gateways/{gatewayid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetGatewayTelemetry/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/partners":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DOrgController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_partners\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/patch":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPatchObject/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,AuthorizationToken,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"}}},"/orgs/{orgid}/profiling":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DProfilingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"list\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/reports":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetReport/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/reports/{reportid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetReport/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/reports/{reportid}/blocks/{blockid}/data":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportid","in":"path","required":true,"type":"string"},{"name":"blockid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetReportBlock/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportid","in":"path","required":true,"type":"string"},{"name":"blockid","in":"path","required":true,"type":"string"},{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetReportBlock:${stageVariables.stage}/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/rulepackages":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRulePackage/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/rulepackages/copy":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DRulePackageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"copy\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,Authorizationtoken,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"}}},"/orgs/{orgid}/rulepackages/dataset/alarms-conditions":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRulePackage/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/rules":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/orgs/{orgid}/sites":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetSites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"orgid\" : $input.params('orgid'),\n  \"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/orgs/{orgid}/sites/submit":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSitesController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,Authorizationtoken,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"}}},"/orgs/{orgid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetOrgTelemetry/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/users":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInviteUser/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/users/activity":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetOrgs/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_activity\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/orgs/{orgid}/users/invite":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInviteUser/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DInviteUser/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"re-send\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/profile":{"put":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DProfileUpdate/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/profile/password":{"put":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthChangePassword/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":"'OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/profiling/{profilingid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"profilingid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DProfilingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/public/assets/{assetid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"asset\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/public/assets/{assetid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"telemetry\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/public/gateways/{gatewayid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetGatewayDataAtInstallation/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostGateways/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"gateway\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,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"}}},"/public/gateways/{gatewayid}/assets":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"assets\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/public/gateways/{gatewayid}/image":{"post":{"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}}},"/public/gateways/{gatewayid}/search":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSearch/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/public/gateways/{gatewayid}/upload":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"upload\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/public/gateways/{gatewayid}/workflow/{workflowid}":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","in":"path","required":true,"type":"string"},{"name":"workflowid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DWorkflow/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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"}}},"/public/login":{"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAuthentication/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"login\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}}},"/public/orgs/{orgid}/assets":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"assets\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/public/orgs/{orgid}/assets/{assetid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"asset\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/public/orgs/{orgid}/assets/{assetid}/telemetry":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"assetid","in":"path","required":true,"type":"string"},{"name":"orgid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPublicProxy/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"telemetry\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/rulegroups":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRuleGroups/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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/rulegroups/{rulegroupid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulegroupid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRuleGroups/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"rulegroupid\" : $input.params('rulegroupid')\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulegroupid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:PostRuleGroups/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"rulegroupid\" : $input.params('rulegroupid'),\n  \"title\" : \"$inputRoot.title\",\n  \"cognito-identity\" : \"$context.identity.cognitoIdentityId\"\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/rulepackage":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRulePackage/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/rulepackage/{rulepackageid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRulePackage/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"delete":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DRulePackageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'DELETE,GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/rulepackage/{rulepackageid}/alarms":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DAlarmController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\":\"list_for_rulepackage\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/rulepackage/{rulepackageid}/disable":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DRulePackageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\":\"alarm_disable\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/rulepackage/{rulepackageid}/enable":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"rulepackageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DRulePackageController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\":\"alarm_enable\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/rulepackages":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRulePackage/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : { \"path\": {}},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/rules":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetRules/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($allParams = $input.params())\n{\n\"body\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/rules/{ruleid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ruleid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetRules/invocations","passthroughBehavior":"never","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params('ruleid')\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ruleid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostRules/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n#set($allParams = $input.params())\n{\n  \"id\" : $input.params('ruleid'),\n  \"title\" : \"$inputRoot.title\",\n  \"severity_id\" : $inputRoot.severity_id,\n  \"instructions\" : \"$util.escapeJavaScript($inputRoot.instructions)\",\n  \"matchOperator\" : \"$inputRoot.matchOperator\",\n  \"matchAsset\" : $inputRoot.matchAsset,\n  \"matchValue\" : \"$inputRoot.matchValue\",\n  \"triggerOperator\" : \"$inputRoot.triggerOperator\",\n  \"triggerValue\" : \"$inputRoot.triggerValue\",\n  \"identity\" : \"$context.identity\",\n  \"body-json\" : $input.json('$'),\n   \"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/ruletemplates":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRuleTemplates/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:PostRuleTemplates/invocations","passthroughBehavior":"when_no_match","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/ruletemplates/{ruletemplateid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ruletemplateid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRuleTemplates/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"ruletemplateid\" : $input.params('ruletemplateid')\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ruletemplateid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:PostRuleTemplates/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"ruletemplateid\" : $input.params('ruletemplateid'),\n  \"title\" : \"$inputRoot.title\",\n  \"severity\" : \"$inputRoot.severity\",\n  \"instructions\" : \"$util.escapeJavaScript($inputRoot.instructions)\",\n  \"matchOperator\" : \"$inputRoot.matchOperator\",\n  \"ruleGroup_id\" : $inputRoot.ruleGroup_id,\n  \"assetCategory\" : \"$inputRoot.assetCategory\",\n  \"matchValue\" : \"$inputRoot.matchValue\",\n  \"triggerOperator\" : \"$inputRoot.triggerOperator\",\n  \"triggerValue\" : \"$inputRoot.triggerValue\",\n  \"triggerIf\" : \"$inputRoot.triggerIf\"\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/satellites":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetSatellites/invocations","passthroughBehavior":"when_no_match","httpMethod":"POST","contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostSatellites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($allParams = $input.params())\n{\n\"body\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/satellites/{satelliteid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"satelliteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetSatellites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"satelliteid\" : $input.params('satelliteid')\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"satelliteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DPostSatellites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body\" : $input.json('$'),\n  \"satelliteid\" : $input.params(\"satelliteid\"),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/satellites/{satelliteid}/assets":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"satelliteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetAssets/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"satelliteid\" : $input.params('satelliteid'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,AuthorizationToken,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"}}},"/search":{"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"}}},"/search/{table}/{column}/{value}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"column","in":"path","required":true,"type":"string"},{"name":"table","in":"path","required":true,"type":"string"},{"name":"value","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSearchDB/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/sites":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetSites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostSites/invocations","passthroughBehavior":"when_no_match","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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/sites/{siteid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetSites/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"id\" : $input.params('siteid')\n}"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"produces":["application/json"],"parameters":[{"name":"siteid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthPostSites/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/sites/{siteid}/gateways":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetGateways/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"dataset\" : \"site\",\n  \"siteid\" : $input.params('siteid')\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/sites/{siteid}/subscriptions":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSiteSubscriptionController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"orgs\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSiteSubscriptionController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\":\"org\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/sites/{siteid}/svg":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DSitesController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"svg\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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/{action}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"action","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetRedisStats/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/status":{"get":{"responses":{"200":{"description":"200 response","headers":{"Access-Control-Allow-Origin":{"type":"string"},"Content-Type":{"type":"string"}}}},"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DHealthCheck:${stageVariables.stage}/invocations","passthroughBehavior":"when_no_match","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":"'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"}}},"/status/projector":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DStatusController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/streams":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetStream/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/streams/{gatewayid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayid","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":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetStream/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/telemetry":{"post":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:IncomingSensorData/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,Authorizationtoken,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"}}},"/telemetry/recent":{"get":{"consumes":["application/json"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetRealtime/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/timelapse":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTimelapseController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"list\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/timelapse/{timelapseid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"timelapseid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200"}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTimelapseController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'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"}}},"/training":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTrainingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_all\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/training/{packageid}/modules":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"packageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTrainingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_all\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/training/{packageid}/modules/{moduleid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"moduleid","in":"path","required":true,"type":"string"},{"name":"packageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTrainingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_one\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/training/{packageid}/modules/{moduleid}/progress":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"moduleid","in":"path","required":true,"type":"string"},{"name":"packageid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DTrainingController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"module_progress\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'PUT,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/types":{"get":{"consumes":["application/json"],"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:GetTypes/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"#set($inputRoot = $input.path('$'))\n{\n  \"type\" : \"all\"\n}"},"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":"'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"}}},"/users":{"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:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:LambdAuthGetUser/invocations","passthroughBehavior":"when_no_match","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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token, authorizationToken'","method.response.header.Access-Control-Allow-Origin":"'*'"}}},"passthroughBehavior":"when_no_match","requestTemplates":{"application/json":"{\"statusCode\": 200}"},"type":"mock"}}},"/users/list":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"org","in":"query","required":false,"type":"string"},{"name":"columns","in":"query","required":false,"type":"string"},{"name":"sort","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/users/{userid}":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"get_one\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"delete":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'DELETE,GET,OPTIONS,PUT'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/users/{userid}/config":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"config\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,Authorizationtoken,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"}}},"/users/{userid}/notifications":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_notifications\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/users/{userid}/tickets":{"get":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\" : \"get_tickets\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\n"},"contentHandling":"CONVERT_TO_TEXT","type":"aws"}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DUsersController/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"action\": \"post_ticket\",\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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,GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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"}}},"/weather":{"get":{"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}}},"security":[{"AdminAuthoriser":[]}],"x-amazon-apigateway-integration":{"responses":{"default":{"statusCode":"200","responseParameters":{"method.response.header.Access-Control-Allow-Origin":"'*'"}}},"uri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:4DGetWeather/invocations","passthroughBehavior":"when_no_templates","httpMethod":"POST","requestTemplates":{"application/json":"##  See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n##  This template will pass through all parameters including path, querystring, header, stage variables, and context through to the integration endpoint via the body/payload\n#set($allParams = $input.params())\n{\n\"body-json\" : $input.json('$'),\n\"params\" : {\n#foreach($type in $allParams.keySet())\n    #set($params = $allParams.get($type))\n\"$type\" : {\n    #foreach($paramName in $params.keySet())\n    \"$paramName\" : \"$util.escapeJavaScript($params.get($paramName))\"\n        #if($foreach.hasNext),#end\n    #end\n}\n    #if($foreach.hasNext),#end\n#end\n},\n\"stage-variables\" : {\n#foreach($key in $stageVariables.keySet())\n\"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\"\n    #if($foreach.hasNext),#end\n#end\n},\n\"context\" : {\n    \"account-id\" : \"$context.identity.accountId\",\n    \"api-id\" : \"$context.apiId\",\n    \"api-key\" : \"$context.identity.apiKey\",\n    \"authorizer-principal-id\" : \"$context.authorizer.principalId\",\n    \"caller\" : \"$context.identity.caller\",\n    \"cognito-authentication-provider\" : \"$context.identity.cognitoAuthenticationProvider\",\n    \"cognito-authentication-type\" : \"$context.identity.cognitoAuthenticationType\",\n    \"cognito-identity-id\" : \"$context.identity.cognitoIdentityId\",\n    \"cognito-identity-pool-id\" : \"$context.identity.cognitoIdentityPoolId\",\n    \"http-method\" : \"$context.httpMethod\",\n    \"stage\" : \"$context.stage\",\n    \"source-ip\" : \"$context.identity.sourceIp\",\n    \"user\" : \"$context.identity.user\",\n    \"user-agent\" : \"$context.identity.userAgent\",\n    \"user-arn\" : \"$context.identity.userArn\",\n    \"request-id\" : \"$context.requestId\",\n    \"resource-id\" : \"$context.resourceId\",\n    \"resource-path\" : \"$context.resourcePath\"\n    }\n}\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":"'GET,OPTIONS'","method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorizationtoken,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":{"AdminAuthoriser":{"type":"apiKey","name":"authorizationToken","in":"header","x-amazon-apigateway-authtype":"custom","x-amazon-apigateway-authorizer":{"authorizerUri":"arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:575234670331:function:Authoriser/invocations","authorizerResultTtlInSeconds":3000,"type":"token"}}},"definitions":{"DeployCommand":{"type":"object","properties":{"reason":{"type":"string"}},"title":"Deploy command"},"Empty":{"type":"object","title":"Empty Schema"},"PostRule":{"type":"object","required":["matchAsset","matchOperator","matchValue","title"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"severity_id":{"type":"integer"},"instructions":{"type":"string"},"matchOperator":{"type":"string"},"matchAsset":{"type":"string"},"matchValue":{"type":"string"},"triggerOperator":{"type":"string"},"triggerValue":{"type":"string"}},"title":"Post a rule","description":"Post a rule against a gateway"},"SetRelayCommand":{"type":"object","required":["channel","state"],"properties":{"channel":{"type":"integer","description":"Relay channel","minimum":5.0},"state":{"type":"boolean","description":"Relay channel"}},"title":"Gateway Command - setRelay"},"Error":{"type":"object","properties":{"message":{"type":"string"}},"title":"Error Schema"},"SetAlertState":{"type":"object","required":["state"],"properties":{"state":{"type":"integer","description":"Set the alert state (1=new, 2=acknowleged, 3=paused, 9=resolved)","minimum":1.0},"externalRef":{"type":"string","description":"External reference"},"notes":{"type":"string","description":"Notes"}},"title":"Set alert state"},"ConfigCommand":{"type":"object","required":["config"],"properties":{"config":{"type":"object","description":"The config to deploy to the gateway","properties":{}}},"title":"Config Command","description":"Config Command"},"ResetOneWireCommand":{"type":"object","properties":{"reason":{"type":"string"}},"title":"1W reset command"},"SetPollingCommand":{"type":"object","required":["value"],"properties":{"value":{"type":"integer","description":"Polling frequency in seconds","minimum":5.0}},"title":"Gateway Command - setPolling"}},"x-amazon-apigateway-request-validators":{"Validate body":{"validateRequestParameters":false,"validateRequestBody":true}}}