bug: when created route by adminAPI, "upstream" can not be modified by dashboard
- Why do you submit this issue?
- [ ] Question or discussion
- [x] Bug
- [ ] Requirements
- [ ] Feature or performance improvement
- [ ] Other __
Bug
- Which version of Apache APISIX Dashboard, OS, and Browser? APISIX master + dashabord 2.0 rc3
- create a route with adminAPI
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"name":"test_route",
"methods":["GET","POST"],
"uri": "/name",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:9797": 1
}
}
}'
2."upstream"(127.0.0.1:9797) cannot be displayed and modified( or added ) by the dashboard


May need API to check if the response data is valid.
The snapshot above is taken from the manager-api
May need API to check if the response data is valid.
that is a valid format too. if we do not reformat the data in etcd, we need to compatible with this format.
I mean could @idbeta please check and paste the response from that page here?
https://github.com/apache/apisix-dashboard/issues/786#issuecomment-725315724 this is valid for the frontend.
@nic-chen please confirm that is a bug of Manager-API. if yes, we need to update the label
I mean could @idbeta please check and paste the response from that page here?
#786 (comment) this is valid for the frontend.
sorry, I am late, I will check this today
@juzhiyuan there two apis in this case click edit
Request URL: http://127.0.0.1:8080/apisix/admin/routes/1
{"code":0,"message":"","data":{"id":"1","create_time":0,"update_time":0,"uri":"/name","name":"test_route","methods":["GET","POST"],"upstream":{"nodes":{"127.0.0.1:9797":1},"type":"roundrobin","hash_on":"vars","pass_host":"pass"}},"request_id":"dd826fd2-5739-4f56-88a4-7659892a38c8"}
click next to upstream
Request URL: http://127.0.0.1:8080/apisix/admin/upstreams
{"code":0,"message":"","data":{"rows":[],"total_size":0},"request_id":"e0f6114b-68a4-4019-968f-54dc30f5f678"}
@nic-chen please confirm that is a bug of Manager-API. if yes, we need to update the label
updated
@juzhiyuan there two apis in this case click edit
Request URL: http://127.0.0.1:8080/apisix/admin/routes/1 {"code":0,"message":"","data":{"id":"1","create_time":0,"update_time":0,"uri":"/name","name":"test_route","methods":["GET","POST"],"upstream":{"nodes":{"127.0.0.1:9797":1},"type":"roundrobin","hash_on":"vars","pass_host":"pass"}},"request_id":"dd826fd2-5739-4f56-88a4-7659892a38c8"}click next to upstream
Request URL: http://127.0.0.1:8080/apisix/admin/upstreams {"code":0,"message":"","data":{"rows":[],"total_size":0},"request_id":"e0f6114b-68a4-4019-968f-54dc30f5f678"}
Ya, from the first response, we can see nodes's format is in the hash, and the frontend only supports Array.