Sign inSign up

kubescope/example-service

By kubescope

•Updated over 4 years ago

Sample REST service / Example Java REST service

Image
0

183

kubescope/example-service repository overview

⁠Sample REST Service

Example service to test REST application. It exposes REST endpoints for testing. (To test GET, POST, PUT and DELETE) methods)

⁠To Run

docker run -i -p 8080:8080 kubescope/example-service

⁠Source

https://github.com/kubscope/example-service⁠

⁠REST Operations

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'

Tag summary

Content type

Image

Digest

Size

254.5 MB

Last updated

over 4 years ago

docker pull kubescope/example-service