Overview
Tempo Planner allows for planning team capacity and schedules within Jira. However, you may have some need to pull that resource planning information out of the Tempo interface and add it to a ticket.
The Tempo API has some severe limitations, but where there’s a will there’s a way.
Team Info
The first thing we’ll examine is how to get information on all of the teams in Tempo Planner. According the documentation, this isn’t possible. Per the API documentation, you can return limited very information about plans and allocations.
Naturally I found this to be unacceptable, and I figured out a way to have the API return all of the teams. One of the undocumented API endpoints is a search function: /rest/tempo-teams/3/search. One of the tricks to using this method is that it’s not a GET, it’s a POST, so we have to supply a search parameter as a payload. When we POST to this endpoint, we supply some JSON: {“teamSearchString”:”<string>”}. But here’s the rub: the API will accept an empty search string, and return all of the teams as a result.
Allocation Info
Much like team info, there is no public Tempo API endpoint that will return all of the plans or allocations in the Jira instance. However, thanks to some information from 0xVIC, I found an endpoint that will work for this purpose. If we POST to /rest/tempo-planning/1/plan/search, we get back information about allocations in a given period of time.
The payload for the POST looks like this: {“from”: “2023-01-01”, “to”:”2023-12-01″}. If the end date isn’t specified, it only looks ahead by one month.
Each object in the JSON that is returned by this query is an allocation. If you take the allocation ID and append it to the REST API like rest/tempo-planning/1/allocation/2, where 2 is the allocation ID, you’ll get back all the information about that allocation.
Other tempo API Endpoints
From that same GitHub repository, here are some Tempo-related REST API endpoints that might be useful to you.
/rest/tempo-accounts/1
/rest/tempo-accounts/1/account/key/
/rest/tempo-accounts/1/import/service
/rest/tempo-accounts/1/ratetable/currency
/rest/tempo-accounts/2
/rest/tempo-core/1/activitysources
/rest/tempo-core/1/analytics/track
/rest/tempo-core/1/expense
/rest/tempo-core/1/expense/category
/rest/tempo-core/1/favorites/
/rest/tempo-core/1/filter/?
/rest/tempo-core/1/filter/my?includeFavourites=
/rest/tempo-core/1/globalconfiguration/
/rest/tempo-core/1/issues
/rest/tempo-core/1/jira-properties/
/rest/tempo-core/1/plugin-info/plugin/is.origo.jira.tempo-plugin
/rest/tempo-core/1/project/config/
/rest/tempo-core/1/saved-reports
/rest/tempo-core/1/saved-reports/drafts
/rest/tempo-core/1/user/schedule
/rest/tempo-core/1/users/search
/rest/tempo-core/1/work-attribute
/rest/tempo-core/1/workloadscheme/
/rest/tempo-core/1/workloadscheme/move-members
/rest/tempo-core/2/holidayschemes/
/rest/tempo-core/2/holidayschemes/move-members
/rest/tempo-core/2/user/schedule/search
/rest/tempo-planning/1/allocation/
/rest/tempo-planning/1/permission/users/for-plan-permission
/rest/tempo-planning/1/plan
/rest/tempo-planning/1/plan-approval
/rest/tempo-planning/1/plan-approval/user/permission?
/rest/tempo-planning/1/plan/export
/rest/tempo-planning/1/plan/export/filter
/rest/tempo-planning/1/plan/remove/planLog/
/rest/tempo-planning/1/planSchedule/forTeam
/rest/tempo-planning/1/planSchedule/users
/rest/tempo-planning/1/plan/search
/rest/tempo-planning/1/userFilter
/rest/tempo-planning/2/capacity/export
/rest/tempo-planning/2/capacity/export/filter
/rest/tempo-planning/2/capacity/report
/rest/tempo-rest/1.0/accounts/json/billingKeyList/
/rest/tempo-rest/2.0/accounts/picker?query=
/rest/tempo-rest/2.0/activities/picker
/rest/tempo-rest/2.0/filters/picker
/rest/tempo-rest/2.0/issues/picker/
/rest/tempo-rest/2.0/issues/picker/internal?issueType=internal&actionType=logTime
/rest/tempo-rest/2.0/planning/supervisors?userKey=
/rest/tempo-rest/2.0/project/
/rest/tempo-rest/2.0/projects/picker
/rest/tempo-rest/2.0/scheduler-config
/rest/tempo-rest/2.0/search/picker
/rest/tempo-rest/2.0/user/getUser
/rest/tempo-rest/2.0/user/issues/
/rest/tempo-rest/2.0/users/picker/
/rest/tempo-teams/2/
/rest/tempo-teams/2/permissionGroups/myPermissions
/rest/tempo-teams/2/permissionGroups/team
/rest/tempo-teams/2/program
/rest/tempo-teams/2/role
/rest/tempo-teams/2/team/
/rest/tempo-teams/3/
/rest/tempo-teams/3/indexing
/rest/tempo-teams/3/locations
/rest/tempo-teams/3/locations/
/rest/tempo-teams/3/user-locations
/rest/tempo-teams/3/user-locations/
/rest/tempo-teams/3/user-locations/bulk
/rest/tempo-teams/3/user-schemes/users
/rest/tempo-teams/3/user-schemes/users/keys
/rest/tempo-teams/4/search/memberships
/rest/tempo-time-activities/1/issue/
/rest/tempo-timesheets/3/analytics/track
/rest/tempo-timesheets/3/period
/rest/tempo-timesheets/3/private/config/
/rest/tempo-timesheets/3/report/account/
/rest/tempo-timesheets/4/period
/rest/tempo-timesheets/4/period-configuration/
/rest/tempo-timesheets/4/private/days/search
/rest/tempo-timesheets/4/scheduler/grace-period/grant
/rest/tempo-timesheets/4/timesheet-approval
/rest/tempo-timesheets/4/timesheet-approval?
/rest/tempo-timesheets/4/timesheet-approval/approval-statuses?numberOfPeriods=
/rest/tempo-timesheets/4/timesheet-approval/log?
/rest/tempo-timesheets/4/timesheet-approval/user/
/rest/tempo-timesheets/4/worklogs/
/rest/tempo-timesheets/4/worklogs/export
/rest/tempo-timesheets/4/worklogs/export/filter
/rest/tempo-timesheets/5/period/approval?dateFrom=
/rest/tempo-timesheets/5/period/secondary?dateFrom=
Leave a Reply