from #1546
@konekoya @wu87988622 除了cluster相關的服務外(zk, bk, wk, streamapp and shabondi)其他物件的操作都已經上group了,這邊需要前端配合在查詢的時候搭配group來查詢相關物件的資料。
我們後續的PR需要等到前端採用group後才可以繼續進行。此外以下是group例外的總和:
I plan to change the location of group in Create request.
before
POST /v0/$rs?group=${g0}
{
"name": "n0"
}
after
POST /v0/$rs
{
"group": "g0",
"name": "n0"
}
(the group is ignorable)
The merit of later is that the URL of Create differs from URL of GET.
@oharastream/developer any feedbacks ?
I plan to change the location of group in Create request.
before
POST /v0/$rs?group=${g0} { "name": "n0" }after
POST /v0/$rs { "group": "g0", "name": "n0" }(the group is ignorable)
The merit of later is that the URL of Create differs from URL of GET.
@oharastream/developer any feedbacks ?
Since our ohara "dataKey" current is the combination of
The later is imply "oh, you should use these two parameters to create your object, or we will generate for you"
it's more reasonable, so I agree the change :)
by the way, I think except the "POST" method, the rest url should be the same, right?
GET /v0/$rs/{name}?group=xxx
PUT /v0/$rs/{name}?group=xxx
DELETE /v0/$rs/{name}?group=xxx
PUT /v0/$rs/{name}/start?group=xxx
PUT /v0/$rs/{name}/stop?group=xxx
PUT /v0/$rs/{name}/{nodeName}?group=xxx
by the way, I think except the "POST" method, the rest url should be the same, right?
In fact, I prefer to make the “write” request have different url from “read” request because we are going to add more “query parameters” to read request. And it will mislead users about the usage of query parameters on write request :(
For example, the URL of GET request should be /v0/$rs?name=a&x=a. Also, getting single object should be deprecated.
Furthermore, group is not always “default” in some objects. For example, connector group must be equal to worker cluster name. And hence group is not optional to PUT and DELETE. It it worth of moving the group from query parameter to url.
Finally, all tasks are completed!!!
reopen since I neglect Object APIs
Most helpful comment
@konekoya @wu87988622 除了cluster相關的服務外(zk, bk, wk, streamapp and shabondi)其他物件的操作都已經上group了,這邊需要前端配合在查詢的時候搭配group來查詢相關物件的資料。
我們後續的PR需要等到前端採用group後才可以繼續進行。此外以下是group例外的總和: