Skip to content

chore(docs): update params and response types of ocs endpoints - #8430

Open
grnd-alt wants to merge 1 commit into
mainfrom
chore/update-API-docs
Open

grnd-alt wants to merge 1 commit into
mainfrom
chore/update-API-docs

Conversation

@grnd-alt

@grnd-alt grnd-alt commented Sep 24, 2026 •

Copy link
Copy Markdown
Member
  • AI used

@grnd-alt
grnd-alt force-pushed the chore/update-API-docs branch from 2327c85 to 6db4271 Compare September 24, 2026 13:14
@grnd-alt
grnd-alt requested a lite review from Copilot September 24, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 4 Medium severity · 2 Low severity

Open (6)
What changed in this PR

Updates the Deck REST API documentation to clarify that OCS is the preferred API surface and to document OCS endpoint parameters/response types more explicitly.

Changes:

  • Added “API selection” guidance and clarified preferred (OCS) vs legacy base URLs.
  • Reworked the OCS API section to describe the standard OCS response envelope and summarize key endpoint groups (boards/stacks/cards/attachments/config/etc.) in tables.
  • Updated config endpoint documentation to reflect the newer route shape and key conventions.
File Description
docs/​API.md Expands and restructures API docs to emphasize OCS usage and document endpoint parameters/response types.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/API.md
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
Comment thread docs/API.md Outdated
@blizzz

blizzz commented Sep 24, 2026

Copy link
Copy Markdown
Member

assisted-by-trailer applicable?

Assisted-by: GitHub Copilot:MAI-Code-1.1-Flash

Signed-off-by: grnd-alt <git@belakkaf.net>
@grnd-alt
grnd-alt force-pushed the chore/update-API-docs branch from 6db4271 to 016bc66 Compare September 24, 2026 15:07

@blizzz blizzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My Claude also complains 😅 :

Sloppiness (AI-generated, and it shows)

  • The "API selection" section says the same thing twice in a row, then a third time under # OCS API.
  • The closing paragraph ("The config endpoints are already summarized above… exactly as implemented in ConfigController and ConfigService") is filler, and it points users at internal class names.
  • Capitalisation in the Notes bullets is inconsistent ("comments support…", "the session endpoint…").
  • Per your docs rule: the new lines 19–20 add more nextcloud.local URLs. They should be nextcloud.example.com. Line 81 and older examples have the same problem, which is pre-existing.

Comment thread docs/API.md
| Method | Route | Parameters | Response |
| --- | --- | --- | --- |
| POST | `/cards` | `title: string`, `stackId: int`, `boardId?: int`, `type?: string` (`plain` by default), `owner?: string`, `order?: int` (`999` by default), `description?: string`, `duedate?: mixed`, `startdate?: mixed`, `labels?: array`, `users?: array`, `color?: string` | `Card` |
| PUT | `/cards/{cardId}` | `cardId: int`, `title: string`, `stackId: int`, `type: string`, `order: int`, `description: string`, `duedate`, `deletedAt`, `boardId?: int`, `owner?: string\|array`, `archived?: mixed`, `startdate?: mixed` | `Card` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in routes, the URL parameter is indeed called cardId, but in the contoller method the parameter is plainly id. Somerthing's afoot there.

Comment thread docs/API.md
| GET | `/board/{boardId}` | `boardId: int` | `Board` or federated board payload |
| POST | `/boards` | `title: string`, `color: string` | `Board` |
| POST | `/boards/team` | `title: string`, `teamId: string`, `color?: string` | `Board` |
| POST | `/boards/{boardId}/acl` | `boardId: int`, `type: int`, `participant: string`, `permissionEdit: bool`, `permissionShare: bool`, `permissionManage: bool`, `remote?: string` | ACL object |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't remote? be dropped here?

Comment thread docs/API.md
- Prefer the OCS API at `/ocs/v2.php/apps/deck/api/v1.0/` for all integrations and newly written clients. This is the canonical API used by the Deck web UI and the server-side access points in the app code.
- The legacy app API at `/index.php/apps/deck/api/v1.0/` still exists for backwards compatibility and is kept available, but it is not the recommended integration path for new projects.

Use the OCS routes for all new integrations. The legacy `/index.php/apps/deck/api/v1.0/` endpoints still work for backwards compatibility, but they are not the preferred API contract for clients.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These actions might not be possible through OCS:

  • Board: update (rename, colour), delete, archive, clone. ACL update and delete are missing too. BoardOcsController::updateAcl() exists, but no route points to it, so it's dead code.
  • Labels: create, update, delete. Assigning existing labels to cards works.
  • Stack: update or rename. Create, reorder, delete and done are available.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants