Skip to content

RIP_Framework

Hasitha Lakmal edited this page Sep 19, 2016 · 14 revisions

RIP_Framework Rest API Description

In hear you will have REST API details

User Management

User Registration Service

  • End Point - http://localhost:8084/RIP_Framework/user
  • HTTP Method - POST
  • Sample Message Body - { "user_name": "lakmal", "password": "abc", "mobile": 717584227, "emial": "ghasithalakmal@gmail.com" }
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -{ "serverUsed": "localhost/127.0.0.1:27017", "connectionId": 43, "n": 0, "syncMillis": 0, "writtenTo": null, "err": null, "ok": 1 }

User Update Service

  • End Point - http://localhost:8084/RIP_Framework/user
  • HTTP Method - PUT
  • Sample Message Body - { "user_name": "hasitha", "password": "abc", "mobile": 717584227, "adress" : "aaaaab", "emial": "ghasithalakmal@gmail.com" }
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -{ "serverUsed": "localhost/127.0.0.1:27017", "connectionId": 44, "updatedExisting": true, "n": 1, "syncMillis": 0, "writtenTo": null, "err": null, "ok": 1 }

User Delete Service

  • End Point - http://localhost:8084/RIP_Framework/user/{user_name}
  • HTTP Method - DELETE
  • Sample Message Body -
  • consumer content Type -
  • Producer content Type - Application/JSON
  • Sample Output - { "serverUsed": "localhost/127.0.0.1:27017", "connectionId": 48, "n": 1, "syncMillis": 0, "writtenTo": null, "err": null, "ok": 1 }

User Delete Service

  1. if User Exist { "_id": { "$oid": "57d89d8c442cddf10714b4d1" }, "user_name": "hasitha", "password": "abc", "mobile": 717584227, "adress": "aaaaab", "emial": "ghasithalakmal@gmail.com" }

  2. if User dose not Exist { "user_name": null }


Select All Users Service

  • End Point - http://localhost:8084/RIP_Framework/user
  • HTTP Method - GET
  • Sample Message Body -
  • consumer content Type -
  • Producer content Type - Application/JSON
  • Sample Output - [ { "_id": { "time": 1473813900000, "new": false, "inc": 118797521, "timeSecond": 1473813900, "machine": 1143791089 }, "user_name": "hasitha", "password": "abc", "mobile": 717584227, "adress": "aaaaab", "emial": "ghasithalakmal@gmail.com" }, { "_id": { "time": 1473817933000, "new": false, "inc": -1184427447, "timeSecond": 1473817933, "machine": 1143756246 }, "user_name": "lakmal", "password": "abc", "mobile": 717584227, "emial": "ghasithalakmal@gmail.com" } ]

Project Management

Project Registration Service

  • End Point - http://localhost:8084/RIP_Framework/project
  • HTTP Method - POST
  • Sample Message Body -{ "project_name": "testapp123", "user_name": "ghasithalakmal@gmail.com", "version": "1.2.3", "date_time": "2015-05-05 22:21:02" }
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -{ "serverUsed": "localhost/127.0.0.1:27017", "connectionId": 39, "n": 0, "syncMillis": 0, "writtenTo": null, "err": null, "ok": 1 }

Project Deletion Service

  • End Point - http://localhost:8084/RIP_Framework/project/{projectName}/{version}
  • HTTP Method - DELETE
  • Sample Message Body -
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -{ "serverUsed": "localhost/127.0.0.1:27017", "connectionId": 40, "n": 1, "syncMillis": 0, "writtenTo": null, "err": null, "ok": 1 }

Project Selection Service

  • End Point - http://localhost:8084/RIP_Framework/project/{projectName}/{version}
  • HTTP Method - GET
  • Sample Message Body -
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -{ "_id": { "$oid": "57d9440c442c5a96c91b40b5" }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.1.1", "date_time": "2015-05-05 22:21:02" }

Project Select All Versions of Project Service

  • End Point - http://localhost:8084/RIP_Framework/project/{projectName}
  • HTTP Method - GET
  • Sample Message Body -
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -[ { "_id": { "time": 1473856500000, "new": false, "timeSecond": 1473856500, "machine": 1143757462, "inc": -920960847 }, "project_name": "app1", "user_name": "ghasithalakmal@gmail.com", "version": "1.0.0", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856519000, "new": false, "timeSecond": 1473856519, "machine": 1143757462, "inc": -920960844 }, "project_name": "app1", "user_name": "ghasithalakmal@gmail.com", "version": "1.0.1", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856524000, "new": false, "timeSecond": 1473856524, "machine": 1143757462, "inc": -920960843 }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.1.1", "date_time": "2015-05-05 22:21:02" } ]

Project Selection According to Users Service

  • End Point - http://localhost:8084/RIP_Framework/project-by-user/{userName}
  • HTTP Method - GET
  • Sample Message Body -
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -[ { "_id": { "time": 1473856519000, "new": false, "timeSecond": 1473856519, "machine": 1143757462, "inc": -920960844 }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.0.1", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856524000, "new": false, "timeSecond": 1473856524, "machine": 1143757462, "inc": -920960843 }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.1.1", "date_time": "2015-05-05 22:21:02" } ]

Project Selection (ALL) Service

  • End Point - http://localhost:8084/RIP_Framework/project
  • HTTP Method - GET
  • Sample Message Body -
  • consumer content Type - Application/JSON
  • Producer content Type - Application/JSON
  • Sample Output -[ { "_id": { "time": 1473856500000, "new": false, "timeSecond": 1473856500, "machine": 1143757462, "inc": -920960847 }, "project_name": "app1", "user_name": "ghasithalakmal@gmail.com", "version": "1.0.0", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856505000, "new": false, "timeSecond": 1473856505, "machine": 1143757462, "inc": -920960846 }, "project_name": "app2", "user_name": "ghasithalakmal@gmail.com", "version": "1.0.0", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856509000, "new": false, "timeSecond": 1473856509, "machine": 1143757462, "inc": -920960845 }, "project_name": "app3", "user_name": "ghasithalakmal@gmail.com", "version": "1.0.0", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856519000, "new": false, "timeSecond": 1473856519, "machine": 1143757462, "inc": -920960844 }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.0.1", "date_time": "2015-05-05 22:21:02" }, { "_id": { "time": 1473856524000, "new": false, "timeSecond": 1473856524, "machine": 1143757462, "inc": -920960843 }, "project_name": "app1", "user_name": "ghasithalakmal", "version": "1.1.1", "date_time": "2015-05-05 22:21:02" } ]