数据资源

获取目录列表

URL

POST https://dev.qualink.com/bas/dataresource/catalog

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

​ 无

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"获取成功",
    "data":{
        "catalog":[
            {
                "catalog_type":"0",
                "name":"资源总览",
                "pid":"0",
                "is_leaf":"0",
                "id":"20191018155930800030183583330154",
                "nocheck":true,
                "open":true
            },
            ......
        ]
    }
}

添加数据资源

URL

POST https://dev.qualink.com/bas/dataresource/add

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

名称 类型 必须 描述
resource_param JSON 资源信息
inf_param JSON 数据项信息
proxy_param JSON 服务接口信息
op_param JSON 运营方信息
dunit_param JSON 资源分组信息

示例:

{
    "resource_param":{
        "data_resource_name":"医护卫生",
        "data_catalog_id":"20191107094312190633406702002523",
        "data_catalog_name":"省立医院",
        "share_type":"0",
        "data_source_id":"20191108154240206564",
        "table_name":"yh_env",
        "is_op_right":"0",
        "op_id_item":"yh_ward",
        "group_id_item":"yh_rubbish",
        "is_privacy":"0",
        "unit_id_item":"yh_per",
        "data_id_item":"yh_patient"
    },
    "inf_param":[
        {
            "column_name":"ward",
            "column_description":"病室",
            "column_type":"varchar",
            "column_length":"33",
            "is_privacy":"1",
            "is_null":"0"
        }
    ],
    "proxy_param":[
        {
            "interface_name":"病室环境",
            "address":"https://www.yhww.cn/department_ganrnk",
            "create_time":"2019-11-08 15:59:04"
        }
    ],
    "op_param":[
        {
            "baas_user_id":"20190708140048411042",
            "op_id":"ceshi",
            "create_time":"2019-11-08 15:30:27",
            "op_desc":"ces"
        }
    ],
    "dunit_param":[
        {
            "unit_id":"test",
            "create_time":"2019-11-08 15:59:04",
            "unit_desc":"test"
        }
    ]
}

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"操作成功",
    "data":null
}

获取数据资源列表

URL

POST https://dev.qualink.com/bas/dataresource/list

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

名称 类型 必须 描述
data_resource_name String 数据源名称
data_resource_state String "0":未审核 "1": 审核 "2": 驳回
page Integer 页面编号
rows Integer 每页显示条例数

示例:

{
    "data_resource_name":"",
    "data_resource_state":"",
    "page":1,
    "rows":5
}

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"获取成功",
    "data":{
        "total":7,
        "pages":2,
        "page_num":1,
        "list":[
            {
                "catalog_name":"省立医院",
                "data_resource_name":"医护卫生",
                "data_catalog_id":"20191107094312190633406702002523",
                "table_name":"yh_env",
                "op_id_item":"yh_ward",
                "data_id_item":"yh_patient",
                "data_resource_id":"2019110815591318002896",
                "is_op_right":"0",
                "data_resource_state":"0",
                "share_type":"0",
                "unit_id_item":"yh_per",
                "data_source_name":"医护环境",
                "group_id_item":"yh_rubbish",
                "is_privacy":"0",
                "data_source_id":"20191108154240206564"
            },
            ......
        ],
        "page_size":5
    }
}

获取数据资源详情

URL

POST https://dev.qualink.com/bas/dataresource/getInf

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

名称 类型 必须 描述
data_resource_id String 数据资源ID

示例:

{
    "data_resource_id":"2019110815591318002896"
}

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success": true,
    "msg": "获取成功",
    "data": {
        "resource_map": {
            "catalog_name": "省立医院",
            "data_resource_name": "医护卫生",
            "data_catalog_id": "20191107094312190633406702002523",
            "table_name": "yh_env",
            "op_id_item": "yh_ward",
            "data_id_item": "yh_patient",
            "data_resource_id": "2019123014284868801450",
            "is_op_right": "0",
            "data_resource_state": "0",
            "share_type": "0",
            "unit_id_item": "yh_per",
            "data_source_name": "sdasda",
            "group_id_item": "yh_rubbish",
            "is_privacy": "0",
            "data_source_id": "20191202155650011955"
        },
        "op_list": [
            {
                "data_resource_id": "2019123014284868801450",
                "op_desc": "ces",
                "baas_user_id": "20190708140048411042",
                "create_time": "2019-11-08 15:30:27",
                "nick_name": "176****7887",
                "op_id": "ceshi"
            }
        ],
        "dunit_list": [
            {
                "data_resource_id": "2019123014284868801450",
                "create_time": "2019-11-08 15:59:04",
                "unit_id": "test",
                "unit_desc": "test"
            }
        ],
        "inf_list": [
            {
                "data_resource_id": "2019123014284868801450",
                "column_description": "病室",
                "is_null": false,
                "data_item_id": "201912301428486996137217",
                "column_name": "ward",
                "column_type": "varchar",
                "is_privacy": true,
                "column_length": "33"
            }
        ],
        "proxy_list": [
            {
                "data_resource_id": "2019123014284868801450",
                "interface_id": "2019123014284870568925",
                "address": "https://www.yhww.cn/department_ganrnk",
                "create_time": "2019-11-08 15:59:04",
                "interface_name": "病室环境"
            }
        ]
    }
}

