入门
本指南展示当前 Config API 结构。v1 用户端点需要 Glue 认证。
读取用户配置
1curl "https://api.hola.cloud/v1/config" \
2 -H "X-Glue-Authentication: YOUR_GLUE_TOKEN"
响应:
1{
2 "entries": {
3 "feature.newCheckout": true,
4 "database.host": "db.example.com"
5 }
6}
更新用户配置
1curl -X PATCH "https://api.hola.cloud/v1/config" \
2 -H "X-Glue-Authentication: YOUR_GLUE_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "entries": {
6 "feature.newCheckout": false
7 }
8 }'
响应:
1{
2 "entries": {
3 "feature.newCheckout": false
4 }
5}
v0 API 直接管理配置 Thing。每个 Thing 都有 id 和 entries。
评论