接口文档

增加项目

请求参数

参数名称 是否必选 数据类型 字段描述
action String create_project创建项目
actionid String 指令编号
uid String 项目唯一编号
block_id String AI
option Array 脚本
option.cal_cycle Number 计算周期
option.data_cycle Number 数据周期
option.fv_list Array FV参数列表
option.object_list Array 对象列表
option.data_len Number 数据长度
option.resample_type String 降采样类型
option.resample_time String 降采样时间
option.url String 文件地址

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"create_project","block_id":"AI","actionid":"","option":{"cal_cycle":30,"data_cycle":30,"fv_list":["SS01", "SS02","SS03","SS04", "SS05"],"object_list":["OBJ4144694800048","OBJ4100697100046"],"data_len":"10","resample_type":null,"resample_time":1,"url":"file/2024/02/18/202402211649458735.h5"},"uid":"AI021802"}' http://127.0.0.1:8006/api

返回结果

{"code":200,"info":"","msg":"success","result":{"uid":"AI021802"}}    

修改项目

请求参数

参数名称 是否必选 数据类型 字段描述
action String update_project创建项目
actionid String 指令编号
uid String 项目唯一编号
block_id String AI
option Array 脚本
option.cal_cycle Number 计算周期
option.data_cycle Number 数据周期
option.fv_list Array FV参数列表
option.object_list Array 对象列表
option.data_len Number 数据长度
option.resample_type String 降采样类型
option.resample_time String 降采样时间

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"update_project","block_id":"AI","actionid":"","option":{"cal_cycle":30,"data_cycle":30,"fv_list":["SS01", "SS02","SS03","SS04", "SS05"],"object_list":["OBJ4144694800048","OBJ4100697100046"],"data_len":"10","resample_type":null,"resample_time":1},"uid":"AI021802"}'  http://127.0.0.1:8006/api

返回结果

{"code":200,"info":"","msg":"success","result":{"uid":"AI021802"}}     

删除项目

请求参数

参数名称 是否必选 数据类型 字段描述
action String delete_project删除项目
actionid String 指令编号
uid String 项目唯一编号
block_id String AI

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"delete_project","actionid":"","block_id":"AI","uid":"AI021901"}'  http://127.0.0.1:8006/api

返回结果

{"code":200,"info":"","msg":"success","result":{"uid":"AI021901"}}    

开启项目

请求参数

参数名称 是否必选 数据类型 字段描述
action String start_project开启项目
actionid String 指令编号
uid String 项目唯一编号
block_id String AI

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"start_project","block_id":"AI","actionid":"","uid":"AI020501"}' http://127.0.0.1:8006/api

返回结果

{"code":200,"info":"","msg":"success","result":{"uid":"AI020501"}}    

关闭项目

请求参数

参数名称 是否必选 数据类型 字段描述
action String stop_project关闭项目
actionid String 指令编号
uid String 项目唯一编号
block_id String AI

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"stop_project","block_id":"AI","actionid":"","uid":"AI020501"}' http://127.0.0.1:8006/api

返回结果

{"code":200,"info":"","msg":"success","result":{"uid":"AI020501"}}    

查询项目列表

请求参数

参数名称 是否必选 数据类型 字段描述
action String get_project_list查询项目列表
actionid String 指令编号
block_id String AI

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"get_project_list","block_id":"AI","actionid":""}' http://127.0.0.1:8006/api   

返回结果

