Morale API - Projects

Projects

There are multiple projects for each account. Tickets are stored within a project.

You can use the projects API to get a list of projects within a specific account. Each of the projects listed return detailed information about those projects. You can use the projects API to create, edit, and delete projects by their unique identifier.

API :: Projects

list

No input parameters

Output Parameters
  • project A representation of a single project
    • id The unique identifier for the project
    • name The project name
    • account_id The id of the account that the project belongs to
    • updated_at The timestamp of when the project was last updated
    • created_at The timestamp of when the project was created
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf https://api-test.teammorale.com/api/v1/projects

response

[{                              
   "project":
   {
     "id": 1,
     "name": "Test Project #1",
     "account_id": 1,
     "updated_at": "2011-09-01T18:49:25Z",
     "created_at": "2011-06-23T03:55:34Z"
   },
   "project":
   {
     "id": 1,
     "name": "Test Project #2",
     "account_id": 1,
     "updated_at": "2011-10-01T16:29:29Z",
     "created_at": "2011-06-25T03:25:32Z"
   }
}]

show

Input Parameters
  • id The unique identifier for the project to show
Output Parameters
  • id The unique identifier for the project
  • name The project name
  • account_id The id of the account that the project belongs to
  • updated_at The timestamp of when the project was last updated
  • created_at The timestamp of when the project was created
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf https://api-test.teammorale.com/api/v1/projects/1

response

{
  "id": 1,
  "name": "Test Project #1",
  "account_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z"
}

create

Input Parameters
  • project A representation of a single project
    • name The project name
Output Parameters
  • id The unique identifier for the project
  • name The project name
  • account_id The id of the account that the project belongs to
  • updated_at The timestamp of when the project was last updated
  • created_at The timestamp of when the project was created
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf --data "{'project':{'name':'Test Project #2'}}" -X POST https://api-test.teammorale.com/api/v1/projects

response

{
  "id": 2,
  "name": "Test Project #2",
  "account_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z"
}

update

Input Parameters
  • project A representation of a single project
    • name The project name
Output Parameters
  • id The unique identifier for the project
  • name The project name
  • account_id The id of the account that the project belongs to
  • updated_at The timestamp of when the project was last updated
  • created_at The timestamp of when the project was created
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf --data "{'project':{'name':'Changed Project'}}" -X PUT https://api-test.teammorale.com/api/v1/projects/1

response

{
  "id": 1,
  "name": "Changed Project",
  "account_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z"
}

delete

No input parameters

Output Parameters
  • id The unique identifier for the project
  • name The project name
  • account_id The id of the account that the project belongs to
  • updated_at The timestamp of when the project was last updated
  • created_at The timestamp of when the project was created
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf -X DELETE https://api-test.teammorale.com/api/v1/projects/1

response

{
  "id": 1,
  "name": "Test Project #1",
  "account_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z"
}