|
Hi Folks,
I have been going through the REST mailing during the last couple of
days to get some pointers on deigning URI for a work manager style
application. I have identified the following resources
workItems - collection of all workItems
workLists - collection of work item lists for role or participant
roles - list of all roles in a domain
participants - list of all participants in a domain.
I am in the process of identifying appropriate URIs for the systems
and have come up with the following.
create a work item: post /workItems
get a work item: get /workItems/<workItemId>
edit a work item: post /workItems/<workItemId>
accept work item: put /workItems/workItemId>/state
abort work item: put /workItems/<workItemId>/state
complete work item: put /workItems/<workItemId>/state
restart work item: put /workItems/<workItemId>/state
reassign work item: put /workItems/<workItemId>/state
save work item: put /workItems/<workItemId>/data
get work item history: get /workItems/<workItemId>/history
get my work list: get /workLists/myWorkList
get work list for participant: get /workLists/<participantName>
get work list for role: get /workLists/<roleName>
Can anyone provide feedback on the URIs since this is my first
iteration and I have struggled whether to use POST or PUT for
subsequent modifications to a resource. From my understanding I should
be using POST for partial representations and PUT for complete
representation. In the case of 'edit work item' i use a post because I
will not be passing back the complete representation of the resource.
Is this correct or am I whistling in the wind?
cheers
</jima>
|