{ "swagger": "2.0", "info": { "description": "DataEX Service using GO!!! create by zhangjun 2020-06-03", "title": "DataEX", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "53766543@qq.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "127.0.0.1:9009", "basePath": "/", "paths": { "/v1/report/QueryJoin": { "post": { "description": "【统计分析平台】ES-SQL数据关联查询接口,使用接入系统自定义的查询,与基础数据关联后【左关联】,返回查询结果数据。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "V1.0" ], "summary": "ES-SQL数据关联查询", "parameters": [ { "description": "关联查询数据", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/MySwagger.QueryJoin" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } } } } }, "/v1/report/QuerySimple": { "post": { "description": "【统计分析平台】ES-SQL数据简单查询接口,使用接入系统自定义的查询,返回查询结果数据。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "V1.0" ], "summary": "ES-SQL数据查询", "parameters": [ { "description": "简单查询数据", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/MySwagger.QuerySimple" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } } } } }, "/v1/report/QueryUnion": { "post": { "description": "【统计分析平台】ES-SQL数据合并查询接口,使用接入系统自定义的查询【支持多个查询】,与基础数据关联后【支持多次左关联】,返回查询结果数据。", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "V1.0" ], "summary": "ES-SQL数据合并查询", "parameters": [ { "description": "合并查询数据", "name": "input", "in": "body", "required": true, "schema": { "$ref": "#/definitions/MySwagger.QueryUnion" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/MySwagger.DataResult" } } } } } }, "definitions": { "MySwagger.DataResult": { "type": "object", "properties": { "message": { "type": "string", "example": "查询成功" }, "result": { "type": "string", "example": "根据查询请求的format格式,返回查询结果数据" }, "success": { "type": "boolean", "example": true } } }, "MySwagger.Join": { "type": "object", "properties": { "join_id": { "type": "string", "example": "org_area" }, "join_param": { "type": "array", "items": { "type": "string" }, "example": [ "220100" ] } } }, "MySwagger.QueryJoin": { "type": "object", "properties": { "access_token": { "type": "string", "example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab" }, "query": { "$ref": "#/definitions/MySwagger.Simple" }, "query_count": { "type": "array", "items": { "type": "string" }, "example": [ "total", "total2" ] }, "query_format": { "type": "string", "example": "table/json/echarts/antd" }, "query_group": { "type": "array", "items": { "type": "string" }, "example": [ "area_code", "school_type" ] }, "query_join": { "$ref": "#/definitions/MySwagger.Join" } } }, "MySwagger.QuerySimple": { "type": "object", "properties": { "access_token": { "type": "string", "example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab" }, "query": { "$ref": "#/definitions/MySwagger.Simple" }, "query_count": { "type": "array", "items": { "type": "string" }, "example": [ "total", "total2" ] }, "query_format": { "type": "string", "example": "table/json/echarts/antd" }, "query_group": { "type": "array", "items": { "type": "string" }, "example": [ "area_code", "school_type" ] } } }, "MySwagger.QueryUnion": { "type": "object", "properties": { "access_token": { "type": "string", "example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab" }, "join_list": { "type": "array", "items": { "$ref": "#/definitions/MySwagger.Join" } }, "query_count": { "type": "array", "items": { "type": "string" }, "example": [ "total", "total2" ] }, "query_format": { "type": "string", "example": "table/json/echarts/antd" }, "query_group": { "type": "array", "items": { "type": "string" }, "example": [ "area_code", "school_type" ] }, "query_list": { "type": "array", "items": { "$ref": "#/definitions/MySwagger.Simple" } } } }, "MySwagger.Simple": { "type": "object", "properties": { "query_id": { "type": "string", "example": "org_school_aggs" }, "query_param": { "type": "array", "items": { "type": "string" }, "example": [ "100", "test", "2020/07/08" ] } } } }, "securityDefinitions": { "BasicAuth": { "type": "basic" } } }