Skip to content

Add Work Items API support to replace deprecated Epic API #3442

Open

Description

@elminster-aom

Description of the problem, including code/CLI snippet

GitLab deprecated the Epic REST API in GitLab 17.0 and plans to remove it in API v5. GitLab 18.1 and later instruct users to use the Work Items API instead. GitLab explicitly describes this migration as a breaking change.

This python-gitlab module still exposes the legacy Epic REST API through objects defined in gitlab/v4/objects/epics.py, including, for example:

  • GroupEpic
  • GroupEpicIssue
  • GroupEpicIssueManager
  • GroupEpicManager

Applications using these objects therefore currently depend on GitLab's deprecated Epics REST API.

Support for GitLab's replacement Work Items API would provide python-gitlab users with a migration path before the legacy Epic REST API is removed.

Potentially affected code

At least:

  • gitlab/v4/objects/epics.py: legacy Epic object definitions
  • docs/gl_objects/epics.rst: Epic documentation
  • tests/functional/api/test_epics.py: Epic functional tests

Other references to the legacy Epic APIs may also need to be reviewed.

Expected Behavior

python-gitlab should provide an API for working with epics through GitLab's supported Work Items API, allowing users to migrate away from GroupEpic and related legacy objects.

For example, an eventual interface could look similar to:

group = gl.groups.get(group_id)
epic = group.work_items.create({
    "title": "My Epic",
    "work_item_type": "epic",
})

# Exact API for establishing parent/child relationships is TBD.

My logic suggests that the exact Python interface should follow the capabilities and data model of GitLab's Work Items API rather than necessarily preserving the existing Epic API interface.

It would also be useful to document the migration path from the existing GroupEpic APIs to their Work Items equivalents.

Actual Behavior

The currently available interface uses GitLab's deprecated Epic REST API:

group = gl.groups.get(group_id)
epic = group.epics.create({"title": "My Epic"})
epic_issue = epic.issues.create({"issue_id": 4})

This works with the legacy REST API today, but GitLab has deprecated that API and recommends the Work Items API for GitLab 18.1 and later.

There does not appear to be an equivalent high-level python-gitlab Work Items interface that users can migrate this code to.

Specifications

  • python-gitlab version: 8.5.0
  • Gitlab server version (or gitlab.com): 19.3.1 or gitlab.com
  • GitLab API currently used by python-gitlab version: 4

Activity

  1. github-actions commented on Nov 3, 2026

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  2. elminster-aom commented on Nov 8, 2026

    @elminster-aom
    Author

    The support for replacing deprecated epic API is still required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions