-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathswagger.json
1 lines (1 loc) · 3.16 KB
/
swagger.json
1
{"swagger": "2.0", "info": {"title": "deploy", "description": "API specification for the Azure Machine Learning service deploy", "version": "1.0"}, "schemes": ["https"], "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header", "description": "For example: Bearer abc123"}}, "paths": {"/": {"get": {"operationId": "ServiceHealthCheck", "description": "Simple health check endpoint to ensure the service is up at any given point.", "responses": {"200": {"description": "If service is up and running, this response will be returned with the content 'Healthy'", "schema": {"type": "string"}, "examples": {"application/json": "Healthy"}}, "default": {"description": "The service failed to execute due to an error.", "schema": {"$ref": "#/definitions/ErrorResponse"}}}}}, "/score": {"post": {"operationId": "RunMLService", "description": "Run web service's model and get the prediction output", "security": [{"Bearer": []}], "parameters": [{"name": "serviceInputPayload", "in": "body", "description": "The input payload for executing the real-time machine learning service.", "schema": {"$ref": "#/definitions/ServiceInput"}}], "responses": {"200": {"description": "The service processed the input correctly and provided a result prediction, if applicable.", "schema": {"$ref": "#/definitions/ServiceOutput"}}, "default": {"description": "The service failed to execute due to an error.", "schema": {"$ref": "#/definitions/ErrorResponse"}}}}}}, "definitions": {"ServiceInput": {"type": "object", "properties": {"data": {"type": "array", "items": {"type": "object", "properties": {"age": {"type": "integer", "format": "int64"}, "job": {"type": "string"}, "marital": {"type": "string"}, "education": {"type": "string"}, "default": {"type": "string"}, "housing": {"type": "string"}, "loan": {"type": "string"}, "contact": {"type": "string"}, "month": {"type": "string"}, "day_of_week": {"type": "string"}, "duration": {"type": "integer", "format": "int64"}, "campaign": {"type": "integer", "format": "int64"}, "pdays": {"type": "integer", "format": "int64"}, "previous": {"type": "integer", "format": "int64"}, "poutcome": {"type": "string"}, "emp.var.rate": {"type": "number", "format": "double"}, "cons.price.idx": {"type": "number", "format": "double"}, "cons.conf.idx": {"type": "number", "format": "double"}, "euribor3m": {"type": "number", "format": "double"}, "nr.employed": {"type": "number", "format": "double"}}}}}, "example": {"data": [{"age": 0, "job": "example_value", "marital": "example_value", "education": "example_value", "default": "example_value", "housing": "example_value", "loan": "example_value", "contact": "example_value", "month": "example_value", "day_of_week": "example_value", "duration": 0, "campaign": 0, "pdays": 0, "previous": 0, "poutcome": "example_value", "emp.var.rate": 0.0, "cons.price.idx": 0.0, "cons.conf.idx": 0.0, "euribor3m": 0.0, "nr.employed": 0.0}]}}, "ServiceOutput": {"type": "array", "items": {"type": "integer", "format": "int64"}, "example": [0]}, "ErrorResponse": {"type": "object", "properties": {"status_code": {"type": "integer", "format": "int32"}, "message": {"type": "string"}}}}}