A RESTful API with a single endpoint that fetches the records data.
Go to a directory
cd /myDirectoryClone the project
git clone https://github.com/tawfeeqm/case-study.gitGo to the project directory
cd case-studyInstall dependencies
npm installTo run tests, run the following command
npm testStart the server
npm start POST /v1/api/records| Request Payload | Type | Format | Description |
|---|---|---|---|
startDate |
str |
Date YYYY-MM-DD |
Required |
endDate |
str |
Date YYYY-MM-DD |
Required |
minCount |
int |
Required | |
maxCount |
int |
Required |
| Response Payload | Type | Description |
|---|---|---|
code |
int |
0 |
msg |
str |
Success |
records |
array of objects |
[{"key":"TAKwGc6Jr4i8Z487","createdAt":"2017-01-28T01:22:14.398Z","totalCount":2800}] |
| Response Payload | Type | Description |
|---|---|---|
code |
int |
HTTP error code |
msg |
str |
Error message |