InfoCommons / cic

Apache License 2.0
0 stars 0 forks source link

REST API for People #93

Closed sg3847 closed 1 year ago

sg3847 commented 2 years ago

Implement the following API endpoints for people:

  1. GET /people - Get list of all people
  2. POST /people - Create a new person
  3. GET /people/{id} - Get a person
  4. PATCH, /people/{id} - Update person metadata for a given id
  5. DELETE /people/{id} - Remove a person

JSON payload for POST and PUT: { "data": { "type": "", "id": null, "attributes": { "first_name": "", "last_name": "", "orcid": "", "emails": "", "private_emails": "", "keywords": "" }, "relationships": { "affiliations": { "data": [ { "type": "Organization", "id": null } ] } } } } E.g. { "data": { "type": "Person", "id": 3, "attributes": { "first_name": "Betty", "last_name": "Bunn", "orcid": "0000-0002-1825-0190", "emails": "BettyGBunn@jourrapide.com", "private_emails": "RichardEHall@jourrapide.com,MaryLJoiner@armyspy.com", "keywords": "['cors', 'world']" }, "relationships": { "affiliations": { "data": [ { "type": "Organization", "id": "1" } ] } } } }