- 前端接口
- 后端接口
- 更新接口
- 账户接口
- 皮肤站接口
创建更新规则
POST
https://sbi.pigeon-server.cn/api/ui/rules/create
SyncRule
最后修改时间:2024-10-30 22:32:38
责任人:Half_nothing
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
basePath
string
跟新文件存储根目录
ruleName
string
更新规则名称
deleteId
array[string]
等待删除的同步文件夹列表
updateRules
object
更新规则
file
array [object {2}]
文件同步规则
folder
array [object {7}]
文件夹同步规则
示例
{
"ruleName": "未命名1",
"basePath": "asdasdas",
"updateRules": {
"folder": [
{
"ruleName": "",
"clientPath": "ds",
"serverPath": "ds",
"mode": "push",
"ignore": "adsasd\nzxc",
"delete": "adsads\nzxczcx"
},
{
"ruleName": "",
"clientPath": "ads",
"serverPath": "asd",
"mode": "mirror",
"ignore": "",
"delete": ""
}
],
"file": [
{
"ruleName": "",
"clientPath": "zxczcx"
}
]
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sbi.pigeon-server.cn/api/ui/rules/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"ruleName": "未命名1",
"basePath": "asdasdas",
"updateRules": {
"folder": [
{
"ruleName": "",
"clientPath": "ds",
"serverPath": "ds",
"mode": "push",
"ignore": "adsasd\nzxc",
"delete": "adsads\nzxczcx"
},
{
"ruleName": "",
"clientPath": "ads",
"serverPath": "asd",
"mode": "mirror",
"ignore": "",
"delete": ""
}
],
"file": [
{
"ruleName": "",
"clientPath": "zxczcx"
}
]
}
}'
返回响应
🟢200成功
application/json
Body
status
boolean
接口状态
msg
string | null
详细信息
data
string | integer | boolean | array | object | number | null
应用数据
示例
{
"status": true,
"data": 3
}
修改于 2024-10-30 22:32:38