https://github.com/s4kibs4mi/restful_assessment
Repo of coding assessment
https://github.com/s4kibs4mi/restful_assessment
Last synced: 7 months ago
JSON representation
Repo of coding assessment
- Host: GitHub
- URL: https://github.com/s4kibs4mi/restful_assessment
- Owner: s4kibs4mi
- Created: 2017-10-03T14:24:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-03T19:45:47.000Z (about 8 years ago)
- Last Synced: 2025-01-18T10:27:46.539Z (9 months ago)
- Language: Java
- Size: 68.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Restful Assessment
##### Run with docker
```
git clone https://github.com/s4kibs4mi/restful_assessment.git
```
Move to root of project and execute,
```
docker build -t repository_name:tag_name .
```
then run docker,
```
docker run -p 8080:4567 repository_name:tag_name
```Or get it from docker hub,
```
docker pull sakibsami/restful_assessment:2.7
docker run -p 8080:4567 sakibsami/restful_assessment:2.7
```##### Run with jar
Install java in your system
[Download JAR from here](https://github.com/s4kibs4mi/restful_assessment/releases/download/1.3/restful_assessment-1.3.jar)then execute
```
java -jar downloadfile.jar
```## Documentation
Application port docker `8080` and JAR `4567`
BASE_URL : `host_name:$port`
1. Get Values :
GET /values
```json
{
"key1": "value1",
"key2": "value2"
.....
}
```
orGET /values?keys=key1,key3
```json
{
"key1": "value1",
"key3": "value3"
.....
}
```2. Add Values
POST /values
Request,
```json
{
"key1": "value1",
"key2": "value2"
}
```Response,
```
{
"code": 200
}
```
or
```
{
"code": 201
}
```Note : MongoDB used to store data & Redis used for data caching. In get request result will be cached for 10seconds.