Fabio Mancinelli wrote:
> Vincent Massol wrote:
> 
> 
>> Note that I don't know what are the REST best practices. I'm jut  
>> noticing the inconsistency.
>>
> 
> Ok. I saw what you meant.
> I modified a bit the resources to remove the inconsistency.
> I did this because attachments have also their own versioning.
> So you can access a specific version of an attachment either by
> requesting an attachment at a given page version
> or by requesting an specific version of an attachment.
> 
> To be consistent I only left the resources for referring to an
> attachment starting for a given page version:
> 
> /space/{space}/pages/{page}/attachments
> /space/{space}/pages/{page}/attachments/{attachment}
> /space/{space}/pages/{page}/{version}/attachments/
> /space/{space}/pages/{page}/{version}/attachments/{attachment}
> 
> I still maintained the non-verbose version but that can be changed if
> there is not an agreement on it.
> 
> 
> However it might be still useful to expose attachment resources by using
> their own versioning:
> 
> /space/{space}/pages/{page}/attachments/{attachment}/history
> /space/{space}/pages/{page}/attachments/{attachment}/{version}

+1 for both (verbose):


/space/{space}/pages/{page}/history/{version}/attachments/{attachment}
/space/{space}/pages/{page}/attachments/{attachment}/history/{version}

But this should not work:

/space/{space}/pages/{page}/history/{version}/attachments/{attachment}/history/{version}

Since we either want to see all the versions of the attachment, or the 
attachment variant used in a certain version of the document.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to