entries/edit

Updates an existing entry that the logged user has access to. Besides the actual content, the user may also specify tags, file attachments, and thread-related fields.
Please note that since Staction has a focus on chronology, entries that are edited pop up on the top of the stream of content for the account.

URL

http://api.staction.com/entries/edit.format

HTTP Method:

POST

Required Parameters

  • id: ID of the entry you want to edit. The call will fail if the logged user isn’t the original owner of the entry specified by id.

Optional Parameters

Same parameters as the Entries/Create call, plus content. When specified, all fields will replace the original values.

  • content: textual content that is to be posted as the new entry’s body.
  • todoIsDone: indicates the status of the Todo (will be ignored if the entry you’re editing isn’t already a Todo). You can set todoIsDone to 1, 0, true or false.
  • removeAttachment: used to remove an existing file attachment from the entry. This will be ignored if the entry doesn’t already have an attachment.

Examples (using curl)

  • curl -d “developerKey=123&account=paste&email=test@pasteinteractive.com&password=mypassword&id=1099777&content=This is an example of how you can edit an existent entry.” http://api.staction.com/entries/edit.json

Expected Responses

If the call fails to be executed properly, the API will return an error in the default error format, with a status field set to false, and a reason field explaining why it failed to run (respecting the format requested). If the call runs properly, it will return a status field set to true, indicating your entry was successfully edited.

As an example, here’s a couple of parsed JSON responses, transferred into multidimensional arrays for the sake of clarity.

Array
(
    [status] => true
) 
Array
(
    [status] => false
    [reason] => Nothing to edit! (didn't receive the Entry Id)
)