Resourcing

11 Trellis API endpoints for resourcing, with the scopes, parameters and response each one takes.

List a project's resource segments in a date window

GET/workspace/{handle}/{key}/resource-segments

Scopes

Needs a token holding issues:read, issues:write or projects:read.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

Query parameters

startstringRequired

First day of the window (YYYY-MM-DD or RFC 3339).

endstringRequired

Last day of the window (YYYY-MM-DD or RFC 3339).

Responses

200OK

array of ResourceSegmentResponse

allocationsarray of ResourceSegmentAllocationResponsenullable
4 fields
hoursnumber (double)
idstring
segment_idstring
user_idstring
created_atstring
end_datestring
idstring
issue_idstring
project_idstring
start_datestring
updated_atstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Create a resource segment for an issue

POST/workspace/{handle}/{key}/resource-segments

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

Request bodyapplication/json

CreateResourceSegmentRequest

end_datestringRequired
issue_idstringRequired
start_datestringRequired

Responses

201Created

ResourceSegmentResponse

allocationsarray of ResourceSegmentAllocationResponsenullable
4 fields
hoursnumber (double)
idstring
segment_idstring
user_idstring
created_atstring
end_datestring
idstring
issue_idstring
project_idstring
start_datestring
updated_atstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Update a resource segment's dates

PUT/workspace/{handle}/{key}/resource-segments/{segmentId}

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired

Request bodyapplication/json

UpdateResourceSegmentRequest

end_datestringRequired
start_datestringRequired

Responses

200OK

ResourceSegmentResponse

allocationsarray of ResourceSegmentAllocationResponsenullable
4 fields
hoursnumber (double)
idstring
segment_idstring
user_idstring
created_atstring
end_datestring
idstring
issue_idstring
project_idstring
start_datestring
updated_atstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Update a resource segment's dates

PATCH/workspace/{handle}/{key}/resource-segments/{segmentId}

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired

Request bodyapplication/json

UpdateResourceSegmentRequest

end_datestringRequired
start_datestringRequired

Responses

200OK

ResourceSegmentResponse

allocationsarray of ResourceSegmentAllocationResponsenullable
4 fields
hoursnumber (double)
idstring
segment_idstring
user_idstring
created_atstring
end_datestring
idstring
issue_idstring
project_idstring
start_datestring
updated_atstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Delete a resource segment

DELETE/workspace/{handle}/{key}/resource-segments/{segmentId}

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired

Responses

200OK

ResourceSegmentDeleted

deletedboolean

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Set a member's hours on a resource segment

PUT/workspace/{handle}/{key}/resource-segments/{segmentId}/allocations/{userId}

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired
userIdstringRequired

Request bodyapplication/json

UpsertSegmentAllocationRequest

hoursnumber (double)nullableRequired

Responses

200OK

ResourceSegmentAllocationResponse

hoursnumber (double)
idstring
segment_idstring
user_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Remove a member's allocation from a resource segment

DELETE/workspace/{handle}/{key}/resource-segments/{segmentId}/allocations/{userId}

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired
userIdstringRequired

Responses

200OK

ResourceSegmentDeleted

deletedboolean

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Move an allocation from one member to another

POST/workspace/{handle}/{key}/resource-segments/{segmentId}/allocations/reassign

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

segmentIdstringRequired

Request bodyapplication/json

ReassignSegmentAllocationRequest

from_user_idstringRequired
to_user_idstringRequired

Responses

200OK

ResourceSegmentAllocationResponse

hoursnumber (double)
idstring
segment_idstring
user_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Add a member's hours to an issue for a week

POST/workspace/{handle}/{key}/resource-segments/add-allocation

Scopes

Needs a token holding issues:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

keystringRequired

Project key, e.g. `T-001`.

Request bodyapplication/json

AddSegmentAllocationRequest

hoursnumber (double)nullableRequired
issue_idstringRequired
user_idstringRequired
week_startstringRequired

Responses

200OK

array of ResourceSegmentResponse

allocationsarray of ResourceSegmentAllocationResponsenullable
4 fields
hoursnumber (double)
idstring
segment_idstring
user_idstring
created_atstring
end_datestring
idstring
issue_idstring
project_idstring
start_datestring
updated_atstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Get the workspace's resource allocations by member

GET/workspace/{handle}/resourcing/allocations

Scopes

Needs a token holding issues:read, issues:write or projects:read.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Query parameters

start_datestring

First day of the window (YYYY-MM-DD or RFC 3339). Required unless start is given.

end_datestring

Last day of the window (YYYY-MM-DD or RFC 3339). Required unless end is given.

startstring

Alias for start_date.

endstring

Alias for end_date.

pageinteger

Page number, starting at 1.

limitinteger

Members per page. Omit to return every member.

searchstring

Case-insensitive match against member name or rate card name.

include_unallocatedboolean

Include members with no allocations in the window.

user_idsstring

Comma-separated user IDs to include.

project_idsstring

Comma-separated project IDs to include.

rate_card_idsstring

Comma-separated rate card IDs to include. Ignored for roles that cannot see rate cards.

exclude_user_idsstring

Comma-separated user IDs to exclude.

exclude_project_idsstring

Comma-separated project IDs to exclude.

exclude_rate_card_idsstring

Comma-separated rate card IDs to exclude. Ignored for roles that cannot see rate cards.

Responses

200OK

ResourcingAllocationsResponse

end_datestring
has_moreboolean
limitinteger
membersarray of ResourcingMemberAllocationResponsenullable
8 fields
avatarstring
avatar_gradientstring
daysarray of ResourcingDayAllocationResponsenullable
2 fields
datestring
hoursnumber (double)
idstring
namestring
projectsarray of ResourcingProjectAllocationResponsenullable
4 fields
colorstring
daysarray of ResourcingDayAllocationResponsenullable
2 fields
datestring
hoursnumber (double)
keystring
namestring
rate_card_namestring
total_hoursnumber (double)
pageinteger
start_datestring
totalinteger
workspace_has_allocationsboolean

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Query the workspace's resource allocations by member

POST/workspace/{handle}/resourcing/allocations

Scopes

Needs a token holding issues:read, issues:write or projects:read.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Request bodyapplication/json

ResourcingAllocationsQuery

end_datestringRequired
exclude_project_idsarray of stringnullable
exclude_rate_card_idsarray of stringnullable
exclude_user_idsarray of stringnullable
include_unallocatedboolean
limitinteger
pageinteger
project_idsarray of stringnullable
rate_card_idsarray of stringnullable
searchstring
start_datestringRequired
user_idsarray of stringnullable

Responses

200OK

ResourcingAllocationsResponse

end_datestring
has_moreboolean
limitinteger
membersarray of ResourcingMemberAllocationResponsenullable
8 fields
avatarstring
avatar_gradientstring
daysarray of ResourcingDayAllocationResponsenullable
2 fields
datestring
hoursnumber (double)
idstring
namestring
projectsarray of ResourcingProjectAllocationResponsenullable
4 fields
colorstring
daysarray of ResourcingDayAllocationResponsenullable
2 fields
datestring
hoursnumber (double)
keystring
namestring
rate_card_namestring
total_hoursnumber (double)
pageinteger
start_datestring
totalinteger
workspace_has_allocationsboolean

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.