{
    "code": 200,
    "info": "",
    "msg": "success",
    "result": {
        "data": [{
            "block_id": "AI",
            "created": "2024-02-1916:00:35",
            "created_by": null,
            "description": null,
            "id": 3,
            "is_active": 0,
            "is_available": 1,
            "last_modified": "2024-02-1916:00:35",
            "name": "",
            "option": {
                "cal_cycle": 30,
                "data_cycle": 30,
                "data_len": "10",
                "fv_list": ["SS01", "SS02","SS03","SS04", "SS05"],
                "object_list": ["OBJ4144694800048", "OBJ4100697100046"],
                "resample_time": 1,
                "resample_type": null
            },
            "organization_id": null,
            "reference": null,
            "script": [],
            "uid": "AI021902"
        }, {
            "block_id": "AI",
            "created": "2024-02-1915:51:39",
            "created_by": null,
            "description": null,
            "id": 2,
            "is_active": 0,
            "is_available": 1,
            "last_modified": "2024-02-1915:51:39",
            "last_modified_by": null,
            "name": "",
            "option": {
                "cal_cycle": 30,
                "data_cycle": 30,
                "data_len": "10",
                "fv_list": ["SS01", "SS02","SS03","SS04", "SS05"],
                "object_list": ["OBJ4144694800048", "OBJ4100697100046"],
                "resample_time": 1,
                "resample_type": null
            },
            "organization_id": null,
            "reference": null,
            "script": [],
            "uid": "AI021802"
        }, {
            "block_id": "AI",
            "created": "2024-02-1915:49:31",
            "created_by": null,
            "description": null,
            "id": 1,
            "is_active": 0,
            "is_available": 1,
            "last_modified": "2024-02-1915:49:31",
            "last_modified_by": null,
            "name": "",
            "option": {
                "cal_cycle": 30,
                "data_cycle": 30,
                "data_len": "10",
                "fv_list": ["SS01", "SS02","SS03","SS04", "SS05"],
                "object_list": ["OBJ4144694800048", "OBJ4100697100046"],
                "resample_time": 1,
                "resample_type": null
            },
            "organization_id": null,
            "reference": null,
            "script": [],
            "uid": "AI010801"
        }],
        "page_index": 1,
        "page_size": 20,
        "total_pages": 1,
        "total_records": 3
    }
}  

查询项目详情

请求参数

参数名称 是否必选 数据类型 字段描述
action String get_project_item查询项目详情
actionid String 指令编号
block_id String AI

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"get_project_item","uid": "AI021802","block_id":"AI","actionid":""}' http://127.0.0.1:8006/api   

返回结果

{
    "code": 200,
    "info": "",
    "msg": "success",
    "result": {
        "block_id": "AI",
        "created": "2024-02-19 15:51:39",
        "created_by": null,
        "description": null,
        "id": 2,
        "is_active": 0,
        "is_available": 1,
        "last_modified": "2024-02-19 15:51:39",
        "last_modified_by": null,
        "name": "",
        "option": {
            "cal_cycle": 30,
            "data_cycle": 30,
            "data_len": "10",
            "fv_list": ["SS01", "SS02","SS03","SS04", "SS05"],
            "object_list": ["OBJ4144694800048", "OBJ4100697100046"],
            "resample_time": 1,
            "resample_type": null
        },
        "organization_id": null,
        "reference": null,
        "script": [],
        "uid": "AI021802"
    }
}

查询结果列表

请求参数

参数名称 是否必选 数据类型 字段描述
action String get_result_list查询结果列表
actionid String 指令编号
block_id String AI
page_size String 分页条数

请求示例

curl -H "Content-Type: application/json" -X POST -d '{"action":"get_result_list","block_id":"AI","actionid":"","uid":"AI021802","page_size":"5"}' http://127.0.0.1:8006/api

返回结果

{
    "code": 200,
    "info": "",
    "msg": "success",
    "result": {
        "data": [{
            "block_id": "AI",
            "created": "2024-02-22 15:55:56",
            "id": 1206,
            "name": "020502",
            "object_id": "OBJ4144694800048",
            "project_id": "AI021902",
            "result": [
                [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            ]
        }, {
            "block_id": "AI",
            "created": "2024-02-22 15:55:56",
            "id": 1207,
            "name": "020502",
            "object_id": "OBJ4100697100046",
            "project_id": "AI021902",
            "result": [
                [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            ]
        }, {
            "block_id": "AI",
            "created": "2024-02-22 15:55:56",
            "id": 1208,
            "name": "020502",
            "object_id": "OBJ4144694800048",
            "project_id": "AI021902",
            "result": [
                [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            ]
        }, {
            "block_id": "AI",
            "created": "2024-02-22 15:55:56",
            "id": 1209,
            "name": "020502",
            "object_id": "OBJ4100697100046",
            "project_id": "AI021902",
            "result": [
                [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            ]
        }, {
            "block_id": "AI",
            "created": "2024-02-22 15:54:56",
            "id": 1202,
            "name": "020502",
            "object_id": "OBJ4144694800048",
            "project_id": "AI021902",
            "result": [
                [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            ]
        }],
        "page_index": 1,
        "page_size": 5,
        "total_pages": 241,
        "total_records": 1205
    }
}
文档更新时间: 2024-08-09 13:16   作者:技术支持