projects/create

Adds a new project to the logged account. Besides a name, the user may also specify a textual description of it.

URL

http://api.staction.com/projects/create.format

HTTP Method:

POST

Required Parameters

  • name: the name of the new project.

Optional Parameters

  • description: a textual description of the project being added to the account.

Examples (using curl)

Simplest way to create a project:

  • curl -d “developerKey=123&account=paste&email=test@pasteinteractive.com&password=mypassword&name=New Project” http://api.staction.com/projects/create.json

Creating a project with a description:

  • curl -d “developerKey=123&account=paste&email=test@pasteinteractive.com&password=mypassword&name=New Project&description=Lorem ipsum dolor sit amet” http://api.staction.com/projects/create.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 created.

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.
)