List versions
list_versionsRetrieve versions (releases, milestones, sprints) for work package assignment, ID lookup, or date review. Use project_id to target a project.
Instructions
List versions (releases, milestones, sprints) you can assign work packages to.
Use it to turn "Sprint 12" or "release 2.1" into the version id that
create_work_package/update_work_package need, to see which versions are still
open, or to review a release plan's dates. With project_id it answers "what can I
target in THIS project", which includes versions shared down from parent projects.
Returns the standard list envelope: items of {id, name, project, status, start_date, end_date, description, sharing, source} plus pagination and
notes. A project-scoped listing is fetched in full, so has_more is false.
Pitfalls: project is the project that DEFINES the version, which for a shared
version is not the project you asked about — assigning still works. status is
open/locked/closed and OpenProject refuses to put work packages into a closed
version. The instance-wide listing is capped at one page of 100; if more exist,
pagination.has_more is true and notes says so — narrow with project_id
rather than assuming you saw everything. include_sprints depends on the backlogs
module: where it is not installed the versions still come back and notes explains
the absence, so read notes before telling a user a project has no sprints.
Cross-references: create_version adds one, update_version moves its dates or
closes it, delete_version removes it; get_project_metadata(project_id=...)
returns the same versions alongside types and categories; to see what is IN a version
use list_work_packages with a version filter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Numeric project id or URL identifier to list the versions available in that project — including the ones shared into it from a parent. Omit it to list every version visible to you across the instance. | |
| include_sprints | No | Also read /projects/{id}/sprints from the backlogs module and merge the rows in with source='sprint'. Requires project_id. If backlogs is not installed the versions are still returned and 'notes' says why sprints are missing — the call does not fail. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sums | No | Present only when show_sums was requested. | |
| items | No | The page of results. | |
| notes | No | Degradation markers: capped aggregations, unavailable modules, … | |
| groups | No | Present only when group_by was requested. | |
| pagination | Yes | Total/page/page_size/has_more. |