Skip to content

feat(api): expose project Pages through the v1 API - #9758

Closed
edho08 wants to merge 2 commits into
makeplane:previewfrom
edho08:feat/api-v1-pages
Closed

feat(api): expose project Pages through the v1 API#9758
edho08 wants to merge 2 commits into
makeplane:previewfrom
edho08:feat/api-v1-pages

Conversation

@edho08

@edho08 edho08 commented Sep 4, 2026

Copy link
Copy Markdown

Description

Adds API-key-authenticated project Page endpoints under /api/v1 while preserving the existing session-authenticated /api Page routes.

This is a best-effort OSS implementation based on the Page functionality currently present in Plane OSS preview. It is not a 1:1 implementation of the commercial SDK/MCP surface; workspace-level Page operations are intentionally excluded because the OSS branch has no corresponding CRUD routes.

The implementation reuses the existing project Page handlers and exposes project Page listing, creation, retrieval, updates, deletion, archive/restore, locking, access changes, descriptions, versions, favorites, duplication, and summary operations through X-Api-Key authentication.

Type of Change

  • Feature (non-breaking change which adds functionality)

Screenshots and Media (if applicable)

Not applicable — API-only change.

Test Scenarios

  • Added contract coverage for project Page route registration and X-Api-Key authentication.
  • Added project Page create, list, and PUT update coverage, including verification of the ProjectPage relation.
  • Added a regression test confirming the existing session-authenticated /api Page route remains available.
  • ruff format --check passed.
  • ruff check passed.
  • git diff --check passed.

References

Refs #9511

Summary by CodeRabbit

  • New Features

    • Added API access for creating, listing, updating, favoriting, describing, versioning, duplicating, archiving, locking, and managing access to pages.
    • Added cursor-paginated page listings with appropriate ownership filtering.
    • Added API-key authentication support for page endpoints.
  • Tests

    • Added coverage for page routes, authentication, legacy access, and page create, list, and update workflows.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 14336eff-ff8b-4f92-911a-f38e58e92ae8

📥 Commits

Reviewing files that changed from the base of the PR and between da1a7ab and 915e6da.

📒 Files selected for processing (5)
  • apps/api/plane/api/urls/__init__.py
  • apps/api/plane/api/urls/page.py
  • apps/api/plane/api/views/__init__.py
  • apps/api/plane/api/views/page.py
  • apps/api/plane/tests/contract/api/test_pages.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds API-key-authenticated page routes for CRUD, favorites, descriptions, versions, duplication, access, archive, lock, and summary operations. Contract tests cover route registration, authentication, session access, creation, listing, and updates.

Changes

Page API

Layer / File(s) Summary
Register page API routes
apps/api/plane/api/urls/page.py, apps/api/plane/api/urls/__init__.py, apps/api/plane/api/views/__init__.py
Registers page routes and exports the page endpoint classes.
Implement API-key page handlers
apps/api/plane/api/views/page.py
Adds API-key-authenticated wrappers and paginated page listing with guest-member ownership filtering.
Validate page API behavior
apps/api/plane/tests/contract/api/test_pages.py
Tests route registration, authentication, session access, page creation, listing, project association, and updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 915e6

API-key clients can now manage project Pages through v1 endpoints while existing session-authenticated Page routes remain available. Covered route, authentication, and CRUD behavior leaves no identified merge-blocking risk.

Sequence Diagram(s)

sequenceDiagram
  participant APIClient
  participant PageURLPatterns
  participant PageViewSet
  participant AppPageViewSet
  participant PageSerializer
  APIClient->>PageURLPatterns: Send API-key page request
  PageURLPatterns->>PageViewSet: Resolve page route
  PageViewSet->>AppPageViewSet: Execute page operation
  PageViewSet->>PageSerializer: Serialize paginated results
  PageSerializer-->>APIClient: Return page response
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: exposing project Pages through the v1 API.
Description check ✅ Passed The description covers the required sections, explains the API scope and exclusions, identifies the feature change, documents test scenarios, and includes a reference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Warning

⚠️ This pull request shows signs of AI-generated slop (redundant_comments). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@CLAassistant

CLAassistant commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@edho08
edho08 marked this pull request as ready for review September 4, 2026 03:23
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 4, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +2 new · 🟠 ~1 changed · 🔴 -0 removed · 1 flow · 5 files · commit 915e6da


Architecture

Architecture diagram for makeplane/plane at 915e6da

3 components touched across 2 lanes.

Open full size


Inside the changed components — 1 view

Component view — Public Page API

Internal structure of the public v1 page endpoints, subclasses of core page viewsets, API key authentication, and contract tests.

Architecture view of Component view — Public Page API in makeplane/plane

Data flow

Data flow diagram for makeplane/plane at 915e6da

Listing project pages via public v1 API

Open full size


Drill down
Application Services — 3 components
🟡 CHANGED Public REST API (v1)

Registers public v1 URL routing patterns including the newly mounted page endpoints.

🟢 NEW Page v1 Endpoints

Defines public v1 REST routes and viewsets for project pages, favorite pages, descriptions, versions, and duplicates with API key authentication.

🟢 NEW Page Contract Tests

Contract test suite verifying v1 page route registration, API key enforcement, and CRUD operations.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

GitHub will not let you zoom an image in a comment. The link under each diagram opens it full size on a page of its own, where you can.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • PR Lens is free for open source. A star on the repository is what keeps it going.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Come say hi on Discord

@oth-body

oth-body commented Sep 4, 2026 via email

Copy link
Copy Markdown

@edho08

edho08 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Im closing this PR because it duplicate #9757.

@edho08 edho08 closed this Sep 4, 2026
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.

3 participants