- Getting milestones
- Getting a milestone
- Creating a milestone
- Updating a milestone
- Completing a milestone
- Deleting a milestone
- The milestone object
- Dependent objects
You can list milestones by making a GET request to:
/api/milestonesfor a list of all the milestones/api/milestones?where=due_date=2014-09-01for a list of milestones that are due on Sep 1st, 2014/api/milestones?where=due_date>2014-12-15 and complete=falsefor a list of milestones that are due after Dec 15, 2014 and are not complete/api/milestones?where=user_id=[USER_ID]for a list of milestones assigned to a user
Example of response:
{
"milestones": [
{
"id": 60805,
"name": "Integration",
"project_id": 397707,
"user_id": 23129,
"due_date": "2014-11-23",
"send_reminder": 0,
"reminder_sent": true,
"complete": false,
"created_on": "2014-10-03T12:49:06Z",
"updated_on": "2014-11-22T14:34:59Z",
"linked_tasklists": []
},
{
"id": 60806,
"name": "Requirements",
"project_id": 397717,
"user_id": 23129,
"due_date": "2014-11-11",
"send_reminder": 48,
"reminder_sent": false,
"complete": false,
"created_on": "2014-10-03T12:49:06Z",
"updated_on": "2014-10-24T14:34:59Z",
"linked_tasklists": [
629824
]
}
]
} You can also include related content when listing milestones.
To get the milestone info, make a GET request to:
/api/milestones/[MILESTONE_ID]
Example response:
{
"milestones": [
{
"id": 60805,
"name": "Integration",
"project_id": 397707,
"user_id": 23129,
"due_date": "2014-11-23",
"send_reminder": 0,
"reminder_sent": true,
"complete": false,
"created_on": "2014-10-03T12:49:06Z",
"updated_on": "2014-11-22T14:34:59Z",
"linked_tasklists": []
}
]
} You can also include related content when getting a milestone.
To create a milestone, make a POST request to:
/api/milestones
with the request body containing the new milestone info, as in the example below:
{
"name": "Documentation",
"project_id": 1234,
"due_date": "2015-01-15",
"user_id": 390
}If successful, the response will return 201 Created. The response header Location will contain a link for the new milestone. The response body will contain the new milestone info as in the Getting a milestone section.
When creating a milestone: name, project_id, due_date.
To update an existing milestone, make a POST or PUT request to:
/api/milestones/[MILESTONE_ID]
with the request body containing the updated info. You can send only the changed fields.
Example of request body if you want to change the milestone due date:
{
"due_date": "2015-02-15"
}The response will return 200 OK and will contain the updated milestone info as in the Getting a milestone section.
To mark a milestone as complete, make an update request with the following body:
{
"complete": true
}To delete a milestone, make a DELETE request to:
/api/milestones/[MILESTONE_ID]
If successful, the response will have a 200 OK status code.
A milestone object has the following attributes:
| Attribute | Type | Description |
|---|---|---|
| id | integer | (read-only) Unique milestone identifier |
| name | text | Milestone name |
| project_id | integer | Project id |
| user_id | integer | Id of the user responsible for the milestone. This user will receive late milestone reminders. |
| due_date | date | Due date for the milestone |
| send_reminder | integer | How many hours before the due date the reminders will be sent. If 0, no reminders will be sent. |
| reminder_sent | boolean | (read-only) If true the reminder was sent. |
| complete | boolean | If true the milestone is marked as completed. |
| linked_tasklists | list | List of task list ids that are linked with this milestone. |
| created_on | datetime | (read-only) Date and time when the milestone was created |
| updated_on | datetime | (read-only) Date and time when the milestone was last updated |
The following object types can be used in includes:
| Object type | Include key | Relationship |
|---|---|---|
| Project | project | parent |
| User | user | parent |
| Task List | tasklists | child |