-
Notifications
You must be signed in to change notification settings - Fork 0
Persons
RESTful protocol for Persons.
The following Foreign Key apply:
persons.inst_id : Foreign Key to Installations
GET /api/inst_id?=inst_id | show
Fetches the Persons of an Installation using the query parameter inst_id.
Consumes: Route
Produces: JSON
GET /api/pers_id/{pers-id} | show
Fetches the properties of the Person and other included entities (names, ids)
Consumes: Route
Produces: JSON
{ "success": true, "message": "Person retrieved successfully", "size": 1, "data": [ { "_id": { "$oid": "4ff5bca7e4b0082c63d08dfa" }, "name": "Person 1", "type": "Family", "description": "Person description", "inst_id": "4ff5bca7e4b0082c63d08df7" } ] }
POST /api/pers | create
Creates a new Person based on the things added in the form.
Consumes: Route, JSON
{ name: "Person 1", type : "Family", description : "Person description", inst_id: "4ff5bb0ee4b0b73027c86680" }
Produces: JSON
PUT /api/pers/{pers-id} | update
Updates the properties of the Person after editing.
Consumes: Route, JSON
Produces: JSON with update status
DELETE /api/pers/{pers-id} | delete
Deletes the existing Person.
Consumes: Route
Produces: Delete status