Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.61 KB

webapp.rest

File metadata and controls

67 lines (44 loc) · 1.61 KB

# server runs with passwd: passwd

### ping GET http://localhost:8080/ping

### chech message, spam POST http://localhost:8080/check Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"user_id": "123456", "msg": "We're thrilled to announce a group art exhibition and your work could be featured!"}

### chech message, ham POST http://localhost:8080/check Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"user_id": "9123456", "msg": "the message is not spam, it is pizza, very tasty pizza message for you to eat 🍕"}

### get all approved users GET http://localhost:8080/users Authorization: Basic dGctc3BhbTpwYXNzd2Q=

### add new approved user POST http://localhost:8080/users/add Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"user_id": "123456", "user_name": "test user", "timestamp": "2021-01-01T00:00:00Z"}

### delete approved user POST http://localhost:8080/users/delete Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"user_id": "123456"}

### add spam sample POST http://localhost:8080/update/spam Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"msg": "spam sample"}

### add ham sample POST http://localhost:8080/update/ham Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"msg": "ham sample"}

### get all dynamic samples GET http://localhost:8080/samples Authorization: Basic dGctc3BhbTpwYXNzd2Q=

### reload dynamic samples PUT http://localhost:8080/samples Authorization: Basic dGctc3BhbTpwYXNzd2Q=

### remove spam sample POST http://localhost:8080/delete/spam Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"msg": "spam sample"}

### remove ham sample POST http://localhost:8080/delete/ham Authorization: Basic dGctc3BhbTpwYXNzd2Q=

{"msg": "ham sample"}