POST: Create an epic

The POST operation can be used to create an epic and associate it with the backlog.

Identifying the backlog root

Each workspace has its own backlog, so the first step is to identify the ID for the backlog for the workspace.

You cannot create "orphan" epics. Each epic must have the Backlog as a parent.

In the following example, we see that the ID for the backlog is 1001.

*** Request ***
GET .../api/shared_spaces/{shared_space_uid}/workspaces/{workspace_id}/work_item_roots

 

*** Response ***
{
  "total_count": 1,
  "data": [
    {
      "type": "work_item_root",
      "owner": null,
      "creation_time": "2017-07-30T08:27:28Z",
      "version_stamp": 1,
      "author": null,
      "story_points": null,
      "description": null,
      "name": "Backlog",
      "id": "1001",
      "last_modified": "2017-07-30T08:27:28Z"
    }
  ],
  "exceeds_total_count": false
}

Back to top

Creating the epic

After identifying the root of the backlog, you can create the epic. The parent of the epic is the work_item_root whose ID is is 1001. This is the root of the backlog for this workspace.

*** Request ***
POST .../api/shared_spaces/<shared_space_id>/workspaces/<workspace_id>/epics
{ "data": [
    {
      "description": "This is the description for my epic",    
      "name": "MyEpic",
      "parent": {
        "type": "work_item_root",
        "id": "1001"
      }
    } ]    
}
*** Response ***   
{
  "total_count": 1,
  "data": [
    {
      "type": "epic",
      "id": "1002"
    }
  ],
  "exceeds_total_count": false
}

Back to top