Morale API - Tickets

Tickets

Tickets can be either tasks or bugs and are stored within a project.

You can use the tickets API to get a list of tickets within a specific project. Each of the tickets listed return detailed information about those tickets. You can use the tickets API to create, update, archive, and delete projects by using the commands.

Here are some examples of commands you can post to the tickets API.

  • "Add header to my account page" #=> Creates a task with the title "Add header to my account page"
  • "bug: Missing support link due: today" #=> Creates a bug with the title "Missing support link" and the due date of today
  • "#8: title: Change the background color for the sidebar" #=> Updates ticket #8 with the title "Change the background color for the sidebar"
  • "a #4:" #=> Archives ticket #4
  • "d #7:" #= Deletes ticket #7

API :: Tickets

list

No input parameters

Output Parameters
  • ticket type A representation of a single ticket. This is either "task" or "bug"
    • id The unique identifier for the ticket
    • identifier The unique identifier for the ticket within the project
    • type The ticket type. This is either "task" or "bug"
    • title The ticket title
    • assigned_to The user that the ticket is assigned to
    • priority A numerical value that represents the priority of the ticket
    • archived A boolean indicating if the ticket has been archived
    • project_id The id of the project that the ticket belongs to
    • updated_at The timestamp of when the ticket was last updated
    • created_at The timestamp of when the ticket was created
    • created_by The user that created the ticket
Example

request

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

response

[{                              
   "task":
   {
     "id": 102,
     "identifier": 41,
     "type": "task",
     "title": "Create forgot password page",
     "assigned_to": null,
     "priority": 2,
     "archived": false,
     "project_id": 1,
     "updated_at": "2011-09-01T18:49:25Z",
     "created_at": "2011-06-23T03:55:34Z",
     "created_by": {
       "first_name": "Jimmy",
       "last_name": "Page",
       "email": "jimmy@example.com",
       "time_zone": "Eastern Time (US & Canada)"
     }
   },
   "bug":
   {
     "id": 103,
     "identifier": 43,
     "type": "bug",
     "title": "Performance issue with retrieving the current project",
     "assigned_to": 1,
     "priority": null,
     "archived": false,
     "project_id": 1,
     "updated_at": "2011-10-01T16:29:29Z",
     "created_at": "2011-06-25T03:25:32Z",
     "created_by": {
       "first_name": "Jimmy",
       "last_name": "Page",
       "email": "jimmy@example.com",
       "time_zone": "Eastern Time (US & Canada)"
     }
   }
}]

show

No input parameters

Output Parameters
  • id The unique identifier for the ticket
  • identifier The unique identifier for the ticket within the project
  • type The ticket type. This is either "task" or "bug"
  • title The ticket title
  • assigned_to The user that the ticket is assigned to
  • priority A numerical value that represents the priority of the ticket
  • archived A boolean indicating if the ticket has been archived
  • project_id The id of the project that the ticket belongs to
  • updated_at The timestamp of when the ticket was last updated
  • created_at The timestamp of when the ticket was created
  • created_by The user that created the ticket
Example

request

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

response

{
  "id": 231,
  "identifier": 89,
  "type": "task",
  "title": "Create forgot password page",
  "assigned_to": null,
  "priority": 2,
  "archived": false,
  "project_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z",
  "created_by": {
    "first_name": "Jimmy",
    "last_name": "Page",
    "email": "jimmy@example.com",
    "time_zone": "Eastern Time (US & Canada)"
  }
}

command

Input Parameters
  • command A string representing a command for creating, updating, archiving, or deleting a ticket
Output Parameters
  • id The unique identifier for the ticket
  • identifier The unique identifier for the ticket within the project
  • type The ticket type. This is either "task" or "bug"
  • title The ticket title
  • assigned_to The user that the ticket is assigned to
  • priority A numerical value that represents the priority of the ticket
  • archived A boolean indicating if the ticket has been archived
  • project_id The id of the project that the ticket belongs to
  • updated_at The timestamp of when the ticket was last updated
  • created_at The timestamp of when the ticket was created
  • created_by The user that created the ticket
Example

request

curl --user api-test:XfADs6yw0qshq2Svaf -X POST --data {"command":"Create forgot password page"} https://api-test.teammorale.com/api/v1/projects/1/tickets

response

{
  "id": 783,
  "identifier": 32,
  "type": "task",
  "title": "Create forgot password page",
  "assigned_to": null,
  "priority": 2,
  "archived": false,
  "project_id": 1,
  "updated_at": "2011-09-01T18:49:25Z",
  "created_at": "2011-06-23T03:55:34Z",
  "created_by": {
    "first_name": "Jimmy",
    "last_name": "Page",
    "email": "jimmy@example.com",
    "time_zone": "Eastern Time (US & Canada)"
  }
}