Description
As of now we have separate endpoints for creating timeline and milestone entities which becomes very time consuming when front end tries to create a timeline for an entity e.g. when we are trying to create timeline for a project phase, we have all milestone templates but when we want to create a timeline using those templates, we have to send one request for creating timeline object and then send multiple requests to create milestone for each of the milestone template. We want to reduce that over head by introducing a new endpoint in the project service which can do all of that operations in single call. Currently we have two solutions:
- Add new endpoint to support bulk milestones e.g.
POST /v4/timelines/1234/milestones/createBulk
- Update existing endpoint to create template with milestones e.g.
/v4/timelines
to support specifying the milestone in the payload. - Accept a new field
templateId
inPOST /v4/timelines
and create all the milestones which have theproductTemplateId === templateId
.
We are inclining towards 2. However, we are still open for any suggestion for handling it in a better way.
We have opted for 3 to make things consistent and easy to understand.