Apisix-dashboard: Resource create request should return the ultimate data

Created on 30 Dec 2020  路  8Comments  路  Source: apache/apisix-dashboard

Feature request

Please describe your feature

When create resources like Route without specifying id, the ultimate data should be returned, otherwise people cannot reference the just created resource by id.

image

Describe the solution you'd like

Output the data in the response.

backend enhancement wait for update

Most helpful comment

we also need to fix that for HTTP PUT methods

This is needed.

@juzhiyuan yep, I will commit an PR for this.

All 8 comments

Agree with it.

IMO, we need to keep the same response as apisix.

agree with this too

@tokers @starsz @membphis @juzhiyuan Users could create a resource via POST or PUT methods. No way to refer the new object only occurs at POST method. Shall we also return the ultimate data when using PUT method? FYI, the answer is yes for APISIX, need to make manager-api the same as Admin API?

Looking forward to your insights and will help me complete PR #1277 . Thanks.

Shall we also return the ultimate data when using PUT method? FYI, the answer is yes for APISIX, need to make manager-api the same as Admin API?

the Admin API and Manager API should work in the same way.
So I think the answer is yes, they should return the final data at the same time, whether it is PUT or POST method.

Shall we also return the ultimate data when using PUT method? FYI, the answer is yes for APISIX, need to make manager-api the same as Admin API?

the Admin API and Manager API should work in the same way.
So I think the answer is yes, they should return the final data at the same time, whether it is PUT or POST method.

@membphis copy. Thanks for the directions.

we also need to fix that for HTTP PUT methods

This is needed.

we also need to fix that for HTTP PUT methods

This is needed.

@juzhiyuan yep, I will commit an PR for this.

Hi all, since both #1277 and #1322 had been merged, I would close this issue. Please feel free to reopen it if anything unexpected. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenyicai picture chenyicai  路  4Comments

gxthrj picture gxthrj  路  5Comments

juzhiyuan picture juzhiyuan  路  5Comments

juzhiyuan picture juzhiyuan  路  3Comments

qian0817 picture qian0817  路  4Comments