nanamikon commented on issue #3351: URL: https://github.com/apache/apisix/issues/3351#issuecomment-763393960
Thanks for reply, so I can't update snis with sub path here , because the snis is array but not object refer to https://github.com/apache/apisix/blob/master/doc/zh-cn/admin-api.md sub path is not ok ... # 替换路由的 upstream nodes -- sub path $ curl http://127.0.0.1:9080/apisix/admin/routes/1/upstream/nodes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PATCH -i -d ' { "39.97.63.200:80": 1 }' HTTP/1.1 200 OK ``` This way can work well ``` # 替换路由的 methods -- 数组 $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PATCH -i -d '{ "methods": ["GET", "POST"] }' HTTP/1.1 200 OK ... 执行成功后,methods 将不保留原来的数据,整个更新为: ["GET", "POST"] ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org