seek4science / seek

For finding, sharing and exchanging Data, Models, Simulations and Processes in Science.
http://www.seek4science.org
BSD 3-Clause "New" or "Revised" License
77 stars 52 forks source link

Custom metadata in API #981

Open alaninmcr opened 2 years ago

alaninmcr commented 2 years ago

The API needs to cope with (possible) custom metadata being associated with a resource.

Custom metadata is probably not mature enough for this to be done now. However it should be handled when appropriate

stuzart commented 2 years ago

it's not that it is not mature, but was dependant upon the samples api being developed first

alaninmcr commented 2 years ago

Can now output:

{ "data": { "id": "4", "type": "studies", "attributes": { "policy": { "access": "no_access", "permissions": [] }, "discussion_links": [], "custom_metadata": { "id": "432", "study_start_date": "2022-07-12", "study_end_date": "2022-07-29", "contact_institution": "UNIMAN", "geographic_location_country": "UK", "experimental_site_name": "Bobble", "latitude": "", "longitude": "", "altitude": "", "description_of_the_experimental_design": "This is a description", "type_of_experimental_design": "", "observation_unit_level_hierarchy": "", "observation_unit_description": "OU description", "description_of_growth_facility": "Growth facility description", "type_of_growth_facility": "", "cultural_practices": "" }, "snapshots": [], "title": "Zymo sequencing reference set", "description": "A nanopore sequencing run by Zymo", "experimentalists": null, "other_creators": null, "position": null, "creators": [] },

alaninmcr commented 2 years ago

@stuzart You are right that the ability to specify the types of custom metadata should be limited to trustworthy people (which should rule me out). Ordinary users shouldn't be able to specify the types.