InfoCommons / cic

Apache License 2.0
0 stars 0 forks source link

REST API for Grants #53

Closed ryscher closed 1 year ago

ryscher commented 2 years ago

Implement the following API endpoints for grants:

GET /grants - Get list of all grants POST /grants - Create a new grant GET /grants/{id} - Get a grant PATCH /grants/{id} - Update a grant metadata for a given id DELETE /grants/{id} - Remove a grant JSON payload for POST and PUT: { "data": { "type": "Grant", "id": null, "attributes": { "program_reference_codes": [], "funder_divisions": [], "keywords": [], "award_id": "", "title": "", "start_date": null, "end_date": null, "award_amount": null, "abstract": "", }, "relationships": { "principal_investigator": { "data": { "type": "Person", "id": null } }, "funder": { "data": { "type": "Funder", "id": null, } } } } } E.g. { "data": { "type": "Grant", "id": 3, "attributes": { "program_reference_codes": [], "keywords": [ "research", " covid" ], "funder_divisions": [ "Division of Biological Infrastructure" ], "award_id": "2124825", "title": "Collection and Archiving of Vital Data on COVID-19 Vaccine Distribution", "start_date": "2022-01-01", "end_date": "2023-01-01", "award_amount": 550000, "abstract": "Vaccines that are effective at protecting against COVID-19 were first approved for emergency use in the United States in December, 2020. Since that time, as vaccine supply has steadily increased, vaccines have been distributed to states in phases through a variety of channels, including hospitals, pharmacies, nursing homes, public health departments, and mass vaccination sites in an effort to vaccinate as many citizens as possible to reduce morbidity and mortality. Distributing and administering a vaccine on a large scale over a short time period, particularly under extraordinary cold storage requirements, is a challenging and complex logistical problem. This Rapid Response Research (RAPID) grant supports the collection of time-sensitive data on COVID-19 vaccine distribution and administration from the Centers for Disease Control and Prevention (CDC) and a select number of state public health departments. The collection and archiving of time-sensitive data on the vaccination effort in the US will assist researchers in studying the distribution and enable a more efficient response to future pandemics or natural or man-made disasters." }, "relationships": { "principal_investigator": { "data": { "type": "Person", "id": 3 } }, "other_investigators": { "data": [ { "type": "Person", "id": 1 }, { "type": "Person", "id": 2 } ] }, "program_officials": { "data": [ { "type": "Person", "id": 1 } ] }, "awardee_organization": { "data": { "type": "Organization", "id": 1 } }, "funder": { "data": null } } } } }