Intervals API Resource:

request

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

The request resource is used to manage work requests.

Permissions for work requests are not entirely straightforward, so here are some general rules:

  1. Administrators can view, change or delete any work request.
  2. Managers may view, change or delete any work request to which they have project access. However, they cannot change the person with whom the work request is associated once it has been set.
  3. Resource and executive users may view any work request to which they have project access. However, they cannot change or delete the work request unless they are the person with whom the work request is associated.
  4. Work requests can have no project. In these cases, view access by managers, resources and executives is allowed if they are included in the mail queue notification list or if they are the person with whom the work request is associated. Managers may edit or delete these work requests, but resource and executive users can only do so if they are the person with whom the work request is associated.

Collection

Allowed HTTP Methods
MethodGroup Access
GETAdministrator, Manager, Resource, Executive
Allowed Filters
Filter NameRequired?ExpectsDefaultDescription
priorityid no integer Limits the list to work requests having this priority.
personid no integer Limits the list to work requests submitted by this person.
projectid no integer Limits the list to work requests belonging to this project.
sortfield no string Sort the list by any of the following fields: id, title, date, datedue, personid, person, projectid, project, clientid, client, email, priorityid, priority.
sortdir no string Sets the sort direction of the returned list. Must be either "ASC" or "DESC".
offset no integer Return requests starting from the nth request.
limit no integer 10 Sets a limit to the amount of requests 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 /request/

To filter the list based on certain parameters:

GET /request/?priorityid={value}

Note: You can string together multiple filters.

Member

Allowed HTTP Methods
MethodGroup Access
GETAdministrator, Manager, Resource, Executive
DELETEAdministrator, Manager, Resource, Executive
POSTAdministrator, Manager, Resource, Executive
PUTAdministrator, Manager, Resource, Executive
Settable Fields for PUT and POST Requests
Field NameRequired?ExpectsDefaultDescription
personid yes integer The ID of the owner of the work request.
projectid no integer The project the work request belongs to.
priorityid yes integer The ID of the priority of the work request. Please see the taskpriority resource for more information.
title yes string (255) The work request title.
datedue no date The date on which the work request is due. If this is left blank, the date will default to one week ahead
description no html The work request description.

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 request
personid no ID of the person who submitted the request
title no Request title
date no Date and time the request was submitted (UTC YYYY-MM-DD HH:MM:SS)
description yes Request description (may contain HTML, images, and inline assets)
projectid yes ID of the associated project (empty when not yet assigned to a project)
priorityid no ID of the priority
datedue yes Due date (YYYY-MM-DD)
localid no Human-readable request number shown in the app
headers yes Original email headers when the request was created from email (empty when not applicable)
clientid yes ID of the associated client (empty when none)
client yes Name of the associated client (empty when none)
person no Full name of the submitter
person_localid yes Local ID of the submitter in the Person app
email yes Email address of the submitter
project yes Name of the associated project (empty when not assigned)
projectactive yes Whether the linked project is active ("t"/"f") (Empty when no project is linked (not only "t"/"f").)
priority no Priority label (e.g. P1, P3)
projectlocalid yes Local ID of the associated project (empty when not assigned)
personvisible no Whether the submitter is visible to the current viewer ("t"/"f"); used for privacy across roles

When retrieving a collection (GET /request/), the response envelope includes: personid (authenticated user's ID), status ("OK"), code (200), listcount (total matching records before limit/offset), and request (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 /request/{id}/

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

To delete a particular member resource:

DELETE /request/{id}/

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

To create a new member resource:

POST /request/
{
    "personid": value,
    "priorityid": value,
    "title": 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 /request/{id}/
{
    "projectid": value,
    "title": 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