Intervals API Resource:

milestone

The base URL for this resource is located at
https://api.myintervals.com/milestone/

Collection

Allowed HTTP Methods
MethodGroup Access
GETAdministrator, Manager, Resource, Executive
Allowed Filters
Filter NameRequired?ExpectsDefaultDescription
localid no integer1 Restricts the task list based on a task's "localid," which is the number that appears associated with the task in the Intervals application.
search no string Limits the list to milestones that match the search string. Searches title, description, notes, and localid.
clientid no integer1 Limits the list to milestones that belong to the client corresponding to the ID(s) passed. You can pass a value of -1 for projects that have no client.
projectid no integer1 Limits the list to milestones that belong to the project corresponding to the ID(s) passed.
ownerid no integer1 Limits the list to milestones that belong to the owner corresponding to the ID(s) passed.
hasmilestonerelation no integer1 Limits the list to milestones that are either owned by, or contains tasks which the people with the IDs specified are assigned, own, or are followers of. For restricted resources (users who can only see tasks that they own or that are assigned to them), this value will be set to the user by default.
complete no boolean Limits the list to milestones that are either complete or incomplete.
dateduebegin no date Limits the list to milestones that have a due date on or after the date passed.
datedueend no date Limits the list to milestones that have a due date on or before the date passed.
title no string Limits the list to milestones with titles containing the search string.
sortfield no string Sort the list by any of the following fields: id, localid, projectid, clientid, datedue, title, description, progress, estimate, actual, owner, projectlabelid, projectlabel (sorted by project labels alphabeticaly), and projectabel_order (sorted by project label order in Settings & Defaults).
sortdir no string Sets the sort direction of the returned list. Must be either "ASC" or "DESC".
offset no integer Return milestones starting from the nth milestone.
limit no integer 10 Sets a limit to the amount of milestones returned in the response.

1 Indicates that multiple values are allowed, in CSV format (e.g. "3,5,11,19").
2 This field accepts HTML, but certain HTML elements may be stripped out.

Examples

To retrieve the entire list of this resource:

GET /milestone/

To filter the list based on certain parameters:

GET /milestone/?ownerid={value}

Note: You can string together multiple filters.

Member

Allowed HTTP Methods
MethodGroup Access
GETAdministrator, Manager, Resource
DELETEAdministrator, Manager
POSTAdministrator, Manager
PUTAdministrator, Manager
Settable Fields for PUT and POST Requests
Field NameRequired?ExpectsDefaultDescription
projectid yes integer The ID of the project the milestone belongs to.
ownerid yes integer The ID of the owner of this milestone. You can submit multiple owners in the form of comma separated integers (e.g. '22,334,222').
title yes string (255) The title of the milestone.
datedue yes date The due date of the milestone. Milestones that are not completed and have a due date in the past are considered overdue. Milestones that are completed that have a due date in the future are considered in progress.
description no html The milestone description.
complete yes boolean f Whether the milestone has been completed or not. Milestones that are not completed that have a due date in the past are considered overdue. Milestones that are completed that have a due date in the future are considered in progress.

string (xxx) indicates a string with a maximum length of xxx characters.

Response Fields

The fields below are returned in GET responses. Boolean values are "t" / "f" strings. Numeric IDs and floats are returned as strings. Nullable fields may be JSON null.

Response Fields
Field NameNullableDescription
id no Unique identifier for the milestone
projectid no ID of the parent project
ownerid no ID of the milestone owner
title no Milestone title
datedue no Target due date (YYYY-MM-DD)
description yes Milestone description (may contain HTML)
complete no Whether the milestone is complete ("t") or open ("f")
localid no Milestone local ID within the project (often a string in JSON)
dateclosed yes Date the milestone was closed (empty when not complete)
project no Name of the parent project
client yes Name of the associated client (empty when none)
clientid yes ID of the associated client
numtasksclosed no Count of tasks in this milestone that are closed
numtaskstotal no Total count of tasks in this milestone
progress no Completion percentage 0–100 (may have high precision; may be a string in JSON)
estimate no Total estimated hours for tasks in this milestone (May be returned as a string in JSON)
actual no Total actual hours logged against this milestone (May be returned as a string in JSON)
remaining no Estimated hours remaining (estimate minus actual when derived that way) (May be returned as a string in JSON)
owner no Full name of the milestone owner (Not shown to Executive users)
projectlabel yes Name of the associated project label
projectlabel_order yes Sort order of the project label within the account
projectlabelid yes ID of the associated project label

When retrieving a collection (GET /milestone/), the response envelope includes: personid (authenticated user's ID), status ("OK"), code (200), listcount (total matching records before limit/offset), and milestone (array of result objects). Defaults, no cap on limit, and how to paginate using listcount are described in the API Introduction (Pagination).

Examples

To retrieve one member resource:

GET /milestone/{id}/

Assuming no errors, the server will respond with 200 OK and the object requested.

To delete a particular member resource:

DELETE /milestone/{id}/

Assuming no errors, the server will respond with 200 OK.

To create a new member resource:

POST /milestone/
{
    "projectid": value,
    "ownerid": value,
    "title": value,
    "datedue": value,
    "complete": value
}

Assuming no errors, the server will respond with 201 Created and the newly-created element. This will allow you to get the id of the item you just created and verify the field values. Note: Only required fields were listed here. The entire list of possible fields is above.

To update a member resource:

PUT /milestone/{id}/
{
    "title": value,
    "description": value
}

Assuming no errors, the server will respond with 202 Accepted and the entire element. This will allow you to verify the field values.

Start tracking time today

Join 5,000+ companies spending their time wisely with Intervals.

Try Intervals free