Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] apply REST principles in the urls of the http interfaces #999

Closed
3 tasks done
xianjingfeng opened this issue Jul 11, 2023 · 0 comments · Fixed by #1000
Closed
3 tasks done

[Improvement] apply REST principles in the urls of the http interfaces #999

xianjingfeng opened this issue Jul 11, 2023 · 0 comments · Fixed by #1000

Comments

@xianjingfeng
Copy link
Member

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

What would you like to be improved?

As we discuss in #684 (comment), we should apply REST principles in the urls of http interfaces

How should we improve?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
jerqi pushed a commit that referenced this issue Jul 17, 2023
…erfaces (#1000)

### What changes were proposed in this pull request?

Apply REST principles in the urls of the http interfaces

### Why are the changes needed?
Fix: #999

### Does this PR introduce _any_ user-facing change?

Env:
Server IP: 127.0.0.1
HTTP port: 19998
RPC port: 19999
#### Decommission single shuffle server example:
```
curl -XPOST -H "Content-type:application/json" "http://127.0.0.1:19998/api/server/127.0.0.1-19999/decommission" 
```
####  Cancel decommission single shuffle server example:
```
curl -XPOST -H "Content-type:application/json" "http://127.0.0.1:19998/api/server/127.0.0.1-19999/cancelDecommission" 
```
####  Fetch single shuffle server:
```
curl -X GET http://127.0.0.1:19998/api/server/127.0.0.1-19999
```
#### Fetch server list:
```
#path: /api/server/nodes/[{status}]
curl  "http://127.0.0.1:19998/api/server/nodes"
curl  "http://127.0.0.1:19998/api/server/nodes/DECOMMISSIONING"
curl  "http://127.0.0.1:19998/api/server/nodes/ACTIVE"
```
### How was this patch tested?

UT

Co-authored-by: xianjingfeng <xianjingfeng@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant