Skip to content

Latest commit

 

History

History
147 lines (114 loc) · 6.17 KB

resource.rst

File metadata and controls

147 lines (114 loc) · 6.17 KB

资源组

说明

  • 获取流程调试日志

1、资源组查询

请求方式: GET

请求地址: /api/control/resource

Content-Type: :

application/x-www-form-urlencoded —— 表示通过表单方式提交

查询参数:

参数 数据类型 是否必须 说明
id string pk(无需输入)
name string 名称
cuser string 创建用户
description string 描述
is_default int 是否默认

输入参数:

参数 数据类型 是否必须 说明
id string pk(无需输入)
name string 名称
ctime string 创建时间
cuser string 创建用户
description string 描述
is_default int 是否默认

输出参数:

参数 数据类型 是否必须 说明
id string pk(无需输入)
name string 名称
cuser string 创建用户
description string 描述
is_default int 是否默认

日志查询请求示例:

  • Content-Type: 'application/json'
{
    "id":"",
    "name":"",
    "ctime":"",
    "cuser":"",
    "description":"",
    "is_default":""
}
  • Content-Type: 'application/x-www-form-urlencoded'
curl http://ip:port/api/management/resource?id=&name=&cuser&description=&is_default=

日志查询返回数据示例:

  • Content-Type: 'application/json'
{
    "count": 4,
    "next": null,
    "previous": null,
    "results":
    [
        {
            "id": 8,
            "name": "基础运维部",
            "cuser": "xiaofeng",
            "ctime": 1602638786,
            "description": ""
        },
        {
            "id": 6,
            "name": "测试",
            "cuser": "admin",
            "ctime": 1597368265,
            "description": "测试阶段使用"
        },
        {
            "id": 5,
            "name": "财务部",
            "cuser": "admin",
            "ctime": 1596519868,
            "description": ""
        },
        {
            "id": 1,
            "name": "Default",
            "cuser": "admin",
            "ctime": null,
            "description": null
        }
    ]
}

日志查询错误返回示例: :

{
    "detail":"资源组获取失败"
}