维护数据资源

URL

POST https://dev.qualink.com/bas/dataresource/update

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

名称 类型 必须 描述
resource_param JSON 资源信息
inf_param JSON 数据项信息
proxy_param JSON 服务接口信息
op_param JSON 运营方信息
dunit_param JSON 数据分组信息
del_inf JSON 删除原有数据项
del_proxy JSON 删除原有服务接口
del_op JSON 删除原有的运营方信息
del_dunit JSON 删除原有的分组信息

示例:

{
    "resource_param":{
        "data_resource_id":"2019123014284868801450",
        "data_resource_name":"医护卫生",
        "data_catalog_id":"20191107094312190633406702002523",
        "data_catalog_name":"省立医院",
        "share_type":"0",
        "data_source_id":"20191202155650011955",
        "table_name":"yh_env",
        "is_op_right":"0",
        "op_id_item":"yh_ward",
        "group_id_item":"yh_rubbish",
        "is_privacy":"0",
        "unit_id_item":"yh_per",
        "data_id_item":"yh_patient",
        "data_resource_state":"0"
    },
    "inf_param":[
        {
            "data_item_id":"201912301428486996137217",
            "column_name":"ward",
            "column_description":"病室",
            "column_type":"varchar",
            "column_length":"33",
            "is_privacy":"1",
            "is_null":"0"
        }
    ],
    "proxy_param":[
        {
            "data_resource_id":"2019123014284868801450",
            "interface_id":"2019123014284870568925",
            "address":"https://www.yhww.cn/department_ganrnk",
            "create_time":"2019-11-08 15:59:04",
            "interface_name":"病室环境"
        }
    ],
     "op_param":[
        {
            "baas_user_id":"20190708140048411042",
            "op_id":"ceshi",
            "create_time":"2019-11-08 15:30:27",
            "op_desc":"ces1"
        }
    ],
    "dunit_param":[
        {
            "unit_id":"test",
            "create_time":"2019-11-08 15:59:04",
            "unit_desc":"test1"
        }
    ],
    "del_inf":[

    ],
    "del_proxy":[

    ],
    "del_op":[

    ],
    "del_dunit":[

    ]
}

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"更新成功",
    "data":null
}

数据资源审核

URL

POST https://dev.qualink.com/bas/dataresource/updateResourceState

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

名称 类型 必须 描述
data_resource_id String 数据源ID
data_resource_state String 资源状态

示例:


{
    "data_resource_state":"1",
    "data_resource_id":"2019110815591318002896"
}

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"状态更新成功",
    "data":null
}

数据资源浏览树形目录

URL

POST https://dev.qualink.com/bas/dataresource/resourceTree

请求头部

Content-type: application/json
Authorization: 平台用户身份令牌

请求参数

​ 无

返回数据

名称 类型 示例 描述
success Boolean true 是否成功
msg String 成功 请求结果信息
data JSON - 请求结果

示例:

{
    "success":true,
    "msg":"获取成功",
    "data":{
        "resource_tree":[
            {
                "catalog_type":"0",
                "name":"资源总览",
                "pid":"0",
                "is_leaf":"0",
                "id":"20191018155930800030183583330154"
            },
            {
                "catalog_type":"1",
                "name":"娱乐",
                "pid":"20191018155930800030183583330154",
                "is_leaf":"0",
                "id":"20191018160102015719756979177565"
            },
            {
                "catalog_type":"1",
                "name":"教育",
                "pid":"20191018155930800030183583330154",
                "is_leaf":"0",
                "id":"20191018160125389553577983948174"
            },
            {
                "catalog_type":"1",
                "name":"医疗健康",
                "pid":"20191018155930800030183583330154",
                "is_leaf":"0",
                "id":"20191018160157623578193977081448"
            },
            ......
        ]
    }
}