cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you new to Dropbox? Our Newcomers group is the perfect place to learn the basics, find out more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

search_v2 returning wrong server_modified - returns the date of oldest file for all files

search_v2 returning wrong server_modified - returns the date of oldest file for all files

Ritesh
Explorer | Level 3

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

2 Replies 2

Greg-DB
Dropbox Staff

Thanks for the report! We'll look into it and I'll follow up here once I have an update.

Greg-DB
Dropbox Staff

Apologies for the delayed response. The team has reported that this was fixed. Please let us know if you're still seeing this.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?