Forum Discussion

rshaizawa's avatar
rshaizawa
Explorer | Level 3
5 years ago

search_v2 API does not work when using id

Hi ,

 

The specification of search_v2 api(link)  is written as follows. so I tried to search by id.

 

path String(pattern="(/(.|[\r\n]):*)?|id:.*|(ns:[0-9]+(/.*)?)")? Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified. This field is optional.

But, When send a request with the id on using Dropbox Api Explore , return 400 error.

Does search_v2 api not support searching by id?

 

 

description:

request:

(Authorization and path value is masked.)

curl -X POST https://api.dropboxapi.com/2/files/search_v2 \
  --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  --header 'Content-Type: application/json' \
  --data '{"query":"Sample","options":{"path":"id:dummy"}}'

Response:

Error: 400
Error in call to API function "files/search_v2": <redacted>

Thanks,

rshaizawa

    • rm2020's avatar
      rm2020
      New member | Level 2

      FYI As requested in a recent email from dropbox, I've just converted our system to use the /search_v2 api and am experiencing this problem as well.

       

      "Error in call to API function "files/search_v2": rpc error: ... deep stack trace removed ..."

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        rm2020 Thanks for the additional report. The team is aware of the issue and is looking into it. I recommend switching to using paths instead of IDs when calling /2/files/search_v2 to avoid this error.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    This should be fixed now. Please try again and let us know if you're still seeing any issues. Thanks!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 14 hours ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!