Skip to content

Conversation

@egeorcun
Copy link

@egeorcun egeorcun commented Jan 30, 2026

Description

The Plane API uses /issues/ endpoint for work items, but the SDK was using /work-items/ which causes HTTP 404 errors on all work item operations.

This PR fixes the endpoint paths in plane/api/work_items/base.py:

Changed endpoints:

  • create(): /work-items/issues
  • retrieve(): /work-items/{id}/issues/{id}
  • retrieve_by_identifier(): /work-items/{identifier}/issues/{identifier}
  • update(): /work-items/{id}/issues/{id}
  • delete(): /work-items/{id}/issues/{id}
  • list(): /work-items/issues
  • search(): /work-items/search/issues/search

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Before (404 Error):
POST /api/v1/workspaces/plane/projects/{id}/work-items/ 404

After (200 Success):
POST /api/workspaces/plane/projects/{id}/issues/ 200

Test Scenarios

Tested on self-hosted Plane instance (v1.0.0) with plane-mcp-server:

  1. list() - Successfully lists all issues in a project
  2. create() - Successfully creates new issues
  3. retrieve() - Successfully retrieves issue by ID
  4. update() - Successfully updates existing issues
  5. delete() - Successfully deletes issues
  6. search() - Successfully searches issues

All operations return expected responses instead of 404 errors.

References

Related to plane-mcp-server integration - the MCP server uses this SDK and was failing on all work item operations due to incorrect endpoint paths.

Summary by CodeRabbit

  • Chores
    • API endpoints for work item operations have been updated to use the "issues" namespace across all operations (create, retrieve, update, delete, list, and search).

✏️ Tip: You can customize this high-level summary in your review settings.

The Plane API uses /issues/ endpoint for work items, but the SDK was
using /work-items/ which causes HTTP 404 errors on all work item operations.

Changed endpoints in plane/api/work_items/base.py:
- create(): /work-items -> /issues
- retrieve(): /work-items/{id} -> /issues/{id}
- retrieve_by_identifier(): /work-items/{identifier} -> /issues/{identifier}
- update(): /work-items/{id} -> /issues/{id}
- delete(): /work-items/{id} -> /issues/{id}
- list(): /work-items -> /issues
- search(): /work-items/search -> /issues/search
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

API endpoint paths in the WorkItems class are being updated from "work-items" to "issues" across all CRUD operations and query methods, including create, retrieve, update, delete, list, and search operations.

Changes

Cohort / File(s) Summary
API Endpoint Path Update
plane/api/work_items/base.py
Replaced API path segment from "work-items" to "issues" across all CRUD methods (create, retrieve, update, delete, list) and search query operations. Request/response logic remains unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hop, hop, hooray! The work-items hop away,
Issues take their place, leading the fray,
Paths now aligned, from "work" to the "test,"
Our API endpoints dressed in their best! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating API endpoints from 'work-items' to 'issues', which is the primary objective of this bug-fix PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@plane/api/work_items/base.py`:
- Line 42: All endpoints in base.py that build the deprecated issues path need
to be updated: replace any occurrences of the string
f"{workspace_slug}/projects/{project_id}/issues" (used by methods create(),
retrieve(), update(), delete(), and list()) with
f"{workspace_slug}/projects/{project_id}/work-items"; search for any other uses
of "issues" in URL builders within class methods in this file and update them to
"work-items" so all request paths (create, retrieve, update, delete, list)
conform to the v1 API.
🧹 Nitpick comments (1)
plane/api/work_items/base.py (1)

21-31: Consider aligning SDK naming with API terminology in a future refactor.

The class is named WorkItems and uses WorkItem* models, but the actual API endpoints use /issues/. While acceptable for this bug fix, this naming mismatch could confuse SDK users who might expect the API paths to match the class name.

A future refactor could rename WorkItemsIssues and the related models to align with the API terminology, though this would be a breaking change requiring a major version bump.

"""
response = self._post(
f"{workspace_slug}/projects/{project_id}/work-items",
f"{workspace_slug}/projects/{project_id}/issues",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Plane API v1.0.0 official documentation issues endpoint

💡 Result:

Plane’s official API v1 docs are on the Plane Developers site (API Reference). The docs note that all /api/v1/.../issues/ endpoints are deprecated in favor of /api/v1/.../work-items/ (support ends March 31, 2026). [2]

Base URL (Plane Cloud): https://api.plane.so/ [1]

“Issues” (Work Items) endpoints (v1)

These are documented under Work Item (the pages’ URLs still contain /api-reference/issue/..., but the endpoint paths use work-items). [3]

  • Create: POST /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/ [3]
  • List: GET /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/ [4]
  • Get by ID: GET /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [5]
  • Update: PATCH /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [6]
  • Delete: DELETE /api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/ [7]

🏁 Script executed:

cd /tmp && find . -name "base.py" -path "*/work_items/*" 2>/dev/null | head -5

Repository: makeplane/plane-python-sdk

Length of output: 52


🏁 Script executed:

find . -type f -name "base.py" | grep -i work 2>/dev/null

Repository: makeplane/plane-python-sdk

Length of output: 141


🏁 Script executed:

rg "workspace_slug.*projects.*issues" --type py -B 5 -A 5

Repository: makeplane/plane-python-sdk

Length of output: 11248


Replace deprecated /issues endpoints with /work-items paths.

The Plane API v1 documentation specifies that /api/v1/.../issues/ endpoints are deprecated in favor of /api/v1/.../work-items/ (deprecation support ends March 31, 2026). This file uses the deprecated /issues path across all methods—create(), retrieve(), update(), delete(), and list(). Update all endpoint paths from {workspace_slug}/projects/{project_id}/issues to {workspace_slug}/projects/{project_id}/work-items to align with current API standards.

🤖 Prompt for AI Agents
In `@plane/api/work_items/base.py` at line 42, All endpoints in base.py that build
the deprecated issues path need to be updated: replace any occurrences of the
string f"{workspace_slug}/projects/{project_id}/issues" (used by methods
create(), retrieve(), update(), delete(), and list()) with
f"{workspace_slug}/projects/{project_id}/work-items"; search for any other uses
of "issues" in URL builders within class methods in this file and update them to
"work-items" so all request paths (create, retrieve, update, delete, list)
conform to the v1 API.

egeorcun pushed a commit to egeorcun/plane-mcp-server that referenced this pull request Jan 30, 2026
Temporarily using forked plane-sdk from:
https://github.com/egeorcun/plane-python-sdk

This fixes the /work-items -> /issues endpoint issue.
Will revert to official SDK once PR makeplane#18 is merged:
makeplane/plane-python-sdk#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant