Build new endpoint to apply a template
Related to #875 (closed).
A new endpoint ApplyProcessTemplate
must be exposed as POST
/api/v1/dataimport/<template_id>
, requesting for the user another Dataimport
id
in the body (that's tthe target).
That endpoint must check that the user has required contributor rights on both dataimports, and then:
- set the
template
field on the target - copy all worker runs from the template onto the field
- raise a 403 if a template is already set on the target