Skip to content

feat(api): add workspace bulk link read - #232

Closed
Optic00 wants to merge 1 commit into
Windshiftapp:mainfrom
Optic00:codex/bulk-link-read
Closed

feat(api): add workspace bulk link read#232
Optic00 wants to merge 1 commit into
Windshiftapp:mainfrom
Optic00:codex/bulk-link-read

Conversation

@Optic00

@Optic00 Optic00 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add authenticated, paginated GET /rest/api/v1/links?workspace_id=...
  • require items:read plus workspace item.view, with the same opaque 404 for missing and inaccessible workspaces
  • return only direct non-custom-field item links whose endpoints are both in the requested workspace, ordered by link ID
  • reject invalid pagination and unsupported sort parameters, and document the contract in OpenAPI

Verification

  • go test ./internal/restapi/v1/handlers ./internal/services
  • temporary table tests for defaults, empty and invalid values, unsupported sorting, and offset overflow
  • make openapi-check
  • validated both committed OpenAPI documents with kin-openapi
  • independent Codex and Claude reviews

Fixes #218

@stefan-ernst

Copy link
Copy Markdown
Contributor

Hi @Optic00 - thank you for the PR. Unfortunately there is already a /rest/api/v1/links/batch on main that essentially does the same thing. It accepts a QL parameter so you can query links by arbitrary values, not only workspace, which makes it a bit more useful. I will assign issues in the future directly to myself so work is not duplicated accidentally

@Optic00

Optic00 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up. I confirmed the existing GET /rest/api/v1/links/batch endpoint, with a ql workspace_id filter, covers this use case. I picked up #218 because it was open and unassigned, but the route was already in my base branch, so I missed it. Closing this PR as a duplicate.

@Optic00 Optic00 closed this Aug 29, 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.

[Feature Request] [API] Add a bulk read for links (GET /links)

2 participants