主题
应用订阅 
应用订阅 
应用订阅支持给指定用户通过邮件方式分发数据或者报表的功能,目前支持企业微信、钉钉、飞书、Webhook等分发途径
应用订阅的数据说明 
数据结构 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| appId | path | string | 是 | none | 
| body | body | object | 否 | none | 
| body | object | 否 | 邮件推送配置 | |
| »» dashboardList | body | [object] | 否 | 推送仪表盘列表 | 
| »»» id | body | integer | 否 | 仪表盘id | 
| »»» title | body | string | 否 | 仪表盘标题 | 
| »» bodyWithDashboardUrl | body | boolean | 否 | 正文是否附加仪表盘链接 | 
| »» enabled | body | boolean | 否 | 是否开启 | 
| »» bodyWithImage | body | boolean | 否 | 正文是否附加仪表盘图片 | 
| »» compressAttachment | body | boolean | 否 | 是否压缩附加 | 
| »» receiverList | body | [object] | 否 | 衡石系统内接收者列表 | 
| »»» id | body | integer | 否 | 接收者id | 
| »»» name | body | string | 否 | none | 
| »»» loginName | body | string | 否 | none | 
| »»» receiverType | body | string | 否 | 接收人类型 | 
| »» emailSubject | body | string | 否 | 主题 | 
| »» defaultEmailSubject | body | string | 否 | 默认主题 | 
| »» emailContentBody | body | string | 否 | 内容 | 
| »» defaultEmailContentBody | body | string | 否 | 默认内容 | 
| »» tooLargeContentBody | body | string | 否 | 附件内容过大时替换内容 | 
| »» defaultTooLargeContentBody | body | string | 否 | 默认附件内容过大时替换内容 | 
| »» attachmentTypes | body | string | 否 | 附件类型 | 
| »» emailAddressList | body | [string] | 否 | 邮箱地址列表 | 
| » webhook | body | object | 否 | webhook推送配置 | 
| »» enabled | body | boolean | 否 | 是否开启 | 
| »» url | body | string | 否 | webhook推送目的地址 | 
| »» method | body | string | 否 | HTTP请求类型 | 
| »» requestBody | body | string | 否 | 请求体(仅支持json格式请求体) | 
| »» headers | body | [string] | 否 | 请求头 | 
| » wecom | body | object | 否 | 企业微信推送配置 | 
| »» dashboardList | body | [object] | 否 | none | 
| »»» id | body | integer | 否 | none | 
| »»» title | body | string | 否 | none | 
| »» bodyWithDashboardUrl | body | boolean | 否 | none | 
| »» enabled | body | boolean | 否 | none | 
| »» bodyWithImage | body | boolean | 否 | none | 
| »» targets | body | [string] | 否 | 企业微信用户id列表 | 
| »» subject | body | string | 否 | 消息主题 | 
| »» content | body | string | 否 | 消息内容 | 
| »» bodyCustomized | body | boolean | 否 | 是否开启自定义消息 | 
| »» defaultContent | body | string | 否 | 默认消息内容 | 
| » feishu | body | object | 否 | 飞书推送配置 | 
| »» dashboardList | body | [object] | 否 | none | 
| »»» id | body | integer | 否 | none | 
| »»» title | body | string | 否 | none | 
| »» bodyWithDashboardUrl | body | boolean | 否 | none | 
| »» enabled | body | boolean | 否 | none | 
| »» bodyWithImage | body | boolean | 否 | none | 
| »» targets | body | [string] | 否 | none | 
| »» subject | body | string | 否 | none | 
| »» content | body | string | 否 | none | 
| »» bodyCustomized | body | boolean | 否 | none | 
| »» defaultContent | body | string | 否 | none | 
| » appId | body | integer | 否 | none | 
| » title | body | string | 否 | none | 
模板变量 
支持在推送内容的正文以及标题使用模板变量。
例子:
text
这是临时订阅消息{{%%system.dashboard.url}}支持的模板变量列表如下:
| 变量名 | 
|---|
| system.app.title | 
| system.app.url | 
| system.today | 
仅Webhook推送方式支持的模板变量列表如下:
| 变量名 | 
|---|
| system.dashboard.url | 
收件人类型 
| 字段值 | 描述 | 
|---|---|
| USER | 用户 | 
| ORGANIZATION | 用户组 | 
| DEPARTMENT | 组织机构 | 
邮件附件类型 
| 字段值 | 描述 | 
|---|---|
| PNG | png文件 | 
| pdf文件 | |
| EXCEL | excel文件 | 
接口说明 
增加邮件推送任务 
创建应用的邮件推送任务。单个用户的推送失败会被忽略。原/api/apps/{appId}/emails接口。
http
POST /api/apps/{appId}/subscribe-record HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
// Request Body:
{
  "email": {
    "enabled": false,
    "receiverList": [
      {
        "id": 2,
        "name": "xx",
        "loginName": "xxx",
        "receiverType": "USER"
      }
    ],
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithImage": true,
    "compressAttachment": false,
    "bodyWithDashboardUrl": true,
    "defaultEmailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
    "defaultEmailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
    "defaultTooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。",
    "emailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
    "emailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
    "tooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。"
  },
  "wecom": {
    "enabled": true,
    "bodyWithImage": true,
    "subject": "企业微信测试主题",
    "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
    "bodyCustomized": true,
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithDashboardUrl": true,
    "targets": [
      "xxxx"
    ]
  },
  "feishu": {
    "enabled": true,
    "bodyWithImage": true,
    "subject": "企业微信测试主题",
    "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
    "bodyCustomized": true,
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithDashboardUrl": true,
    "targets": [
      "xxxx"
    ]
  },
  "webhook": {
    "enabled": true,
    "url": "https://xxxxx",
    "requestBody": "{\"msgtype\":\"text\",\"text\":{\"content\":\"广州今日天气:29度,大部分多云,降雨概率:60%\",\"mentioned_mobile_list\":[\"xxxx\"]}}",
    "method": "POST"
  },
  "title": "测试一号图片"
}http
HTTP/1.1 200 OK
Content-Type: application/json
{
  "email": {
    "enabled": true,
    "config": {
      "receiverList": [
        {
          "id": 0,
          "name": "string",
          "loginName": "string",
          "receiverType": "string"
        }
      ],
      "dashboardList": [
        {
          "id": 0,
          "title": "string"
        }
      ],
      "compressAttachment": true,
      "emailSubject": "string",
      "defaultEmailSubject": "string",
      "emailContentBody": "string",
      "defaultEmailContentBody": "string",
      "tooLargeContentBody": "string",
      "defaultTooLargeContentBody": "string",
      "bodyWithDashboardUrl": true
    }
  },
  "webhook": {
    "enabled": true,
    "config": {
      "url": "string",
      "method": "string",
      "headers": [
        {}
      ],
      "requestBody": "string"
    }
  },
  "wecom": {
    "enabled": true,
    "config": {
      "targets": [
        "string"
      ],
      "subject": "string",
      "content": "string",
      "defaultContent": "string",
      "bodyCustomized": "string",
      "dashboardList": [
        {
          "id": 0,
          "title": "string"
        }
      ],
      "bodyWithImage": true,
      "bodyWithDashboardUrl": true
    }
  },
  "feiShu": {
    "enabled": true,
    "config": {
      "targets": [
        "string"
      ],
      "subject": "string",
      "content": "string",
      "defaultContent": "string",
      "bodyCustomized": "string",
      "dashboardList": [
        {
          "id": 0,
          "title": "string"
        }
      ],
      "bodyWithImage": true,
      "bodyWithDashboardUrl": true
    }
  },
  "title": "string"
}返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline | 
获取订阅任务列表 
原/api/apps/{appId}/emails接口。
请求参数 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| appId | path | string | 是 | none | 
http
GET /api/apps/{appId}/subscribe-record HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...http
HTTP/1.1 200 OK
Content-Type: application/json
{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": [
    {
      "email": {
        "dashboardList": [
          {
            "id": 1,
            "title": "新建仪表盘"
          }
        ],
        "bodyWithDashboardUrl": true,
        "enabled": false,
        "bodyWithImage": true,
        "compressAttachment": false,
        "receiverList": [
          {
            "id": 2,
            "name": "xx",
            "loginName": "xxx",
            "receiverType": "USER"
          }
        ],
        "emailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
        "defaultEmailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
        "emailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
        "defaultEmailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
        "tooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。",
        "defaultTooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。"
      },
      "webhook": {
        "enabled": true,
        "url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxx",
        "method": "POST",
        "requestBody": "{\"msgtype\":\"text\",\"text\":{\"content\":\"广州今日天气:29度,大部分多云,降雨概率:60%\",\"mentioned_mobile_list\":[\"xxxx\"]}}"
      },
      "wecom": {
        "dashboardList": [
          {
            "id": 1,
            "title": "新建仪表盘"
          }
        ],
        "bodyWithDashboardUrl": true,
        "enabled": true,
        "bodyWithImage": true,
        "targets": [
          "xxxx"
        ],
        "subject": "企业微信测试主题",
        "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
        "bodyCustomized": true
      },
      "feishu": {
        "dashboardList": [
          {
            "id": 1,
            "title": "新建仪表盘"
          }
        ],
        "bodyWithDashboardUrl": true,
        "enabled": true,
        "bodyWithImage": true,
        "targets": [
          "xxx"
        ],
        "subject": "企业微信测试主题",
        "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
        "bodyCustomized": true
      },
      "id": 2,
      "appId": 610,
      "title": "测试一号图片",
      "createdBy": 2,
      "createdAt": "2023-10-13 11:16:12",
      "updatedBy": 2,
      "updatedAt": "2023-10-16 12:11:34",
      "isDelete": false,
      "creator": {
        "id": 2,
        "name": "xxx",
        "loginName": "xxx"
      },
      "updater": {
        "id": 2,
        "name": "xxx",
        "loginName": "xxx"
      },
      "jobStatus": "SUCCESSFUL",
      "startAt": "2023-10-16 12:19:09",
      "entityKey": "610-2",
      "execDetail": {
        "jobClass": "com.hengshi.nangaparbat.schedulejob.AppEmailJob",
        "jobParams": {
          "app": 610,
          "email": 2
        },
        "retryTimes": 1
      }
    },
    {
      "email": {
        "dashboardList": [
          {
            "id": 1,
            "title": "新建仪表盘"
          }
        ],
        "bodyWithDashboardUrl": true,
        "enabled": true,
        "compressAttachment": false,
        "receiverList": [
          {
            "id": 2,
            "name": "xxx",
            "loginName": "xxx",
            "receiverType": "USER"
          }
        ],
        "emailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
        "defaultEmailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
        "emailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
        "defaultEmailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
        "tooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。",
        "defaultTooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。"
      },
      "id": 1,
      "appId": 610,
      "title": "测试订阅一",
      "createdBy": 2,
      "createdAt": "2023-10-12 19:18:07",
      "updatedBy": 2,
      "updatedAt": "2023-10-12 19:18:07",
      "isDelete": false,
      "creator": {
        "id": 2,
        "name": "xx",
        "loginName": "xxx"
      },
      "updater": {
        "id": 2,
        "name": "xx",
        "loginName": "xxx"
      },
      "execDetail": {
        "jobClass": "com.hengshi.nangaparbat.schedulejob.AppEmailJob",
        "jobParams": {
          "app": 610,
          "email": 1
        },
        "retryTimes": 1
      }
    }
  ],
  "totalHits": 2,
  "offset": 0,
  "chartDataStartTimeMillis": 0
}返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline | 
立即推送邮件 
立即执行当前邮件推送任务。
http
POST /api/schedules HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
// Request Body:
{
  "entityGroup": "APP_EMAIL",
  "entityKey": "550-2",
  "planItems": [
    {
      "triggerType": "ONCE"
    }
  ],
  "execDetail": {
    "jobClass": "com.hengshi.nangaparbat.schedulejob.AppEmailJob",
    "jobParams": {
      "app": 550,
      "email": 2
    },
    "retryTimes": 1
  }
}请求参数 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| body | body | object | 否 | none | 
| » entityGroup | body | string | 是 | none | 
| » entityKey | body | string | 是 | none | 
| » planItems | body | [object] | 是 | none | 
| »» triggerType | body | string | 否 | none | 
| » execDetail | body | object | 是 | none | 
| »» jobClass | body | string | 是 | none | 
| »» jobParams | body | object | 是 | none | 
| »»» app | body | integer | 是 | none | 
| body | integer | 是 | none | |
| »» retryTimes | body | integer | 是 | none | 
返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline | 
根据ID获取订阅任务 
原/api/apps/{appId}/emails/{emailId}接口
请求参数 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| appId | path | string | 是 | none | 
| recordId | path | string | 是 | none | 
http
GET /api/apps/{appId}/subscribe-record/{recordId} HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...http
HTTP/1.1 200 OK
Content-Type: application/json
{
  "version": "version@9a5e106#6730f0d",
  "code": 0,
  "msg": "success",
  "data": {
    "email": {
      "dashboardList": [
        {
          "id": 1,
          "title": "新建仪表盘"
        }
      ],
      "bodyWithDashboardUrl": true,
      "enabled": false,
      "bodyWithImage": true,
      "compressAttachment": false,
      "receiverList": [
        {
          "id": 2,
          "name": "xxx",
          "loginName": "xxx",
          "receiverType": "USER"
        }
      ],
      "emailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
      "defaultEmailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
      "emailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
      "defaultEmailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
      "tooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。",
      "defaultTooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。"
    },
    "webhook": {
      "enabled": true,
      "url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx",
      "method": "POST",
      "requestBody": "{\"msgtype\":\"text\",\"text\":{\"content\":\"广州今日天气:29度,大部分多云,降雨概率:60%\",\"mentioned_mobile_list\":[\"xxx\"]}}"
    },
    "wecom": {
      "dashboardList": [
        {
          "id": 1,
          "title": "新建仪表盘"
        }
      ],
      "bodyWithDashboardUrl": true,
      "enabled": true,
      "bodyWithImage": true,
      "targets": [
        "xxxxx"
      ],
      "subject": "企业微信测试主题",
      "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
      "bodyCustomized": true
    },
    "feishu": {
      "dashboardList": [
        {
          "id": 1,
          "title": "新建仪表盘"
        }
      ],
      "bodyWithDashboardUrl": true,
      "enabled": true,
      "bodyWithImage": true,
      "targets": [
        "xxxx"
      ],
      "subject": "企业微信测试主题",
      "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
      "bodyCustomized": true
    },
    "id": 2,
    "appId": 610,
    "title": "测试一号图片",
    "createdBy": 2,
    "createdAt": "2023-10-13 11:16:12",
    "updatedBy": 2,
    "updatedAt": "2023-10-16 12:11:34",
    "isDelete": false,
    "creator": {
      "id": 2,
      "name": "xxx",
      "loginName": "xxx"
    },
    "updater": {
      "id": 2,
      "name": "xxx",
      "loginName": "xxx"
    },
    "jobStatus": "SUCCESSFUL",
    "startAt": "2023-10-16 12:19:09",
    "entityKey": "610-2",
    "execDetail": {
      "jobClass": "com.hengshi.nangaparbat.schedulejob.AppEmailJob",
      "jobParams": {
        "app": 610,
        "email": 2
      },
      "retryTimes": 1
    }
  },
  "chartDataStartTimeMillis": 0
}返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline | 
更新订阅任务 
原/api/apps/{appId}/emails/{emailId}接口。
http
PUT /api/apps/{appId}/subscribe-record/{recordId} HTTP/1.1
Content-Type: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
// Request Body:
{
  "email": {
    "enabled": false,
    "receiverList": [
      {
        "id": 2,
        "name": "xx",
        "loginName": "xxx",
        "receiverType": "USER"
      }
    ],
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithImage": true,
    "compressAttachment": false,
    "bodyWithDashboardUrl": true,
    "defaultEmailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
    "defaultEmailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
    "defaultTooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。",
    "emailSubject": "【系统自动推送】'{{%%system.app.title}}_{{%%system.today}}'",
    "emailContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 您也可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 如遇到任何问题,请咨询系统管理员。",
    "tooLargeContentBody": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统应当自动推送{{%%system.app.title}}应用内容给您。<br/> 但是非常抱歉,由于您选择的内容过大,系统无法自动推送。<br/> 您可以访问<a target=\"view_frame\" href=\"{{%%system.app.url}}\">应用URL地址</a>获取应用所有仪表盘及数据集。<br/> 建议您登录平台更改设定,如有问题请咨询系统管理员。"
  },
  "wecom": {
    "enabled": true,
    "bodyWithImage": true,
    "subject": "企业微信测试主题",
    "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
    "bodyCustomized": true,
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithDashboardUrl": true,
    "targets": [
      "xxxx"
    ]
  },
  "feishu": {
    "enabled": true,
    "bodyWithImage": true,
    "subject": "企业微信测试主题",
    "content": "尊敬的客户您好!<br/> 根据您在平台中的推送设定,系统自动推送{{%%system.app.title}}应用内容给您。<br/> 如遇到任何问题,请咨询系统管理员。",
    "bodyCustomized": true,
    "dashboardList": [
      {
        "id": 1,
        "title": "新建仪表盘"
      }
    ],
    "bodyWithDashboardUrl": true,
    "targets": [
      "xxxx"
    ]
  },
  "webhook": {
    "enabled": true,
    "url": "https://xxxxx",
    "requestBody": "{\"msgtype\":\"text\",\"text\":{\"content\":\"广州今日天气:29度,大部分多云,降雨概率:60%\",\"mentioned_mobile_list\":[\"xxxx\"]}}",
    "method": "POST"
  },
  "title": "测试一号图片"
}请求参数 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| appId | path | string | 是 | none | 
| recordId | path | string | 是 | none | 
| body | body | object | 否 | none | 
| body | object | 否 | 邮件推送配置 | |
| »» dashboardList | body | [object] | 否 | 推送仪表盘列表 | 
| »»» id | body | integer | 否 | 仪表盘id | 
| »»» title | body | string | 否 | 仪表盘标题 | 
| »» bodyWithDashboardUrl | body | boolean | 否 | 正文是否附加仪表盘链接 | 
| »» enabled | body | boolean | 否 | 是否开启 | 
| »» bodyWithImage | body | boolean | 否 | 正文是否附加仪表盘图片 | 
| »» compressAttachment | body | boolean | 否 | 是否压缩附加 | 
| »» receiverList | body | [object] | 否 | 衡石系统内接收者列表 | 
| »»» id | body | integer | 否 | 接收者id | 
| »»» name | body | string | 否 | none | 
| »»» loginName | body | string | 否 | none | 
| »»» receiverType | body | string | 否 | 接收人类型 | 
| »» emailSubject | body | string | 否 | 主题 | 
| »» defaultEmailSubject | body | string | 否 | 默认主题 | 
| »» emailContentBody | body | string | 否 | 内容 | 
| »» defaultEmailContentBody | body | string | 否 | 默认内容 | 
| »» tooLargeContentBody | body | string | 否 | 附件内容过大时替换内容 | 
| »» defaultTooLargeContentBody | body | string | 否 | 默认附件内容过大时替换内容 | 
| »» attachmentTypes | body | string | 否 | 附件类型:PNG、PDF、EXCEL | 
| »» emailAddressList | body | [string] | 否 | 邮箱地址列表 | 
| » webhook | body | object | 否 | webhook推送配置 | 
| »» enabled | body | boolean | 否 | 是否开启 | 
| »» url | body | string | 否 | webhook推送目的地址 | 
| »» method | body | string | 否 | HTTP请求类型 | 
| »» requestBody | body | string | 否 | 请求体 | 
| »» headers | body | [string] | 否 | 请求头. | 
| » wecom | body | object | 否 | 企业微信推送配置 | 
| »» dashboardList | body | [object] | 否 | none | 
| »»» id | body | integer | 否 | none | 
| »»» title | body | string | 否 | none | 
| »» bodyWithDashboardUrl | body | boolean | 否 | none | 
| »» enabled | body | boolean | 否 | none | 
| »» bodyWithImage | body | boolean | 否 | none | 
| »» targets | body | [string] | 否 | 企业微信用户id列表 | 
| »» subject | body | string | 否 | 消息主题 | 
| »» content | body | string | 否 | 消息内容 | 
| »» bodyCustomized | body | boolean | 否 | 是否开启自定义消息 | 
| »» defaultContent | body | string | 否 | 默认消息内容 | 
| » feishu | body | object | 否 | 飞书推送配置 | 
| »» dashboardList | body | [object] | 否 | none | 
| »»» id | body | integer | 否 | none | 
| »»» title | body | string | 否 | none | 
| »» bodyWithDashboardUrl | body | boolean | 否 | none | 
| »» enabled | body | boolean | 否 | none | 
| »» bodyWithImage | body | boolean | 否 | none | 
| »» targets | body | [string] | 否 | none | 
| »» subject | body | string | 否 | none | 
| »» content | body | string | 否 | none | 
| »» bodyCustomized | body | boolean | 否 | none | 
| »» defaultContent | body | string | 否 | none | 
| » appId | body | integer | 否 | none | 
| » title | body | string | 否 | none | 
| » id | body | integer | 是 | recordId | 
返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline | 
删除订阅任务 
http
DELETE /api/apps/{appId}/subscribe-record/{recordId} HTTP/1.1
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...原/api/apps/{appId}/emails/{emailId}接口。
请求参数 
| 名称 | 位置 | 类型 | 必选 | 说明 | 
|---|---|---|---|---|
| appId | path | string | 是 | none | 
| recordId | path | string | 是 | none | 
返回结果 
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | 成功 | Inline |