Becky_Powell | 2022-01-28 20:09:23 UTC | #1
Description
The URI for workitem endpoints contained the id of the workitems worktype: /api/v2/taskmanagement/worktypes/{worktypeId}/workitems/{id}
The worktype id is being removed from workitem URIs: /api/v2/taskmanagement/workitems/{id}
Change Category
API
Change Context
- The way to read this endpoint in restful is “a Worktype with ID x contains a Workitem with ID y”, which is not true in our model. A Worktype is a way to classify Workitems, but Workitems are not “nested” resources of Worktypes. 2. The justification for that design during the PR review was: as the “worktypeId” is not going to change, it should be in the URL. This is not a correct restful design principle. Just because an attribute is not going to change it doesn’t mean it has a “contains” relationship with the target resource. 3. This design also brings an additional disadvantage of having to know the Worktype ID in order to access the Workitem, which is not practical.
Change Impact
No impact. The endpoints aren't in use yet.
Date of Change
Jan 27, 2022
Impacted APIs
- POST /api/v2/taskmanagement/worktypes/{{worktypeId}}/workitems
- GET /api/v2/taskmanagement/worktypes/{{worktypeId}}/workitems/{id}
- PATCH /api/v2/taskmanagement/worktypes/{{worktypeId}}/workitems/{id}
- DELETE /api/v2/taskmanagement/worktypes/{{worktypeId}}/workitems/{id}
References
WORKITEMS-368
system | 2022-02-28 20:09:35 UTC | #2
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13379