Skip to content

Commit

Permalink
fixed REST API endpoint description and postman curls
Browse files Browse the repository at this point in the history
  • Loading branch information
pjazdzyk committed Nov 21, 2022
1 parent 76c437a commit 2d0250e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,17 @@ Application provides two endpoints: for input numbers and results checking. Plea

Service url: http://lottery.synerset.com:8000

| ENDPOINT | METHOD | REQUEST | RESPONSE | FUNCTION |
|:---------------:|:------:|:------------------------:|:--------:|:--------------------------------:|
| api/v1/receiver | POST | JSON BODY (typedNumbers) | JSON | inputs 6 distinct typed numbers |
| api/v1/results | GET | PARAM (requestUuid) | JSON | retrieves lottery results for ID |
| ENDPOINT | METHOD | REQUEST | RESPONSE | FUNCTION |
|:---------------------:|:------:|:------------------------:|:--------:|:--------------------------------:|
| api/v1/numbers | POST | JSON BODY (typedNumbers) | JSON | inputs 6 distinct typed numbers |
| api/v1/results/{uuid} | GET | PATH VARIABLE (uuid) | JSON | retrieves lottery results for ID |


POSTMAN CURL's:<br>

**/receiver**<br>
```
curl --location --request POST 'http://lottery.synerset.com:8000/api/v1/receiver' \
curl --location --request POST 'http://lottery.synerset.com:8000/api/v1/numbers' \
--header 'Content-Type: application/json' \
--data-raw '{
"typedNumbers" : [11,22,33,44,55,66]
Expand All @@ -112,7 +112,7 @@ curl --location --request POST 'http://lottery.synerset.com:8000/api/v1/receiver

**/results**<br>
```
curl --location --request GET 'http://lottery.synerset.com:8000/api/v1/results?requestUuid=0046308c-408f-4fca-9668-6e5941e846f9'
curl --location --request GET 'http://lottery.synerset.com:8000/api/v1/results/0046308c-408f-4fca-9668-6e5941e846f9'
```

## License
Expand Down

0 comments on commit 2d0250e

Please sign in to comment.