projects/edit
Updates an existing project that the logged user has access to. Besides a new name, the user may also specify new description and archival status.
URL
http://api.staction.com/projects/edit.format
HTTP Method:
POST
Required Parameters
id
: ID of the project you want to edit. The call will fail if the logged user doesn’t have access to the project specified by this field.
Optional Parameters
name
: the new name of the project.description
: the new textual description of the project being edited.archived
: boolean indicating the new archival status of the project.
Examples (using curl)
- curl -d “developerKey=123&account=paste&email=test@pasteinteractive.com&password=mypassword&id=655&name=New Name for Project” http://api.staction.com/projects/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 project was successfully edited.
As an example, here are a couple of parsed JSON responses, transferred into multidimensional arrays for the sake of clarity.
Array ( [status] => true )
Array ( [status] => false [reason] => There's already a project with this name under this account. )