amarbajric / EBUSA-AIM17

BPMaaS. Platform for buying, selling and reviewing processes
MIT License
2 stars 3 forks source link

Store service #30 - Create Orga & Get AvgRatingAndCount #121

Closed amarbajric closed 6 years ago

amarbajric commented 6 years ago

DONE

Create org. POST http://localhost:10000/api/store/process/create JSON Body

{
        "processName": "TestProcess",
        "processDescription": "Description of a process",
        "processCreator": "set the username of the user",
        "processPrice": 222.222
}

JSON Response

{
    "processId": 1,
    "processName": "TestProcess",
    "processDescription": "Description of a process",
    "processCreator": "set the username of the user",
    "processCreatedAt": 1530045995095,
    "processVersion": 1,
    "processPrice": 222.222,
    "processApprover": null,
    "processApproverComment": null,
    "processApproved": false,
    "processApprovedDate": null
}

Get average rating and number of ratings for a specific process GET http://localhost:10000/api/store/processRating/<processId>/getAverageAndCount JSON Response

{
    "numberOfRatings": 2,
    "averageRating": 3.5
}