Repository navigation
feat(api): pages and widgets on api/2 - #3133
Open
rubenvdlinde wants to merge 2 commits into
Open
rubenvdlinde wants to merge 2 commits into
rubenvdlinde wants to merge 2 commits into
Conversation
3 of 5 tasks
rubenvdlinde
force-pushed
the
feat/noid/grid-pages-api
branch
from
October 22, 2026 11:37
0511a8e to
d522080
Compare
3 of 5 tasks
rubenvdlinde
force-pushed
the
feat/noid/grid-pages-api
branch
from
October 22, 2026 13:25
d522080 to
e97b9ea
Compare
rubenvdlinde
force-pushed
the
feat/noid/grid-pages-api
branch
from
October 23, 2026 08:05
e97b9ea to
daeab7e
Compare
rjzondervan
reviewed
Oct 23, 2026
Comment on lines
+163
to
+167
| ['name' => 'ContextPage#create', 'url' => '/api/2/contexts/{contextId}/pages', 'verb' => 'POST'], | ||
| ['name' => 'ContextPage#show', 'url' => '/api/2/contexts/{contextId}/pages/{pageId}', 'verb' => 'GET'], | ||
| ['name' => 'ContextPage#update', 'url' => '/api/2/contexts/{contextId}/pages/{pageId}', 'verb' => 'PATCH'], | ||
| ['name' => 'ContextPage#destroy', 'url' => '/api/2/contexts/{contextId}/pages/{pageId}', 'verb' => 'DELETE'], | ||
| ['name' => 'ContextPage#widgetTypes', 'url' => '/api/2/widget-types', 'verb' => 'GET'], |
There was a problem hiding this comment.
As far as I see, new routes are now added in the controllers, not in the routes.php.
rubenvdlinde
force-pushed
the
feat/noid/grid-pages-api
branch
from
October 24, 2026 08:09
daeab7e to
a812d77
Compare
Read, add, change and delete grid pages with their widgets, and list the widget types with their settings schemas. Reading needs read access to the application, changes need manage access. Page creation is limited to 20 a minute per user. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
rubenvdlinde
force-pushed
the
feat/noid/grid-pages-api
branch
from
October 26, 2026 09:24
a812d77 to
e241b46
Compare
rubenvdlinde
marked this pull request as ready for review
October 26, 2026 09:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3099, on top of #3132 (widget lifecycle). This adds the five endpoints from #3100. They're routed with
#[ApiRoute]on the controller, like the newer public endpoints, soroutes.phpdoesn't change.Size: 3738 lines: 773 code, 677 tests, and 2288 generated OpenAPI (
openapi.jsonandopenapi.ts) in a separate commit you can skip.GET /api/2/contexts/{contextId}/pages/{pageId}POST /api/2/contexts/{contextId}/pagesPATCH /api/2/contexts/{contextId}/pages/{pageId}DELETE /api/2/contexts/{contextId}/pages/{pageId}GET /api/2/widget-typespage_<id>. An invalid one, or one already used in the application, gives a 400.OpenAPI and the TypeScript types are regenerated, in a separate commit.
A data widget's source may also be given as
{nodeType, nodeId}of a table or view that isn't in the application yet. The server then adds it to the application first, after the same permission check as editing the application (403 if you can't manage that table). Like any table added to an application, it also appears on the start page, and it stays in the application when the widget is removed later.How it was tested
On Nextcloud 34 with PostgreSQL:
PageServiceTest, including that someone outside the application gets a 404 before any permission check or writeContextPageControllerTest: 400, 403 and 404, and that every endpoint declares its routeWidgetServiceTestandGridWidgetTypesTestcomposer cs:check, psalm and rector, all cleanBy hand on a test instance:
🖼️ Screenshots
Backend only, no UI changes. The frontend follows in separate pull requests.
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)