变量管理
基础信息
- Base URL:
https://api.ticos.cn - 查询变量:
GET /variables - 更新变量:
POST /variables - 认证:
Authorization: Bearer <token>
1. 查询变量(GET /variables)
响应示例
{ "var1": "value1", "var2": "value2"}2. 更新变量(POST /variables)
- Content-Type:
application/json - 查询参数
priority(可选):low/medium/high
规则
- 新键:新增
- 同名键:覆盖
- 值为
null:删除变量
请求示例
{ "var1": "新值", "var2": null}Curl 示例
curl --location 'https://api.ticos.cn/variables?priority=high' \--header 'Authorization: Bearer <API_KEY>' \--header 'Content-Type: application/json' \--data '{"var1":"新值","var2":null}'常见状态码
200 OK:成功400 Bad Request:请求格式错误401 Unauthorized:鉴权失败500 Internal Server Error:服务器错误