Closed shirey closed 1 month ago
Updated the original story to remove returning Sources of Samples too because Samples won't be associated with multiple (array/list) of Sources like a Dataset.
@maxsibilla - can I get an example of the updated return value when you get a chance?
@maxsibilla - can I get an example of the updated return value when you get a chance?
@jpuerto-psc we will get this onto dev today so you can see it in action but the property is called sources
and will return the base properties of that entity:
"sources": [
{
"created_by_user_displayname": "Test User",
"created_by_user_email": "testuser@pitt.edu",
"created_by_user_sub": "cd17bfa7-24fd-49ca-82ec-2d456ba53730",
"created_timestamp": 1681831457448,
"data_access_level": "consortium",
"description": "Cypress automated description source",
"entity_type": "Source",
"group_name": "University of Pittsburgh TMC",
"group_uuid": "28db7a2b-ed8a-11ec-8b0a-9fe9b51132b1",
"lab_source_id": "Aorta",
"last_modified_timestamp": 1718896345351,
"last_modified_user_displayname": "Test User",
"last_modified_user_email": "testuser@pitt.edu",
"last_modified_user_sub": "cd17bfa7-24fd-49ca-82ec-2d456ba53730",
"metadata": "{}",
"sennet_id": "SNT456.NJFC.364",
"source_type": "Human",
"uuid": "34fb81da75a5386d406a7b1835d92bdd"
}
],
@maxsibilla CC: @shirey - what is the expectation if there are multiple sources? Is it safe to assume that all objects in the sources
array will share the same source_type
?
From @maxsibilla
We will need to return
source
on Samples from the Entity API as wellNot
sources
just to be clear
Add a new derived (transient/generated/immutable created by an on_read trigger) attribute,
sources
which contains an array/list of all Sources associated with Datasets returned from the standardGET /entities/<id>
endpoint. The array/list of Sources will contain one element/object for each associated Source with each element containing all of the standard attributes returned with aGET
of a Source. The newsources
field should only be added to returnedDatasets