- system
- access
- app
- common
- data
- dict
- log
- module
- ops
- role
- tenant
- user
- notify
- area
- project
- slot
- dept
- job
- open
- data
添加通知通道
POST
/api/v1/system/notify/channel/create
system/notify/channelsystemNotifyChannel
请求参数
Header 参数
Ithings-Project-Id
string
可选
默认值:
{{Ithings-Project-Id}}
Ithings-Token
string
可选
默认值:
{{iThings-token}}
app-code
string
可选
默认值:
{{appCode}}
device-id
string
可选
Body 参数application/json
id
integer <int64>
id编号
name
string
通知的命名
type
string
可选
desc
string
备注
webhook
string
可选
email
object (ThirdEmailConfig)
可选
from
string
必需
host
string
必需
secret
string
必需
nickname
string
必需
port
integer <int64>
必需
isSsl
integer <int64>
必需
app
object (ThirdAppConfig)
可选
appID
string
可选
appKey
string
微信小程序无需填写
appSecret
string
可选
sms
object (ThirdSms)
可选
type
string
可选
accessKeyID
string
阿里云,腾讯云必填
accessKeySecret
string
阿里云,腾讯云必填
appID
string
腾讯云必填
appKey
string
腾讯云必填
示例
{
"id": 0,
"name": "string",
"type": "string",
"desc": "string",
"webhook": "string",
"email": {
"from": "string",
"host": "string",
"secret": "string",
"nickname": "string",
"port": 0,
"isSsl": 0
},
"app": {
"appID": "string",
"appKey": "string",
"appSecret": "string"
},
"sms": {
"type": "string",
"accessKeyID": "string",
"accessKeySecret": "string",
"appID": "string",
"appKey": "string"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/system/notify/channel/create' \
--header 'Ithings-Project-Id: {{Ithings-Project-Id}}' \
--header 'Ithings-Token: {{iThings-token}}' \
--header 'app-code: {{appCode}}' \
--header 'device-id;' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
返回code
默认值:
200
msg
string
返回的消息
data
object (WithID)
可选
id
integer <int64>
id
示例
{
"code": "200",
"msg": "string",
"data": {
"id": 0
}
}
修改于 2025-03-25 09:32:22