Intervals API Resource:
projectworktype
The base URL for this resource is located at
https://api.myintervals.com/projectworktype/
The project worktype resource is used to retrieve work types assigned to a project. The worktypeid field refers to the id of the default worktype.
Collection
| Allowed HTTP Methods | |
|---|---|
| Method | Group Access |
| GET | Administrator, Manager, Resource, Executive |
| Allowed Filters | ||||
|---|---|---|---|---|
| Filter Name | Required? | Expects | Default | Description |
| projectid | no | integer1 | ||
| active | no | boolean | This filter will automatically be applied to resource users, as they cannot see inactive modules. | |
| personid | no | integer | ||
| offset | no | integer | Return projectworktypes starting from the nth projectworktype. | |
| limit | no | integer | 10 | Sets a limit to the amount of projectworktypes 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 /projectworktype/
To filter the list based on certain parameters:
GET /projectworktype/?active={value}
Note: You can string together multiple filters.
Member
| Allowed HTTP Methods | |
|---|---|
| Method | Group Access |
| GET | Administrator, Manager, Resource, Executive |
| DELETE | Administrator |
| POST | Administrator |
| PUT | Administrator |
| Settable Fields for PUT and POST Requests | ||||
|---|---|---|---|---|
| Field Name | Required? | Expects | Default | Description |
| projectid | yes | integer | Once a project ID has been set for a project worktype, it cannot be changed. It must be deleted for this project and then re-created for the new project. | |
| worktypeid | no | integer | 0 | REQUIRED IF adding a project work type from the defaults section. NOT REQUIRED when editing. |
| hourlyrate | yes | double | REQUIRED IF adding a custom work type. | |
| esttime | no | double | ||
| active | yes | boolean | ||
| worktype | no | string (155) | REQUIRED IF adding a custom project worktype. The name of the work type. | |
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 Name | Nullable | Description |
| id | no | Unique identifier for the project–worktype row |
| projectid | no | ID of the parent project |
| worktypeid | yes | ID of the global `/worktype/` when this row is based on a standard work type (empty for a custom project-only work type) |
| worktype | no | Display name of the work type for this project |
| active | no | Whether this project work type is active ("t") or inactive ("f") |
| total | no | Total hours logged against this work type on the project (0 when none) (May be returned as a string in JSON; not shown to Resource/Executive users) |
| hourlyrate | no | Project-specific hourly rate for this work type (Not shown to Resource/Executive users; may be returned as a string in JSON) |
| esttime | no | Estimated hours budgeted for this work type on the project (Not shown to Resource/Executive users; may be returned as a string in JSON) |
When retrieving a collection (GET /projectworktype/), the response envelope includes: personid (authenticated user's ID), status ("OK"), code (200), listcount (total matching records before limit/offset), and projectworktype (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 /projectworktype/{id}/
Assuming no errors, the server will respond with 200 OK and the object requested.
To delete a particular member resource:
DELETE /projectworktype/{id}/
Assuming no errors, the server will respond with 200 OK.
To create a new member resource:
POST /projectworktype/
{ "projectid": value, "hourlyrate": value, "active": 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 /projectworktype/{id}/
{ "projectid": value, "esttime": value }
Assuming no errors, the server will respond with 202 Accepted and the entire element. This will allow you to verify the field values.
Documentation
Resources
- client
- contactdescriptor
- contacttype
- document
- expense
- group
- invoice
- invoiceitem
- invoicenote
- invoiceterm
- me
- milestone
- milestonenote
- module
- payment
- paymenttype
- person
- personcontact
- project
- projectlabel
- projectmodule
- projectnote
- projectteam
- projectworktype
- quota
- request
- task
- tasklistfilter
- tasknote
- taskpriority
- taskstatus
- time
- timer
- worktype
API Support
Looking for help?
Contact our support team.
OpenAPI
OpenAPI JSON spec (public)
Start tracking time today
Connect Intervals to the tools and workflows your team already uses.
Try Intervals free