hubmapconsortium / entity-api

A set of web service calls to return information about HuBMAP entities
https://entity.api.hubmapconsortium.org
MIT License
3 stars 1 forks source link

Expose `creation_action` attribute from activity on Dataset GET #551

Closed shirey closed 7 months ago

shirey commented 9 months ago

On a GET /entities/<dataset id> call, when getting the information for a Dataset entity include the creation_action in the response. Unlike all other Dataset attributes creation_action is stored in the associated action that represents the creation of that dataset (associated via the ACTIVITY_OUTPUT relationship).

An example Neo4j query that will return the creation_action for a Dataset, given the Dataset UUID is:

match (ds {uuid:'<dataset uuid>'})<-[:ACTIVITY_OUTPUT]-(a:Activity) return a.creation_action;
ChuckKollar commented 7 months ago

Using entity_dict['creation_action_activity'] as Entities.Dataset already has a 'creation_action' property which is processed in a different manner see 'provenance_schema.yaml'.

ChuckKollar commented 7 months ago

Also for Publication.