Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I'm seeing weird intermittent behaviour from the search_v2 endpoint.
It seems to return the server_modified of the oldest file in the search result for every single file.
For example: Here's a query:
curl -X POST https://api.dropboxapi.com/2/files/search_v2 \
--header 'Authorization: Bearer TOKEN_REMOVED' \
--header 'Content-Type: application/json' \
--data '{"query":"20230122141412","options":{"file_extensions":[],"filename_only":true}}'
and the response is:
{
"has_more": false,
"matches": [
{
"match_type": {
".tag": "filename"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
"client_modified": "2023-01-22T03:15:21Z",
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"id": "id:iG_fK2UiedcAAAAAAAAPuw",
"is_downloadable": true,
"name": "sms-20230122141412.xml",
"path_display": "/Apps/SMSBackupRestore/sms-20230122141412.xml",
"path_lower": "/apps/smsbackuprestore/sms-20230122141412.xml",
"rev": "5f2d1b1e7e8ef2d1f961d",
"server_modified": "2023-01-22T03:15:09Z",
"sharing_info": {
"modified_by": "dbid:AADnkh_8v4p6Kans4_Gbh8f2yHNamMdZPQE",
"parent_shared_folder_id": "757044765",
"read_only": false
},
"size": 224407
}
}
},
{
"match_type": {
".tag": "filename"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
"client_modified": "2023-01-22T03:15:00Z",
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"id": "id:iG_fK2UiedcAAAAAAAAPug",
"is_downloadable": true,
"name": "calls-20230122141412.xml",
"path_display": "/Apps/SMSBackupRestore/calls-20230122141412.xml",
"path_lower": "/apps/smsbackuprestore/calls-20230122141412.xml",
"rev": "5f2d1b0a94ecf2d1f961d",
"server_modified": "2023-01-22T03:15:09Z",
"sharing_info": {
"modified_by": "dbid:AADnkh_8v4p6Kans4_Gbh8f2yHNamMdZPQE",
"parent_shared_folder_id": "757044765",
"read_only": false
},
"size": 154796
}
}
}
]
}
Notice the server_modified of both the files is the same.
Another query specifying the filename of the first file returned from the above response:
curl -X POST https://api.dropboxapi.com/2/files/search_v2 \
--header 'Authorization: Bearer TOKEN_REMOVED' \
--header 'Content-Type: application/json' \
--data '{"query":"sms-20230122141412.xml","options":{"file_extensions":[],"filename_only":true}}'
returns the correct server_modified:
{
"has_more": false,
"matches": [
{
"match_type": {
".tag": "filename"
},
"metadata": {
".tag": "metadata",
"metadata": {
".tag": "file",
"client_modified": "2023-01-22T03:15:21Z",
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"id": "id:iG_fK2UiedcAAAAAAAAPuw",
"is_downloadable": true,
"name": "sms-20230122141412.xml",
"path_display": "/Apps/SMSBackupRestore/sms-20230122141412.xml",
"path_lower": "/apps/smsbackuprestore/sms-20230122141412.xml",
"rev": "5f2d1b1e7e8ef2d1f961d",
"server_modified": "2023-01-22T03:15:30Z",
"sharing_info": {
"modified_by": "dbid:AADnkh_8v4p6Kans4_Gbh8f2yHNamMdZPQE",
"parent_shared_folder_id": "757044765",
"read_only": false
},
"size": 224407
}
}
}
]
}
The server_modified of the file is correct in this response.
There seems to be something weird going on with the results.
Can someone at Dropbox please look into this?
Thanks
Thanks for the report! We'll look into it and I'll follow up here once I have an update.
Apologies for the delayed response. The team has reported that this was fixed. Please let us know if you're still seeing this.
Hi there!
If you need more help you can view your support options (expected response time for a 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!