-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: Change work-items endpoint to issues #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
📝 WalkthroughWalkthroughAPI 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the 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. Comment |
There was a problem hiding this 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
WorkItemsand usesWorkItem*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
WorkItems→Issuesand 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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 -5Repository: makeplane/plane-python-sdk
Length of output: 52
🏁 Script executed:
find . -type f -name "base.py" | grep -i work 2>/dev/nullRepository: makeplane/plane-python-sdk
Length of output: 141
🏁 Script executed:
rg "workspace_slug.*projects.*issues" --type py -B 5 -A 5Repository: 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.
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
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→/issuesretrieve():/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→/issuessearch():/work-items/search→/issues/searchType of Change
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:
list()- Successfully lists all issues in a projectcreate()- Successfully creates new issuesretrieve()- Successfully retrieves issue by IDupdate()- Successfully updates existing issuesdelete()- Successfully deletes issuessearch()- Successfully searches issuesAll 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
✏️ Tip: You can customize this high-level summary in your review settings.