1. API-IO
1.1. 概述
1.2. 文档说明
本文档为ODS系统接口说明文档
1.3. 适用对象
本文档的面向读者是ODS下的所有开发相关人员。
2. 接口列表
2.1. 诊断项目接口
2.1.1. 通过项目ID启动项目
2.1.1.1. 请求地址
属性 |
值 |
url |
/ods/project/start_project |
http方法 |
get |
2.1.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
project_id |
int |
|
项目id |
是 |
active |
int |
|
1为启动0为停止 |
是 |
2.1.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project start/stop success",
"msg": "项目启动/停止成功",
"result": ""
}
2.1.2. 通过项目ID停止项目
2.1.2.1. 请求地址
属性 |
值 |
url |
/ods/project/stop_project |
http方法 |
get |
2.1.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
project_id |
int |
|
项目id |
是 |
active |
int |
|
1为启动0为停止 |
是 |
2.1.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project start/stop success",
"msg": "项目启动/停止成功",
"result": ""
}
2.1.3. 添加诊断项目
2.1.3.1. 请求参数
属性 |
值 |
url |
/ods/project/insert_project |
http方法 |
post |
2.1.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
project_name |
string |
|
项目名称 |
是 |
description |
string |
|
描述 |
是 |
problem_id |
int |
|
问题id |
是 |
object_list |
string |
|
对象列表 |
是 |
object_type |
string |
|
对象类型 |
是 |
cycle |
float |
|
计算周期 |
是 |
template |
string |
|
模板 |
是 |
script |
string |
|
脚本 |
是 |
reference |
string |
|
参考号 |
是 |
object_name |
string |
|
对象名称 |
是 |
2.1.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project add success",
"msg": "项目添加成功",
"result": ""
}
2.1.4. 编辑诊断项目
2.1.4.1. 请求地址
属性 |
值 |
url |
/ods/project/update_project |
http方法 |
post |
2.1.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
project_id |
int |
|
项目id |
是 |
project_name |
string |
|
项目名称 |
是 |
description |
string |
|
描述 |
是 |
problem_id |
int |
|
问题id |
是 |
object_list |
string |
|
对象列表 |
是 |
object_type |
string |
|
对象类型 |
是 |
cycle |
float |
|
计算周期 |
是 |
template |
string |
|
模板 |
是 |
script |
string |
|
脚本 |
是 |
reference |
string |
|
参考号 |
是 |
object_name |
string |
|
对象名称 |
是 |
2.1.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project update success",
"msg": "项目更新成功",
"result": ""
}
2.1.5. 删除诊断项目
2.1.5.1. 请求地址
属性 |
值 |
url |
/ods/project/delete_project |
http方法 |
delete |
2.1.5.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
project_id |
int |
|
项目id |
是 |
2.1.5.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project delete success",
"msg": "项目删除成功",
"result": ""
}
2.1.6. 获取诊断项目详情
2.1.6.1. 请求地址
属性 |
值 |
url |
/ods/project/get_project_detail |
http方法 |
get |
2.1.6.2. 请求参数
token |
string |
长度/字节 |
用户身份令牌 |
是 |
project_id |
int |
|
项目id |
是 |
2.1.6.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project query success",
"msg": "项目查询成功",
"result": [
{
"active": 0,
"created": "2019-10-22 10:07:14",
"cycle": 70,
"description": "",
"is_available": 1,
"method_list": "1008",
"object_list": "1007",
"object_name": "test",
"object_type": "1003",
"problem_id": 1003,
"problem_name": "test",
"project_id": 1004,
"project_name": "aaa",
"reference": "",
"script": "{\"a\":1}",
"template": "{\"a\":1}"
}
]
}
2.1.7. 根据项目名称搜索诊断项目
2.1.7.1. 请求地址
属性 |
值 |
url |
/ods/project/search_projects |
http方法 |
get |
2.1.7.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页码 |
是 |
page_size |
int |
|
每页条数 |
是 |
project_name |
string |
|
项目名称 |
是 |
2.1.7.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project query success",
"msg": "项目查询成功",
"result": {
"all_count": 2,
"data": [
{
"active": 1,
"created": "2019-10-17 11:02:14",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_name": "test",
"problem_name": "test",
"object_type": "“测试”",
"problem_id": 1005,
"project_id": 1003,
"project_name": "testtesta",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
},
{
"active": 0,
"created": "2019-10-17 11:24:12",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"object_name": "test",
"problem_name": "test",
"problem_id": 1004,
"project_id": 1005,
"project_name": "testtestba",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
}
],
"page_index": 1,
"page_size": 10
}
}
2.1.8. 根据问题名称搜索诊断项目
2.1.8.1. 请求地址
属性 |
值 |
url |
/ods/project/search_projects |
http方法 |
get |
2.1.8.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页码 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.1.8.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project query success",
"msg": "项目查询成功",
"result": {
"all_count": 2,
"data": [
{
"active": 1,
"created": "2019-10-17 11:02:14",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"problem_id": 1005,
"object_name": "test",
"problem_name": "test",
"project_id": 1003,
"project_name": "testtesta",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
},
{
"active": 0,
"created": "2019-10-17 11:24:12",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"object_name": "test",
"problem_name": "test",
"problem_id": 1004,
"project_id": 1005,
"project_name": "testtestba",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
}
],
"page_index": 1,
"page_size": 10
}
}
2.1.9. 获取所有诊断项目
2.1.9.1. 请求地址
属性 |
值 |
url |
/ods/project/search_projects |
http方法 |
get |
2.1.9.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页码 |
是 |
page_size |
int |
|
每页条数 |
是 |
2.1.9.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "project query success",
"msg": "项目查询成功",
"result": {
"all_count": 3,
"data": [
{
"active": 1,
"created": "2019-10-17 11:02:14",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"object_name": "test",
"problem_name": "test",
"problem_id": 1005,
"project_id": 1003,
"project_name": "testtesta",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
},
{
"active": 0,
"created": "2019-10-17 11:24:12",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"object_name": "test",
"problem_name": "test",
"problem_id": 1004,
"project_id": 1005,
"project_name": "testtestba",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
},
{
"active": 1,
"created": "2019-10-17 11:24:40",
"cycle": 20,
"description": "",
"is_available": 1,
"method_list": "1001,1002",
"object_list": "1003,1004",
"object_type": "“测试”",
"object_name": "test",
"problem_name": "test",
"problem_id": 1004,
"project_id": 1006,
"project_name": "testtest",
"reference": "",
"script": "\"testtest\"",
"template": "\"testtest\""
}
],
"page_index": 1,
"page_size": 10
}
}
2.2. 诊断问题接口
2.2.1. 添加诊断问题
2.2.1.1. 请求地址
属性 |
值 |
url |
/ods/problem/insert_problem |
http方法 |
post |
2.2.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_name |
string |
|
问题名称 |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.2.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem add success",
"msg": "问题添加成功",
"result": ""
}
2.2.2. 编辑诊断问题
2.2.2.1. 请求地址
属性 |
值 |
url |
/ods/problem/update_problem |
http方法 |
post |
2.2.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_id |
int |
|
问题id |
是 |
problem_name |
string |
|
问题名称 |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.2.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem update success",
"msg": "问题更新成功",
"result": ""
}
2.2.3. 删除诊断问题
2.2.3.1. 请求地址
属性 |
值 |
url |
/ods/problem/delete_problem |
http方法 |
delete |
2.2.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_id |
int |
|
问题id |
是 |
2.2.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem delete success",
"msg": "问题删除成功",
"result": ""
}
2.2.4. 获取所有诊断问题不分页
2.2.4.1. 请求地址
属性 |
值 |
url |
/ods/problem/get_problems |
http方法 |
get |
2.2.4.2. 请求参数
无
2.2.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problems query success",
"msg": "问题查询成功",
"result": [
{
"created": "2019-10-18 10:22:37",
"description": "aaaa",
"is_available": 1,
"problem_id": 1004,
"problem_name": "testpblem3",
"reference": null
},
{
"created": "2019-10-18 14:42:16",
"description": "aaaa",
"is_available": 1,
"problem_id": 1006,
"problem_name": "\"tete\"",
"reference": ""
},
{
"created": "2019-10-22 11:38:22",
"description": "aaaa",
"is_available": 1,
"problem_id": 1011,
"problem_name": "aa",
"reference": ""
}
]
}
2.2.5. 获取所有诊断问题
2.2.5.1. 请求地址
属性 |
值 |
url |
/ods/problem/search_problems |
http方法 |
get |
2.2.5.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页码 |
是 |
page_size |
int |
|
每页条数 |
是 |
2.2.5.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem query success",
"msg": "问题查询成功",
"result": {
"all_count": 3,
"data": [
{
"created": "2019-10-18 10:22:37",
"description": "aaaa",
"is_available": 1,
"problem_id": 1004,
"problem_name": "testpblem3",
"reference": null
},
{
"created": "2019-10-22 11:36:22",
"description": "aaaa",
"is_available": 1,
"problem_id": 1010,
"problem_name": "\"te\"",
"reference": ""
},
{
"created": "2019-10-22 11:38:22",
"description": "aaaa",
"is_available": 1,
"problem_id": 1011,
"problem_name": "aa",
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.2.6. 根据问题名称搜索诊断问题
2.2.6.1. 请求地址
属性 |
值 |
url |
/ods/problem/search_problems |
http方法 |
get |
2.2.6.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页码 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.2.6.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem query success",
"msg": "问题查询成功",
"result": {
"all_count": 3,
"data": [
{
"created": "2019-10-18 10:22:37",
"description": "aaaa",
"is_available": 1,
"problem_id": 1004,
"problem_name": "testpblem3",
"reference": null
},
{
"created": "2019-10-22 11:36:22",
"description": "aaaa",
"is_available": 1,
"problem_id": 1010,
"problem_name": "\"te\"",
"reference": ""
},
{
"created": "2019-10-22 11:38:22",
"description": "aaaa",
"is_available": 1,
"problem_id": 1011,
"problem_name": "aa",
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.3. 诊断特征接口
2.3.1. 添加诊断特征
2.3.1.1. 请求地址
属性 |
值 |
url |
/ods/feature/insert_feature |
http方法 |
post |
2.3.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_name |
string |
|
特征名称 |
是 |
problem_id |
int |
|
问题id |
是 |
probability |
int |
|
概率 |
是 |
script |
string |
|
脚本 |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.3.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature add success",
"msg": "特征添加成功",
"result": ""
}
2.3.2. 编辑诊断特征
2.3.2.1. 请求地址
属性 |
值 |
url |
/ods/feature/update_feature |
http方法 |
post |
2.3.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_id |
int |
|
特征id |
是 |
feature_name |
string |
|
特征名称 |
是 |
problem_id |
int |
|
问题id |
是 |
probability |
int |
|
概率 |
是 |
script |
string |
|
脚本 |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.3.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature update success",
"msg": "特征更新成功",
"result": ""
}
2.3.3. 删除诊断特征
2.3.3.1. 请求地址
属性 |
值 |
url |
/ods/feature/delete_feature |
http方法 |
delete |
2.3.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_id |
int |
|
特征id |
是 |
2.3.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature delete success",
"msg": "特征删除成功",
"result": ""
}
2.3.4. 获取诊断特征详情
2.3.4.1. 请求地址
属性 |
值 |
url |
/ods/feature/get_feature_detail |
http方法 |
get |
2.3.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_id |
int |
|
特征id |
是 |
2.3.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature query success",
"msg": "特征查询成功",
"result": [
{
"created": "2019-10-18 17:14:27",
"description": "",
"feature_id": 1002,
"feature_name": "feateaa",
"is_available": 1,
"probability": 70,
"problem_id": 1004,
"problem_name": "test",
"reference": "",
"script": "aaaaaa"
}
]
}
2.3.5. 获取所有诊断特征不分页
2.3.5.1. 请求地址
属性 |
值 |
url |
/ods/feature/get_features |
http方法 |
get |
2.3.5.2. 请求参数
无
2.3.5.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "features query success",
"msg": "特征查询成功",
"result": [
{
"created": "2019-10-22 14:18:47",
"description": "",
"feature_id": 1001,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
},
{
"created": "2019-10-18 17:14:27",
"description": "",
"feature_id": 1002,
"feature_name": "feateaa",
"is_available": 1,
"probability": 70,
"problem_id": 1004,
"problem_name": "test",
"reference": "",
"script": "aaaaaa"
},
{
"created": "2019-10-22 10:11:21",
"description": "",
"feature_id": 1006,
"feature_name": "aaa",
"is_available": 1,
"probability": 1003,
"problem_id": 1008,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
},
{
"created": "2019-10-22 14:17:09",
"description": "",
"feature_id": 1008,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
}
]
}
2.3.6. 获取所有诊断特征
2.3.6.1. 请求地址
属性 |
值 |
url |
/ods/feature/search_features |
http方法 |
get |
2.3.6.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
2.3.6.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature query success",
"msg": "特征查询成功",
"result": {
"all_count": 3,
"data": [
{
"created": "2019-10-22 14:18:47",
"description": "",
"feature_id": 1001,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
},
{
"created": "2019-10-18 17:14:27",
"description": "",
"feature_id": 1002,
"feature_name": "feateaa",
"is_available": 1,
"probability": 70,
"problem_id": 1004,
"problem_name": "test",
"reference": "",
"script": "aaaaaa"
},
{
"created": "2019-10-22 14:17:09",
"description": "",
"feature_id": 1008,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
}
],
"page_index": 1,
"page_size": 10
}
}
2.3.7. 根据特征名称搜索诊断特征
2.3.7.1. 请求地址
属性 |
值 |
url |
/ods/feature/search_features |
http方法 |
get |
2.3.7.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
feature_name |
string |
|
特征名称 |
是 |
2.3.7.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature query success",
"msg": "特征查询成功",
"result": {
"all_count": 3,
"data": [
{
"created": "2019-10-22 14:18:47",
"description": "",
"feature_id": 1001,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
},
{
"created": "2019-10-18 17:14:27",
"description": "",
"feature_id": 1002,
"feature_name": "feateaa",
"is_available": 1,
"probability": 70,
"problem_id": 1004,
"problem_name": "test",
"reference": "",
"script": "aaaaaa"
},
{
"created": "2019-10-22 14:17:09",
"description": "",
"feature_id": 1008,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
}
],
"page_index": 1,
"page_size": 10
}
}
2.3.8. 根据问题名称搜索诊断特征
2.3.8.1. 请求地址
属性 |
值 |
url |
/ods/feature/search_features |
http方法 |
get |
2.3.8.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.3.8.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature query success",
"msg": "特征查询成功",
"result": {
"all_count": 3,
"data": [
{
"created": "2019-10-22 14:18:47",
"description": "",
"feature_id": 1001,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
},
{
"created": "2019-10-18 17:14:27",
"description": "",
"feature_id": 1002,
"feature_name": "feateaa",
"is_available": 1,
"probability": 70,
"problem_id": 1004,
"problem_name": "test",
"reference": "",
"script": "aaaaaa"
},
{
"created": "2019-10-22 14:17:09",
"description": "",
"feature_id": 1008,
"feature_name": "feahjvvvvtryk",
"is_available": 1,
"probability": 70,
"problem_id": 1005,
"problem_name": "test",
"reference": "",
"script": "{\"a\":1}"
}
],
"page_index": 1,
"page_size": 10
}
}
2.4. 诊断问题关系接口
2.4.1. 添加诊断问题关系
2.4.1.1. 请求地址
属性 |
值 |
url |
/ods/problem_relation/insert_problem_relation |
http方法 |
post |
2.4.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_A_id |
int |
|
问题A id |
是 |
problem_B_id |
int |
|
问题B id |
是 |
probability_AB |
int |
|
概率p(AB) |
是 |
probability_BA |
int |
|
概率p(BA) |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.4.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem relation add success",
"msg": "问题关系添加成功",
"result": ""
}
2.4.2. 编辑诊断问题关系
2.4.2.1. 请求地址
属性 |
值 |
url |
/ods/problem_relation/update_problem_relation |
http方法 |
post |
2.4.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_relation_id |
int |
|
问题关系id |
是 |
problem_A_id |
int |
|
问题A id |
是 |
problem_B_id |
int |
|
问题B id |
是 |
probability_AB |
int |
|
概率p(AB) |
是 |
probability_BA |
int |
|
概率p(BA) |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.4.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem relation update success",
"msg": "问题关系更新成功",
"result": ""
}
2.4.3. 删除诊断问题关系
2.4.3.1. 请求地址
属性 |
值 |
url |
/ods/problem_relation/delete_problem_relation |
http方法 |
delete |
2.4.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
problem_relation_id |
int |
|
问题关系id |
是 |
2.4.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem relation delete success",
"msg": "问题关系删除成功",
"result": ""
}
2.4.4. 根据问题名称搜索诊断问题关系
2.4.4.1. 请求地址
属性 |
值 |
url |
/ods/problem_relation/search_problem_relations |
http方法 |
get |
2.4.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.4.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem relation query success",
"msg": "问题关系查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-22 14:50:46",
"description": "",
"is_available": 1,
"probability_AB": 1,
"probability_BA": 1,
"problem_A_id": 1002,
"problem_B_id": 1003,
"problem_A_name": "te",
"problem_B_name": "st",
"problem_relation_id": 1001,
"reference": ""
},
{
"created": "2019-10-22 14:49:00",
"description": "",
"is_available": 1,
"probability_AB": 1,
"probability_BA": 1,
"problem_A_id": 1002,
"problem_B_id": 1001,
"problem_A_name": "te",
"problem_B_name": "st",
"problem_relation_id": 1007,
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.4.5. 获取所有诊断问题关系
2.4.5.1. 请求地址
属性 |
值 |
url |
/ods/problem_relation/search_problem_relations |
http方法 |
get |
2.4.5.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
2.4.5.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "problem relation query success",
"msg": "问题关系查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-22 14:50:46",
"description": "",
"is_available": 1,
"probability_AB": 1,
"probability_BA": 1,
"problem_A_id": 1002,
"problem_B_id": 1003,
"problem_A_name": "te",
"problem_B_name": "st",
"problem_relation_id": 1001,
"reference": ""
},
{
"created": "2019-10-22 14:49:00",
"description": "",
"is_available": 1,
"probability_AB": 1,
"probability_BA": 1,
"problem_A_id": 1002,
"problem_B_id": 1001,
"problem_A_name": "te",
"problem_B_name": "st",
"problem_relation_id": 1007,
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.5. 诊断特征关系接口
2.5.1. 添加诊断特征关系
2.5.1.1. 请求地址
属性 |
值 |
url |
/ods/feature_relation/insert_feature_relation |
http方法 |
post |
2.5.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_a_id |
int |
|
特征a id |
是 |
feature_b_id |
int |
|
特征b id |
是 |
probability_ab |
int |
|
概率p(ab) |
是 |
probability_ba |
int |
|
概率p(ba) |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.5.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature relation add success",
"msg": "特征关系添加成功",
"result": ""
}
2.5.2. 编辑诊断特征关系
2.5.2.1. 请求地址
属性 |
值 |
url |
/ods/feature_relation/update_feature_relation |
http方法 |
post |
2.5.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_relation_id |
int |
|
特征关系id |
是 |
feature_a_id |
int |
|
特征a id |
是 |
feature_b_id |
int |
|
特征b id |
是 |
probability_ab |
int |
|
概率p(ab) |
是 |
probability_ba |
int |
|
概率p(ba) |
是 |
description |
string |
|
描述 |
是 |
reference |
string |
|
参考号 |
是 |
2.5.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature relation update success",
"msg": "特征关系更新成功",
"result": ""
}
2.5.3. 删除诊断特征关系
2.5.3.1. 请求地址
属性 |
值 |
url |
/ods/feature_relation/delete_feature_relation |
http方法 |
delete |
2.5.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
feature_relation_id |
int |
|
特征关系id |
是 |
2.5.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature relation delete success",
"msg": "特征关系删除成功",
"result": ""
}
2.5.4. 根据特征名称搜索诊断特征关系
2.5.4.1. 请求地址
属性 |
值 |
url |
/ods/feature_relation/search_feature_relations |
http方法 |
get |
2.5.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
feature_name |
string |
|
特征名称 |
是 |
2.5.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature relation query success",
"msg": "特征关系查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 16:47:42",
"description": "",
"feature_a_id": 1001,
"feature_b_id": 1002,
"feature_a_name": "te",
"feature_b_name": "st",
"feature_relation_id": 1003,
"is_available": 1,
"probability_ab": 60,
"probability_ba": 90,
"reference": ""
},
{
"created": "2019-10-22 15:06:44",
"description": "",
"feature_a_id": 1002,
"feature_b_id": 1009,
"feature_a_name": "te",
"feature_b_name": "st",
"feature_relation_id": 1008,
"is_available": 1,
"probability_ab": 1,
"probability_ba": 1,
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.5.5. 获取所有诊断特征关系
2.5.5.1. 请求地址
属性 |
值 |
url |
/ods/feature_relation/search_feature_relations |
http方法 |
get |
2.5.5.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
2.5.5.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "feature relation query success",
"msg": "特征关系查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 16:47:42",
"description": "",
"feature_a_id": 1001,
"feature_b_id": 1002,
"feature_a_name": "te",
"feature_b_name": "st",
"feature_relation_id": 1003,
"is_available": 1,
"probability_ab": 60,
"probability_ba": 90,
"reference": ""
},
{
"created": "2019-10-22 15:06:44",
"description": "",
"feature_a_id": 1002,
"feature_b_id": 1009,
"feature_a_name": "te",
"feature_b_name": "st",
"feature_relation_id": 1008,
"is_available": 1,
"probability_ab": 1,
"probability_ba": 1,
"reference": ""
}
],
"page_index": 1,
"page_size": 10
}
}
2.6. 诊断结果接口
2.6.1. 获取诊断结果详情
2.6.1.1. 请求地址
属性 |
值 |
url |
/ods/result/get_result_details |
http方法 |
get |
2.6.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
project_id |
int |
|
项目id |
是 |
object_id |
int |
|
设备id |
是 |
2.6.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "result detail query success",
"msg": "结果详情查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 09:30:53",
"data": "3",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bb",
"problem_id": 1002,
"project_id": 1001,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"result_id": 1002,
"result_name": "re2"
},
{
"created": "2019-10-21 09:43:48",
"data": "btgr",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bth",
"problem_id": 1010,
"project_id": 1001,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"result_id": 1002,
"result_name": "re2"
}
],
"page_index": 1,
"page_size": 10
}
}
2.6.2. 根据项目名称获取诊断结果
2.6.2.1. 请求地址
属性 |
值 |
url |
/ods/result/search_results |
http方法 |
get |
2.6.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
project_name |
string |
|
项目名称 |
是 |
2.6.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "result query success",
"msg": "结果查询成功",
"result": {
"all_count": 1,
"data": [
{
"created": "2019-10-21 09:44:10",
"data": "vrt",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "vrt",
"problem_id": 1003,
"project_id": 1002,
"reference": null,
"result_id": 1011,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"result_name": "eee2"
}
],
"page_index": 1,
"page_size": 10
}
}
2.6.3. 根据问题名称获取诊断结果
2.6.3.1. 请求地址
属性 |
值 |
url |
/ods/result/search_results |
http方法 |
get |
2.6.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.6.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "result query success",
"msg": "结果查询成功",
"result": {
"all_count": 1,
"data": [
{
"created": "2019-10-21 09:44:10",
"data": "vrt",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "vrt",
"problem_id": 1003,
"project_id": 1002,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"result_id": 1011,
"result_name": "eee2"
}
],
"page_index": 1,
"page_size": 10
}
}
2.6.4. 根据对象名称获取诊断结果
2.6.4.1. 请求地址
属性 |
值 |
url |
/ods/result/search_results |
http方法 |
get |
2.6.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
object_name |
string |
|
对象名称 |
是 |
2.6.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "result query success",
"msg": "结果查询成功",
"result": {
"all_count": 1,
"data": [
{
"created": "2019-10-21 09:44:10",
"data": "vrt",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "vrt",
"problem_id": 1003,
"project_id": 1002,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"result_id": 1011,
"result_name": "eee2"
}
],
"page_index": 1,
"page_size": 10
}
}
2.7. 诊断报告接口
2.7.1. 获取诊断报告详情
2.7.1.1. 请求地址
属性 |
值 |
url |
/ods/report/get_report_details |
http方法 |
get |
2.7.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
project_id |
int |
|
项目id |
是 |
object_id |
int |
|
设备id |
是 |
2.7.1.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "report detail query success",
"msg": "报告详情查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 09:30:53",
"data": "3",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bb",
"problem_id": 1002,
"project_id": 1001,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"report_id": 1002,
"report_name": "re2"
},
{
"created": "2019-10-21 09:43:48",
"data": "btgr",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bth",
"problem_id": 1010,
"project_id": 1001,
"reference": null,
"report_id": 1010,
"report_name": "re3",
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2"
}
],
"page_index": 1,
"page_size": 10
}
}
2.7.2. 根据项目名称获取诊断报告
2.7.2.1. 请求地址
属性 |
值 |
url |
/ods/report/search_reports |
http方法 |
get |
2.7.2.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
project_name |
string |
|
项目名称 |
是 |
2.7.2.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "report detail query success",
"msg": "报告详情查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 09:30:53",
"data": "3",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bb",
"problem_id": 1002,
"project_id": 1001,
"reference": null,
"report_id": 1002,
"report_name": "re2",
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2"
},
{
"created": "2019-10-21 09:43:48",
"data": "btgr",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bth",
"problem_id": 1010,
"project_id": 1001,
"reference": null,
"report_id": 1010,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"report_name": "re3"
}
],
"page_index": 1,
"page_size": 10
}
}
2.7.3. 根据问题名称获取诊断报告
2.7.3.1. 请求地址
属性 |
值 |
url |
/ods/report/search_reports |
http方法 |
get |
2.7.3.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
problem_name |
string |
|
问题名称 |
是 |
2.7.3.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "report detail query success",
"msg": "报告详情查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 09:30:53",
"data": "3",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bb",
"problem_id": 1002,
"project_id": 1001,
"reference": null,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"report_id": 1002,
"report_name": "re2"
},
{
"created": "2019-10-21 09:43:48",
"data": "btgr",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bth",
"problem_id": 1010,
"project_id": 1001,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"reference": null,
"report_id": 1010,
"report_name": "re3"
}
],
"page_index": 1,
"page_size": 10
}
}
2.7.4. 根据对象名称获取诊断报告
2.7.4.1. 请求地址
属性 |
值 |
url |
/ods/report/search_reports |
http方法 |
get |
2.7.4.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
page_index |
int |
|
页数 |
是 |
page_size |
int |
|
每页条数 |
是 |
object_name |
string |
|
对象名称 |
是 |
2.7.4.3. 响应示例
{
"code": 200,
"mix_code": 163501,
"mix_ext": "",
"mix_msg": "report detail query success",
"msg": "报告详情查询成功",
"result": {
"all_count": 2,
"data": [
{
"created": "2019-10-21 09:30:53",
"data": "3",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bb",
"problem_id": 1002,
"project_id": 1001,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"reference": null,
"report_id": 1002,
"report_name": "re2"
},
{
"created": "2019-10-21 09:43:48",
"data": "btgr",
"description": null,
"is_available": 1,
"object_id": 1002,
"object_type": "bth",
"problem_id": 1010,
"project_name": "re2",
"problem_name": "re2",
"object_name": "re2",
"project_id": 1001,
"reference": null,
"report_id": 1010,
"report_name": "re3"
}
],
"page_index": 1,
"page_size": 10
}
}
2.8. 用户相关接口
2.8.1. 认证与授权
2.8.1.1. 请求地址
属性 |
值 |
url |
/ods/login/check_ticket |
http方法 |
get |
2.8.1.2. 请求参数
参数名称 |
数据类型 |
长度/字节 |
描述 |
是否必选 |
source |
string |
|
系统标识 |
是 |
ticket |
string |
|
票据 |
是 |
2.8.1.3. 响应示例
{
"code": 200,
"msg": "Ticket校验成功",
"mix_code": 130003,
"mix_msg": "",
"mix_ext": "",
"result": {
"user_id": 1000,
"username": "admin",
"realname": "",
"customer_id": null,
"is_super": 1,
"mobile": "13812312322",
"description": "超级管理员",
"sex": null,
"position": null,
"phone": null,
"extension": null,
"email": "admin@mixlinker.com",
"address": "深圳国家工程实验大楼-智物联网络有限公司",
"template": "",
"script": "",
"reference": "mixlinker.pro.admin",
"created": "2018-06-14 20:00:00",
"is_available": 1,
"boss_sync": 1,
"ticket": "ByllA44fSlKhaRfxtG7MQ3WX1yr0LCay",
"refresh_token": "LAi7CYiOSp2QWhJrzodPtjO5j1FzZDuR5qfVRsBsapQRLNebxK0cJMzhVxXriaeZ",
"keep_alive": "default",
"url": "http://211.154.155.24:9112"
}
}
2.8.2. 获取用户信息
2.8.2.1. 请求地址
属性 |
值 |
url |
/ods/login/get_user_info |
http方法 |
get |
2.8.2.2. 请求参数
无
2.8.2.3. 响应示例
{
"code": 200,
"mix_code": 163001,
"mix_ext": "",
"mix_msg": "",
"msg": "获取用户信息成功",
"result": {
"address": "深圳国家工程实验大楼-智物联网络有限公司",
"boss_sync": 0,
"created": "2018-06-14 20:00:00",
"customer_id": null,
"description": "超级管理员",
"email": "admin@mixlinker.com",
"extension": null,
"is_available": 1,
"is_super": 1,
"keep_alive": "default",
"mobile": "13812312302",
"phone": null,
"position": null,
"realname": "",
"reference": "mixlinker.pro.admin",
"refresh_token": "QsLIJV6VEipHvNIYaEBE58PdQgSIvqLT0LiinGN7IpAVkWNzgW28NSlsNaR9pHbC",
"script": "",
"sex": null,
"template": "",
"ticket": "AfrF7Ph2nocU3G7ErGPkeJ660odqv1X1",
"url": "http://192.168.1.181:9001/ods/login/check_ticket",
"user_id": 1000,
"username": "admin"
}
}
2.8.3. 获取版本信息
2.8.3.1. 请求地址
属性 |
值 |
url |
/ods/login/get_version |
http方法 |
get |
2.8.3.2. 请求参数
无
2.8.3.3. 响应示例
{
"code": 200,
"mix_code": "",
"mix_ext": "",
"mix_msg": "",
"msg": "获取版本信息成功",
"result": "V0.0.1"
}