Skip to content

Migrate search from deprecated Search to SearchV2 API#243

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
migrate-search-v2
Jun 18, 2026
Merged

Migrate search from deprecated Search to SearchV2 API#243
AndreyVMarkelov merged 1 commit into
masterfrom
migrate-search-v2

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace deprecated Search endpoint with SearchV2 which supports cursor-based pagination
  • All results are now fetched (previously limited to 100 matches)
  • Path scoping uses SearchOptions.Path instead of positional SearchArg field
  • Output routed through commandOutput for testability
  • Added mock support for SearchV2 and SearchContinueV2 in test infrastructure

Test plan

  • dbxcli search "query" returns results using SearchV2
  • dbxcli search "query" /path scopes search correctly
  • dbxcli search -l "query" shows long format with revision/size/time
  • Large result sets are fully paginated (no silent truncation)
  • All tests pass (go test ./...)

The Dropbox Search endpoint is deprecated in favor of SearchV2.
This migration adds cursor-based pagination (fetches all results
instead of being limited to 100), uses SearchOptions for path
scoping, and routes output through commandOutput for testability.
@AndreyVMarkelov AndreyVMarkelov merged commit c5553c4 into master Jun 18, 2026
7 checks passed
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.

1 participant