Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #%RAML 0.8
- baseUri: http://ehealth.enovation.nl/api/{version}#%RAML 0.8
- title: eHealth
- version: v1
- securedBy: []
- schemas:
- - caregiver: |
- {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "id": "http://jsonschema.net",
- "type": "object",
- "properties": {
- "id": {
- "id": "http://jsonschema.net/id",
- "type": "integer"
- },
- "opt": {
- "id": "http://jsonschema.net/opt",
- "type": "integer"
- },
- "caregivertype": {
- "id": "http://jsonschema.net/caregivertype",
- "type": "object",
- "properties": {
- "id": {
- "id": "http://jsonschema.net/caregivertype/id",
- "type": "integer"
- },
- "type": {
- "id": "http://jsonschema.net/caregivertype/type",
- "type": "string"
- }
- }
- },
- "profile": {
- "id": "http://jsonschema.net/profile",
- "type": "object",
- "properties": {
- "id": {
- "id": "http://jsonschema.net/profile/id",
- "type": "integer"
- },
- "name": {
- "id": "http://jsonschema.net/profile/name",
- "type": "string"
- },
- "surname": {
- "id": "http://jsonschema.net/profile/surname",
- "type": "string"
- },
- "email": {
- "id": "http://jsonschema.net/profile/email",
- "type": "string"
- },
- "dateOfBirth": {
- "id": "http://jsonschema.net/profile/dateOfBirth",
- "type": "string"
- },
- "address": {
- "id": "http://jsonschema.net/profile/address",
- "type": "string"
- },
- "passageId": {
- "id": "http://jsonschema.net/profile/passageId",
- "type": "string"
- },
- "type": {
- "id": "http://jsonschema.net/profile/type",
- "type": "string"
- }
- }
- },
- "type": {
- "id": "http://jsonschema.net/type",
- "type": "string"
- }
- },
- "required": [
- "id",
- "opt",
- "caregivertype",
- "profile",
- "type"
- ]
- }
- - patient: |
- {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "id": "http://jsonschema.net",
- "type": "object",
- "properties": {
- "id": {
- "id": "http://jsonschema.net/id",
- "type": "integer"
- },
- "bsn": {
- "id": "http://jsonschema.net/bsn",
- "type": "string"
- },
- "profile": {
- "id": "http://jsonschema.net/profile",
- "type": "object",
- "properties": {
- "id": {
- "id": "http://jsonschema.net/profile/id",
- "type": "integer"
- },
- "name": {
- "id": "http://jsonschema.net/profile/name",
- "type": "string"
- },
- "surname": {
- "id": "http://jsonschema.net/profile/surname",
- "type": "string"
- },
- "email": {
- "id": "http://jsonschema.net/profile/email",
- "type": "string"
- },
- "dateOfBirth": {
- "id": "http://jsonschema.net/profile/dateOfBirth",
- "type": "string"
- },
- "address": {
- "id": "http://jsonschema.net/profile/address",
- "type": "string"
- },
- "passageId": {
- "id": "http://jsonschema.net/profile/passageId",
- "type": "string"
- },
- "type": {
- "id": "http://jsonschema.net/profile/type",
- "type": "string"
- }
- }
- },
- "type": {
- "id": "http://jsonschema.net/type",
- "type": "string"
- }
- },
- "required": [
- "id",
- "bsn",
- "profile",
- "type"
- ]
- }
- #Niet de profiel pagina maar de acties wat de profiel pagina moet doen
- /profile:
- displayName:
- description:
- put:
- description: Create user, can be a Caregiver or Patient.
- body:
- application/json:
- schema: patient
- example: |
- {
- "idcaregiver":"212",
- "opt":"1",
- "profile":{
- "idprofile":"454",
- "name":"Jan",
- "surname":"Jansen",
- "email":"j.jansen@example.com",
- "date_of_birth":"29-02-1980",
- "address":"Sesamstraat",
- "passageid":"DF7D8SF687DSVG8DA77",
- "type":"caregiver"
- },{
- "caregivertype":[{
- "idcaregivertype":"4",
- "type":"Huisarts"
- },{
- "idcaregivertype":"26",
- "type":"dieetist"
- }]
- }
- responses:
- 200:
- description: Responds with a success message and returns the created object.
- body:
- application/json:
- example: |
- {
- "message":"user created successfully"
- "data":{
- "idcaregiver":"212",
- "opt":"1",
- "profile":{
- "idprofile":"454",
- "name":"Jan",
- "surname":"Jansen",
- "email":"j.jansen@example.com",
- "date_of_birth":"29-02-1980",
- "address":"Sesamstraat",
- "passageid":"DF7D8SF687DSVG8DA77",
- "type":"caregiver"
- },{
- "caregivertype":[{
- "idcaregivertype":"4",
- "type":"Huisarts"
- },{
- "idcaregivertype":"26",
- "type":"dieetist"
- }]
- }
- }
- /{profileid}:
- get:
- description: Show user
- responses:
- 200:
- description: Returns the user with the profileid.
- body:
- application/json:
- schema: caregiver
- example: |
- {
- "idcaregiver":"212",
- "opt":"1",
- "profile":{
- "idprofile":"454",
- "name":"Jan",
- "surname":"Jansen",
- "email":"j.jansen@example.com",
- "date_of_birth":"29-02-1980",
- "address":"Sesamstraat",
- "passageid":"DF7D8SF687DSVG8DA77",
- "type":"caregiver"
- },
- "caregivertype":[{
- "idcaregivertype":"4",
- "type":"Huisarts"
- },{
- "idcaregivertype":"26",
- "type":"dieetist"
- }]
- }
- 404:
- description: User with the profileid not found.
- body:
- application/json:
- example: |
- {"message":"Profile not found"}
- post:
- description: Edit user
- body:
- application/json:
- schema:
- caregiver
- example: |
- {
- "idcaregiver":"212",
- "opt":"1",
- "profile":{
- "idprofile":"454",
- "name":"Jan",
- "surname":"Jansen",
- "email":"j.jansen@example.com",
- "date_of_birth":"29-02-1980",
- "address":"Sesamstraat",
- "passageid":"DF7D8SF687DSVG8DA77",
- "type":"caregiver"
- },
- "caregivertype":[{
- "idcaregivertype":"4",
- "type":"Huisarts"
- },{
- "idcaregivertype":"26",
- "type":"dieetist"
- }]
- }
- delete:
- description: Delete user
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement