企业微信设置

说明

  • 管理渠道设置中默认的企业微信渠道,用于通知管理中通知渠道参数选择的默认值

1、企业微信列表、新增企业微信、批量删除企业微信 API

请求方式: GET(查询) POST(新增) DELETE(批量删除)

请求地址: /api/notification/qiye/weixin/settings/

Content-Type:

新增数据的时候需要指定Content-Type,以下对Content-Type进行说明:

application/x-www-form-urlencoded —— 表示通过表单方式提交
application/json —— 表示传入数据为json格式字符串

查询参数:

参数 数据类型 是否必须 说明
offset int 数据起始位置
limit int 查询条数
name string 企业微信名称

输入参数(新增):

参数 数据类型 是否必须 说明
name string 企业微信名称
agent_id string AgentId
corpid string CorpId
corpsecret string CorpSecret

输出参数:

参数 数据类型 是否必须 说明
id int 企业微信 id
name string 企业微信名称
agent_id string AgentId
corpid string CorpId
corpsecret string CorpSecret

批量删除参数:

参数 数据类型 是否必须 说明
pk string 与pk[]不能都为空 主键,多个主键用半角逗号隔开。通过http body传入
pk[] array 与pk不能都为空 主键数组。通过http body传入

排序:

参数 数据类型 是否必须 说明
ordering string
一般默认按id倒叙
  • ordering=id表示按id排序ordering=-id表示按id倒叙
  • 多个字段排序用半角逗号分隔

GET返回数据例子:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 3,
            "agent_id": "1000002",
            "corpid": "ww933a1369a610e7",
            "corpsecret": "aKuh1XG7zpzaggj22XJvyfKK7Grc3YzYUZlbgE",
            "name": "测试企业微信"
        }
    ]
}

新增企业微信返回数据例子:

{
    "id": 3,
    "agent_id": "1000002",
    "corpid": "ww933a1369a610e7",
    "corpsecret": "aKuh1XG7zpzaggj22XJvyfKK7Grc3YzYUZlbgE",
    "name": "测试企业微信"
}

2、获取单个企业微信,修改企业微信、删除企业微信 API

请求方式: GET(查询) PUT(修改) PATCH(修改) DELETE(删除)

请求地址: /api/notification/qiye/weixin/settings/3/

请求地址中3为企业微信的id

输入/输出参数: 见章节1中输入和输出参数说明,修改数据时输入参数均为非必须

返回数据例子:

{
    "id": 3,
    "agent_id": "1000002",
    "corpid": "ww933a1369a610e7",
    "corpsecret": "aKuh1XG7zpzaggj22XJvyfKK7Grc3YzYUZlbgE",
    "name": "测试企业微信"
}