Sample REST service / Example Java REST service
183
Example service to test REST application. It exposes REST endpoints for testing. (To test GET, POST, PUT and DELETE) methods)
docker run -i -p 8080:8080 kubescope/example-service
https://github.com/kubscope/example-service
To get all user
curl --location --request GET 'http://localhost:8080/api/v1/users'
To get by id
curl --location --request GET 'http://localhost:8080/api/v1/users/12'
To add new user
curl --location --request POST 'http://localhost:8080/api/v1/users' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 13,
"name": "Test User",
"active": true
}'
To modify
curl --location --request PUT 'http://localhost:8080/api/v1/users' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 13,
"name": "Test User Modify",
"active": false
}'
To delete
curl --location --request DELETE 'http://localhost:8080/api/v1/users/13' \
--header 'Content-Type: application/json'
Content type
Image
Digest
Size
254.5 MB
Last updated
over 4 years ago
docker pull kubescope/example-service