Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.03 KB | None | 0 0
  1. #%RAML 0.8
  2. baseUri: http://ehealth.enovation.nl/api/{version}#%RAML 0.8
  3. title: eHealth
  4. version: v1
  5. securedBy: []
  6.  
  7. schemas:
  8. - caregiver: |
  9. {
  10. "$schema": "http://json-schema.org/draft-04/schema#",
  11. "id": "http://jsonschema.net",
  12. "type": "object",
  13. "properties": {
  14. "id": {
  15. "id": "http://jsonschema.net/id",
  16. "type": "integer"
  17. },
  18. "opt": {
  19. "id": "http://jsonschema.net/opt",
  20. "type": "integer"
  21. },
  22. "caregivertype": {
  23. "id": "http://jsonschema.net/caregivertype",
  24. "type": "object",
  25. "properties": {
  26. "id": {
  27. "id": "http://jsonschema.net/caregivertype/id",
  28. "type": "integer"
  29. },
  30. "type": {
  31. "id": "http://jsonschema.net/caregivertype/type",
  32. "type": "string"
  33. }
  34. }
  35. },
  36. "profile": {
  37. "id": "http://jsonschema.net/profile",
  38. "type": "object",
  39. "properties": {
  40. "id": {
  41. "id": "http://jsonschema.net/profile/id",
  42. "type": "integer"
  43. },
  44. "name": {
  45. "id": "http://jsonschema.net/profile/name",
  46. "type": "string"
  47. },
  48. "surname": {
  49. "id": "http://jsonschema.net/profile/surname",
  50. "type": "string"
  51. },
  52. "email": {
  53. "id": "http://jsonschema.net/profile/email",
  54. "type": "string"
  55. },
  56. "dateOfBirth": {
  57. "id": "http://jsonschema.net/profile/dateOfBirth",
  58. "type": "string"
  59. },
  60. "address": {
  61. "id": "http://jsonschema.net/profile/address",
  62. "type": "string"
  63. },
  64. "passageId": {
  65. "id": "http://jsonschema.net/profile/passageId",
  66. "type": "string"
  67. },
  68. "type": {
  69. "id": "http://jsonschema.net/profile/type",
  70. "type": "string"
  71. }
  72. }
  73. },
  74. "type": {
  75. "id": "http://jsonschema.net/type",
  76. "type": "string"
  77. }
  78. },
  79. "required": [
  80. "id",
  81. "opt",
  82. "caregivertype",
  83. "profile",
  84. "type"
  85. ]
  86. }
  87. - patient: |
  88. {
  89. "$schema": "http://json-schema.org/draft-04/schema#",
  90. "id": "http://jsonschema.net",
  91. "type": "object",
  92. "properties": {
  93. "id": {
  94. "id": "http://jsonschema.net/id",
  95. "type": "integer"
  96. },
  97. "bsn": {
  98. "id": "http://jsonschema.net/bsn",
  99. "type": "string"
  100. },
  101. "profile": {
  102. "id": "http://jsonschema.net/profile",
  103. "type": "object",
  104. "properties": {
  105. "id": {
  106. "id": "http://jsonschema.net/profile/id",
  107. "type": "integer"
  108. },
  109. "name": {
  110. "id": "http://jsonschema.net/profile/name",
  111. "type": "string"
  112. },
  113. "surname": {
  114. "id": "http://jsonschema.net/profile/surname",
  115. "type": "string"
  116. },
  117. "email": {
  118. "id": "http://jsonschema.net/profile/email",
  119. "type": "string"
  120. },
  121. "dateOfBirth": {
  122. "id": "http://jsonschema.net/profile/dateOfBirth",
  123. "type": "string"
  124. },
  125. "address": {
  126. "id": "http://jsonschema.net/profile/address",
  127. "type": "string"
  128. },
  129. "passageId": {
  130. "id": "http://jsonschema.net/profile/passageId",
  131. "type": "string"
  132. },
  133. "type": {
  134. "id": "http://jsonschema.net/profile/type",
  135. "type": "string"
  136. }
  137. }
  138. },
  139. "type": {
  140. "id": "http://jsonschema.net/type",
  141. "type": "string"
  142. }
  143. },
  144. "required": [
  145. "id",
  146. "bsn",
  147. "profile",
  148. "type"
  149. ]
  150. }
  151. #Niet de profiel pagina maar de acties wat de profiel pagina moet doen
  152. /profile:
  153. displayName:
  154. description:
  155.  
  156. put:
  157. description: Create user, can be a Caregiver or Patient.
  158. body:
  159. application/json:
  160. schema: patient
  161. example: |
  162. {
  163. "idcaregiver":"212",
  164. "opt":"1",
  165. "profile":{
  166. "idprofile":"454",
  167. "name":"Jan",
  168. "surname":"Jansen",
  169. "email":"j.jansen@example.com",
  170. "date_of_birth":"29-02-1980",
  171. "address":"Sesamstraat",
  172. "passageid":"DF7D8SF687DSVG8DA77",
  173. "type":"caregiver"
  174. },{
  175. "caregivertype":[{
  176. "idcaregivertype":"4",
  177. "type":"Huisarts"
  178. },{
  179. "idcaregivertype":"26",
  180. "type":"dieetist"
  181. }]
  182. }
  183.  
  184. responses:
  185. 200:
  186. description: Responds with a success message and returns the created object.
  187. body:
  188. application/json:
  189. example: |
  190. {
  191. "message":"user created successfully"
  192. "data":{
  193. "idcaregiver":"212",
  194. "opt":"1",
  195. "profile":{
  196. "idprofile":"454",
  197. "name":"Jan",
  198. "surname":"Jansen",
  199. "email":"j.jansen@example.com",
  200. "date_of_birth":"29-02-1980",
  201. "address":"Sesamstraat",
  202. "passageid":"DF7D8SF687DSVG8DA77",
  203. "type":"caregiver"
  204. },{
  205. "caregivertype":[{
  206. "idcaregivertype":"4",
  207. "type":"Huisarts"
  208. },{
  209. "idcaregivertype":"26",
  210. "type":"dieetist"
  211. }]
  212. }
  213. }
  214. /{profileid}:
  215. get:
  216. description: Show user
  217. responses:
  218. 200:
  219. description: Returns the user with the profileid.
  220. body:
  221. application/json:
  222. schema: caregiver
  223. example: |
  224. {
  225. "idcaregiver":"212",
  226. "opt":"1",
  227. "profile":{
  228. "idprofile":"454",
  229. "name":"Jan",
  230. "surname":"Jansen",
  231. "email":"j.jansen@example.com",
  232. "date_of_birth":"29-02-1980",
  233. "address":"Sesamstraat",
  234. "passageid":"DF7D8SF687DSVG8DA77",
  235. "type":"caregiver"
  236. },
  237. "caregivertype":[{
  238. "idcaregivertype":"4",
  239. "type":"Huisarts"
  240. },{
  241. "idcaregivertype":"26",
  242. "type":"dieetist"
  243. }]
  244. }
  245. 404:
  246. description: User with the profileid not found.
  247. body:
  248. application/json:
  249. example: |
  250. {"message":"Profile not found"}
  251. post:
  252. description: Edit user
  253. body:
  254. application/json:
  255. schema:
  256. caregiver
  257. example: |
  258. {
  259. "idcaregiver":"212",
  260. "opt":"1",
  261. "profile":{
  262. "idprofile":"454",
  263. "name":"Jan",
  264. "surname":"Jansen",
  265. "email":"j.jansen@example.com",
  266. "date_of_birth":"29-02-1980",
  267. "address":"Sesamstraat",
  268. "passageid":"DF7D8SF687DSVG8DA77",
  269. "type":"caregiver"
  270. },
  271. "caregivertype":[{
  272. "idcaregivertype":"4",
  273. "type":"Huisarts"
  274. },{
  275. "idcaregivertype":"26",
  276. "type":"dieetist"
  277. }]
  278. }
  279. delete:
  280. description: Delete user
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement