Location: CellService.editCell

Discussion: Default RevisionReported This is a featured thread

Showing 3 posts

wishpot
Default Revision
Nov 18 2008, 8:44 PM EST | Post edited: Nov 18 2008, 8:44 PM EST
If you edit a non-existent cell, it creates the cell for you. If I do this, what should I set cell.currentRevision.version to? Zero... one... something else? (It's listed as required)

I prefer the editCell function to createCell because I'd like to be able to create and initialize a cell with one call.
Do you find this valuable?    
Keyword tags: None
boe_wetpaint
boe_wetpaint
1. RE: Default Revision
Nov 18 2008, 8:59 PM EST | Post edited: Nov 18 2008, 8:59 PM EST
Hello,

Great question! By default, the original version will be 1. However, if the cell has deleted history entries, it may not be 1. For this reason, I recommend getting the revision history back to be sure. This can be done with:

http://wapi.wetpaint.com/CellService/getCellHistory.do?ns={YourNamespace&key={YourKey}&cell.cellId={CellYouAreChecking}&output=api

This will return an XML document with the revision history. The last <revision/> entry in the list will contain the oldest version number as <version>#</version>

Let me know if you have any more questions!

Thanks,

boe_wetpaint
Do you find this valuable?    
bennyflint
bennyflint
2. RE: Default Revision
Nov 20 2008, 7:22 PM EST | Post edited: Nov 20 2008, 7:22 PM EST
Just a clarification: For a newly created cell, the revision number is always 1. You should be able to see this value in the response xml that's returned the createCell call. Do you find this valuable?