设置
面板配置与用户凭据。所有端点均位于 /panel/api/setting 之下,需要已登录的会话或 Bearer 令牌。
AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/all"{ "success": true, "msg": "string", "obj": null}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/defaultSettings"{ "success": true, "msg": "string", "obj": null}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
application/json- body
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/update" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "msg": "string", "obj": null}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
application/json- body
oldUsername*stringCurrent admin username.
oldPassword*stringCurrent admin password.
newUsername*stringDesired new username.
newPassword*stringDesired new password.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/updateUser" \ -H "Content-Type: application/json" \ -d '{ "oldUsername": "admin", "oldPassword": "admin", "newUsername": "newadmin", "newPassword": "newpass" }'{ "success": true, "msg": "string", "obj": null}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/restartPanel"{ "success": true, "msg": "string", "obj": null}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/testSmtp"{ "success": true, "stage": "send", "msg": "Test email sent successfully"}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X POST "https://example.com/panel/api/setting/testTgBot"{ "success": true, "msg": "Test message sent to Telegram"}AuthorizationBearer <token>Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.
Successful response
application/json- response
success?booleanmsg?stringobj?unknowncurl -X GET "https://example.com/panel/api/setting/getDefaultJsonConfig"{ "success": true, "msg": "string", "obj": null}
3x-ui