Allow managing the new EHR.folders from the REST API

Description

Current REST API spec can operate over EHR.directory by using the directory endpoints or by using the contribution endpoints (committing a folder in POST /contributions would affect only EHR.directory, note this is not explicitly said in the specs! but is a reasonable guess). Then the new EHR.folders association was added to the RM but the REST API wasn't updated to be able to manage such association. Since that association has many FOLDER, I think the endpoints to manage items there should be based on the UIDs of the FOLDERs, since for those it's difficult to assure will have unique names or paths. Another problem related to the POST /contribution is: if there are two VERSIONs in the CONTRIBUTION and both have VERSION.data being FOLDER, if those FOLDERs are meant to modify EHR.directory, then that situation is not allowed, because the CONTRIBUTION should be applied to the EHR as one change, and if there are two changes for the same resource then sequential changes should be prohibited. If sequential updates are allowed within the same CONTRIBUTION, we need an extra field to state in which order those operations should be applied, this complicates things a lot!

PR is addressed in

Activity

Show:

Details

Reporter

Components

Affects versions

Priority

Created February 21, 2023 at 3:41 PM
Updated February 23, 2023 at 10:23 AM

Flag notifications