Documentation

/document/{contentId}/update

ThoughtFarmer REST API Method: /document/{contentId}/update

Updates content in ThoughtFarmer. The content can only be updated if the user calling the API method has a lock on the content already. Otherwise, the update API call will fail. 
 
URL:
http://yourserver.com/api/document/{contentId}/update
http://yourserver.com/api/2.0/document/{contentId}/update

Response Formats:
xml,json

HTTP Method(s):
POST
 
Requires Authentication:
true, user making call must pass a valid token parameter and must have edit permissions

Parameters:

Parameter Type Description
contentId int Required. The content id of the the document page to retrieve
retainLock multipart/form-data Required. A flag to say if the file should stay locked after the update is done
file multipart/form-data Required. The file to update attached to the POST as multipart/form-data
token  string  Required. A valid token authentication parameter
Response Status Codes:
200 - Update successful
400 - Tried to attach a data byte array of zero bytes
401 - Token parameter is invalid
403 - No permissions to make update
404 - Requested document to update not found
405 - Not allowed if trying to send more than one file
406 - If no file is found as part of the form data
409 - If a content id is not a document page
412 - If the user trying to update the document no longer has a valid file lock for it

Example request
POST http://yourserver.com/api/document/{contentId}/update
POST Data retainLock={retainLock}&file={file}&token={token}
nothing