Milestones API Calls


List All Milestones

GET /milestones.json

Lists all milestones on projects that the authenticated user is associated with. You can set the "find" option to return only those milestones that are incomplete, completed, upcoming or late. By default all milestones will be returned.

Options

Attribute

Req/Opt

Default

Description

page

Optional

1

Optionally, you can set the page from which to start retrieving results. This is usually used in conjunction with the parameter pageSize.

For example:

  • ?page=2&pageSize=10 will retrieve results 10-20.

pageSize

Optional

200

The amount of Milestones returned can be limited using this parameter. Normally used in conjunction with the page parameter.

Request

GET /milestones.json?find=[all|completed|incomplete|late|upcoming]

Additional Parameters

  • Pass getProgress=true to return a field percentageComplete

Response

{
  "milestones": [
    {
      "project-id": "999",
      "canComplete": true,
      "responsible-party-id": "999",
      "completer-id": "999",
      "comments-count": "0",
      "private": false,
      "status": "completed",
      "completed-on": "2014-02-27T18:24:59Z",
      "created-on": "2014-02-25T14:56:54Z",
      "canEdit": true,
      "responsible-party-type": "Person",
      "isprivate": "no",
      "company-name": "Demo 1 Company",
      "id": "999",
      "last-changed-on": "2014-02-27T18:25:20Z",
      "completed": true,
      "reminder": "no",
      "tasklists": [],
      "description": "",
      "responsible-party-firstname": "'Demo",
      "completer-firstname": "'Demo",
      "responsible-party-ids": "999",
      "responsible-party-names": "'Demo ",
      "responsible-party-lastname": "User'",
      "company-id": "999",
      "creator-id": "999",
      "completer-lastname": "User'",
      "project-name": "Demo Project",
      "deadline": "20140212",
      "_isprivate": {
        "deprecated": true
      },
      "title": "Demo Milestone"
    }
  ]
}

See Milestones in data reference


List Milestones on a Project

GET /projects/{project_id}/milestones.json

This lets you query the list of milestones for a project. You can set the "find" option to return only those milestones that are incomplete, completed, upcoming or late. By default all milestones will be returned.

Request

GET /projects/{project_id}/milestones.json?find=[all|completed|incomplete|late|upcoming]

Additional Parameters

  • Pass getProgress=true to return a field percentageComplete

Response

{
    "milestones": [
        {
            "project-id": "999",
            "canComplete": true,
            "responsible-party-id": "999",
            "comments-count": "0",
            "private": false,
            "status": "upcoming",
            "created-on": "2014-04-01T09:26:49Z",
            "canEdit": true,
            "responsible-party-type": "Person",
            "isprivate": "no",
            "company-name": "Demo 1 Company",
            "id": "999",
            "last-changed-on": "2014-04-01T09:26:49Z",
            "completed": false,
            "reminder": "no",
            "tasklists": [],
            "description": "",
            "responsible-party-firstname": "Demo",
            "responsible-party-ids": "999",
            "responsible-party-names": "Demo U.",
            "responsible-party-lastname": "User",
            "company-id": "999",
            "creator-id": "999",
            "project-name": "demo",
            "deadline": "20140401",
            "_isprivate": {
                "deprecated": true
            },
            "title": "Test Milestone"
        }
    ],
    "STATUS": "OK"
}

See Milestones in data reference


Get a Single Milestone

GET /milestones/{milestone_id}.json

This returns all details about an individual milestone.

Request

GET /milestones/{milestone_id}.json

Additional Parameters

  • Pass getProgress=true to return a field percentageComplete
  • Pass &showTaskLists=true to include a list of task lists associated with this milestone
    • If you pass &showTaskLists=true you can also pass &showTasks=true to include a list of tasks in each list

Response

{
    "milestone": {
        "project-id": "999",
        "canComplete": true,
        "creator-lastname": "User",
        "responsible-party-id": "999",
        "comments-count": "0",
        "private": false,
        "status": "upcoming",
        "created-on": "2014-04-01T09:26:49Z",
        "canEdit": true,
        "responsible-party-type": "Person",
        "isprivate": "no",
        "creator-firstname": "Demo",
        "id": "999",
        "last-changed-on": "2014-04-01T09:26:49Z",
        "completed": false,
        "reminder": "no",
        "description": "",
        "responsible-party-firstname": "Demo",
        "responsible-party-ids": "999",
        "responsible-party-names": "Demo U.",
        "responsible-party-lastname": "User",
        "creator-avatar-url": "https://s3.amazonaws.com/TWFiles/2/users/999.avatar",
        "creator-id": "28726",
        "project-name": "demo",
        "deadline": "20140401",
        "title": "Test Milestone"
    },
    "STATUS": "OK"
}

See Milestones in data reference


Complete

PUT /milestones/{id}/complete.json

Marks the specified milestone as complete. Returns Status 200 OK.

See Milestones in data reference


Uncomplete

PUT /milestones/{id}/uncomplete.json

Marks the specified milestone as uncomplete. Returns Status 200 OK.

See Milestones in data reference


Create a Single Milestone

POST /projects/{project_id}/milestones.json

This API call will create a single milestone.

Request

{
  "milestone": {
    "title": "Test Milestone 2",
    "description": "",
    "deadline": "20140402",
    "notify": true,
    "reminder": false,
    "responsible-party-ids": "999",
    "tags": "tag1,tag2,tag3"
  }
}

See Milestones in data reference


Update

PUT /milestones/{milestone_id}.json

Modifies a single milestone. You can use this to shift the deadline of a single milestone, and optionally shift the deadlines of subsequent milestones as well.

Request

{
  "milestone": {
    "title": "Test Milestone 2",
    "description": "",
    "deadline": "20140404",
    "notify": true,
    "reminder": false,
    "private": true,
    "responsible-party-ids": "28753",
    "tags": "tag1,tag2,tag3"
  },
  "move-upcoming-milestones": true,
  "move-upcoming-milestones-off-weekends": true
}

Response

Returns HTTP status code 200 on success.


Delete

DELETE /milestones/{id}.json

Deletes the milestone.

Response

Returns HTTP status code 200 on success.


Link to 'Milestones' in Data Reference