You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

599 lines
15 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

basePath: /
definitions:
MySwagger.Auth:
properties:
auth_time:
example: 2020/01/02 03:04:05
type: string
system_id:
example: SYS-200201
type: string
system_token:
example: a6ce11eab94df48a6ce11eab94df48e38f73cf7e38f73cf7
type: string
type: object
MySwagger.Data:
properties:
data:
example: '{id:12300,name:zhangj,org_id:123001}'
type: string
data_id:
example: "202008080008"
type: string
del_flag:
example: 0
type: integer
org_id:
example: "200201"
type: string
type: object
MySwagger.DataCollect:
properties:
access_token:
example: system_01##20200102030405##a6ce11eab94df48a6ce11eab
type: string
data_source:
example: log_login
type: string
event_datas:
items:
$ref: '#/definitions/MySwagger.Event'
type: array
user_datas:
items:
$ref: '#/definitions/MySwagger.User'
type: array
type: object
MySwagger.DataGet:
properties:
auth_token:
example: DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7
type: string
data_id:
example: "202008080008"
type: string
data_source:
example: org_school
type: string
org_id:
example: "-1"
type: string
system_id:
example: SYS-200201
type: string
type: object
MySwagger.DataGetResult:
properties:
datas:
items:
$ref: '#/definitions/MySwagger.Data'
type: array
message:
example: 操作成功
type: string
success:
example: true
type: boolean
type: object
MySwagger.DataIn:
properties:
auth_token:
example: DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7
type: string
data_source:
example: ORG
type: string
datas:
items:
$ref: '#/definitions/MySwagger.Data'
type: array
system_id:
example: SYS-200201
type: string
type: object
MySwagger.DataInResult:
properties:
fail_results:
items:
$ref: '#/definitions/MySwagger.FailResult'
type: array
message:
example: 操作成功
type: string
success:
example: true
type: boolean
success_ids:
example:
- "202008080008"
- "202008080009"
- "202008080010"
items:
type: string
type: array
type: object
MySwagger.DataPage:
properties:
auth_token:
example: DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7
type: string
data_source:
example: org_school
type: string
org_id:
example: "-1"
type: string
query_page:
example: 0
type: integer
query_time:
example: 2020/01/01 02:03:04
type: string
system_id:
example: SYS-200201
type: string
type: object
MySwagger.DataQuery:
properties:
auth_token:
example: DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7
type: string
data_source:
example: org_school
type: string
org_id:
example: "-1"
type: string
query_conditions:
example:
- subject_code=22
items:
type: string
type: array
query_page:
example: 0
type: integer
system_id:
example: SYS-200201
type: string
type: object
MySwagger.DataResult:
properties:
message:
example: 查询成功
type: string
result:
example: 根据查询请求的format格式返回查询结果数据
type: string
success:
example: true
type: boolean
type: object
MySwagger.Event:
properties:
event_name:
example: 在线提交作业
type: string
event_seqno:
example: 事件顺序号1/2/3
type: string
event_time:
example: 2020/08/08 18:19:20
type: string
event_type:
example: "1001"
type: string
event_uri:
example: https://edusoa.com/cloud/study/do_homework
type: string
event_userid:
example: 用户ID
type: string
properties:
example: '{res_id:12300,res_name:初一语文一单元作业,teacher_id:123001,time_spend:100s}'
type: string
type: object
MySwagger.FailResult:
properties:
fail_id:
example: "202006060001"
type: string
fail_reason:
example: 数据ORG_ID访问权限验证失败无法修改数据
type: string
type: object
MySwagger.Join:
properties:
join_id:
example: org_area
type: string
join_param:
example:
- "220100"
items:
type: string
type: array
type: object
MySwagger.QueryJoin:
properties:
access_token:
example: system_01##20200102030405##a6ce11eab94df48a6ce11eab
type: string
query:
$ref: '#/definitions/MySwagger.Simple'
type: object
query_count:
example:
- total
- total2
items:
type: string
type: array
query_format:
example: table/json/echarts/antd
type: string
query_group:
example:
- area_code
- school_type
items:
type: string
type: array
query_join:
$ref: '#/definitions/MySwagger.Join'
type: object
type: object
MySwagger.QuerySimple:
properties:
access_token:
example: system_01##20200102030405##a6ce11eab94df48a6ce11eab
type: string
query:
$ref: '#/definitions/MySwagger.Simple'
type: object
query_count:
example:
- total
- total2
items:
type: string
type: array
query_format:
example: table/json/echarts/antd
type: string
query_group:
example:
- area_code
- school_type
items:
type: string
type: array
type: object
MySwagger.QueryUnion:
properties:
access_token:
example: system_01##20200102030405##a6ce11eab94df48a6ce11eab
type: string
join_list:
items:
$ref: '#/definitions/MySwagger.Join'
type: array
query_count:
example:
- total
- total2
items:
type: string
type: array
query_format:
example: table/json/echarts/antd
type: string
query_group:
example:
- area_code
- school_type
items:
type: string
type: array
query_list:
items:
$ref: '#/definitions/MySwagger.Simple'
type: array
type: object
MySwagger.Result:
properties:
message:
example: 接入系统票据验证失败
type: string
success:
example: false
type: boolean
type: object
MySwagger.Simple:
properties:
query_id:
example: org_school_aggs
type: string
query_param:
example:
- "100"
- test
- 2020/07/08
items:
type: string
type: array
type: object
MySwagger.User:
properties:
access_id:
example: 访客ID用户未登录
type: string
access_ip:
example: 10.10.8.88
type: string
access_way:
example: app/web/weixin/dingding
type: string
identity:
example: 用户身份1教师2学生3家长4管理员5访客
type: string
properties:
example: '{group_id:12300,group_name:课外学习一组,user_level:2,login_time:2020/08/08 12:13:14}'
type: string
user_id:
example: 用户ID
type: string
type: object
host: 127.0.0.1:9009
info:
contact:
email: 53766543@qq.com
name: API Support
url: http://www.swagger.io/support
description: DataEX Service using GO!!! create by zhangjun 2020-06-03
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: DataEX
version: "1.0"
paths:
/dataex/dataex/DataexCollect:
post:
consumes:
- application/json
description: 【数据交换平台】用户行为数据汇集服务接口支持用户事件批量入库一个批次少于100个事件数据。
parameters:
- description: 汇集数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.DataCollect'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.Result'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 汇集数据
tags:
- dataex
/dataex/dataex/DataexGet:
post:
consumes:
- application/json
description: 【数据交换平台】获取数据服务接口。
parameters:
- description: 获取数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.DataGet'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataGetResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 获取数据
tags:
- dataex
/dataex/dataex/DataexPage:
post:
consumes:
- application/json
description: 【数据交换平台】分页查询数据服务接口支持分页查询支持数据变更时间查询一个批次返回100条数据【query_page从0开始计数,query_time可以为空】。
parameters:
- description: 分页查询数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.DataPage'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataGetResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 分页查询数据
tags:
- dataex
/dataex/dataex/DataexQuery:
post:
consumes:
- application/json
description: 【数据交换平台】条件查询数据服务接口支持组合条件查询支持分页查询一个批次返回100条数据。
parameters:
- description: 条件查询数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.DataQuery'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataGetResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 条件查询数据
tags:
- dataex
/dataex/dataex/DataexSet:
post:
consumes:
- application/json
description: 【数据交换平台】修改数据服务接口支持批量修改一个批次少于100条数据。
parameters:
- description: 修改数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.DataIn'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataInResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 修改数据
tags:
- dataex
/dataex/dataex/SystemAuth:
post:
consumes:
- application/json
description: 【数据交换平台】接入系统鉴权服务接口使用数据交换平台提供的接入系统id和key验证成功返回系统票据。
parameters:
- description: 接入系统ID、系统生成验证Token和验证时间备注system_token = MD5.hash(MD5.hash(system_id+auth_time)+system_key)
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.Auth'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.Result'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.Result'
summary: 接入系统鉴权
tags:
- dataex
/dataex/report/QueryJoin:
post:
consumes:
- application/json
description: 【统计分析平台】ES-SQL数据关联查询接口使用接入系统自定义的查询与基础数据关联后【左关联】返回查询结果数据。
parameters:
- description: 关联查询数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.QueryJoin'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.DataResult'
summary: ES-SQL数据关联查询
tags:
- report
/dataex/report/QuerySimple:
post:
consumes:
- application/json
description: 【统计分析平台】ES-SQL数据简单查询接口使用接入系统自定义的查询返回查询结果数据。
parameters:
- description: 简单查询数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.QuerySimple'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.DataResult'
summary: ES-SQL数据查询
tags:
- report
/dataex/report/QueryUnion:
post:
consumes:
- application/json
description: 【统计分析平台】ES-SQL数据合并查询接口使用接入系统自定义的查询【支持多个查询】与基础数据关联后【支持多次左关联】返回查询结果数据。
parameters:
- description: 合并查询数据
in: body
name: input
required: true
schema:
$ref: '#/definitions/MySwagger.QueryUnion'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/MySwagger.DataResult'
"400":
description: Bad Request
schema:
$ref: '#/definitions/MySwagger.DataResult'
summary: ES-SQL数据合并查询
tags:
- report
securityDefinitions:
BasicAuth:
type: basic
swagger: "2.0"