创建新订阅
POST
/api/sub/add
订阅
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
auto_update
boolean
必需
cron
string
必需
url
string
必需
示例
{
"auto_update": true,
"cron": "string",
"url": "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 'http://localhost:8080/api/api/sub/add' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢201成功
application/json
Body
code
integer
可选
示例值:
200
data
object
model.Sub
alive_nodes
integer
可选
auto_update
boolean
可选
created_at
string
可选
cron
string
可选
id
integer
可选
last_check
string
可选
last_fetch
string
可选
total_nodes
integer
可选
updated_at
string
可选
url
string
可选
message
string
可选
示例值:
success
示例
{
"code": 200,
"data": {
"alive_nodes": 0,
"auto_update": true,
"created_at": "string",
"cron": "string",
"id": 0,
"last_check": "string",
"last_fetch": "string",
"total_nodes": 0,
"updated_at": "string",
"url": "string"
},
"message": "success"
}
🟠400请求有误
🟠401没有权限
🟠409409
🔴500服务器错误
修改于 2025-04-03 08:54:22