I can't figure out the exact circumstances, but sometimes, when sending a team_log/get_events request, the latest event is missing in the answer.
We are using Dropbox's webhook system to get notified whenever a new event is triggered. When we get notified, we use the team_log/get_events endpoint to retrieve the events. But we noticed that sometimes, the last event is missing from the answer and every following requests to the endpoint will have the same issue.
So as a test, I added and deleted a new text file from Dropbox. When the webhook have been triggered, I sent two consecutive requests.
Here is the answer I got when sending the first request : (We only get the Add event with the has_more boolean as false)
Spoiler
{
"events": [
{
"timestamp": "2021-11-17T14:40:17Z",
"event_category": { ".tag": "file_operations" },
"actor": {
".tag": "admin",
"admin": {
".tag": "team_member",
"account_id": "dbid:AAA4IxcQI59v7ONmxBTvJuVN7iMmLEAR3IY",
"display_name": "Xalbat Echeverria",
"email": "xecheverria@isdecisions.com",
"team_member_id": "dbmid:AAAAlVKFr0jmMrY1FT_1Wbh-1LJUJrxuHwM"
}
},
"origin": {
"geo_location": {
"city": "Anglet",
"region": "Nouvelle-Aquitaine",
"country": "FR",
"ip_address": "185.182.168.24"
},
"access_method": {
".tag": "end_user",
"end_user": {
".tag": "desktop",
"session_id": "dbdsid:AACbqF35lbBz44w8my11bsfQsldXapES9Ro"
}
}
},
"involve_non_team_member": false,
"context": {
".tag": "team_member",
"account_id": "dbid:AAA4IxcQI59v7ONmxBTvJuVN7iMmLEAR3IY",
"display_name": "Xalbat Echeverria",
"email": "xecheverria@isdecisions.com",
"team_member_id": "dbmid:AAAAlVKFr0jmMrY1FT_1Wbh-1LJUJrxuHwM"
},
"participants": [],
"assets": [
{
".tag": "file",
"path": {
"contextual": "/Test X/New Text Document.txt",
"namespace_relative": {
"ns_id": "1861968209",
"relative_path": "/New Text Document.txt",
"is_shared_namespace": true
}
},
"display_name": "New Text Document.txt",
"file_id": "id:rb8b75y3ODAAAAAAAAAAOQ"
}
],
"event_type": {
".tag": "file_add",
"description": "Added files and/or folders"
},
"details": { ".tag": "file_add_details" }
}
],
"cursor": "AAD1hlUH-xf6DZe2MVFmdviIy9iTIcTIN-L_yRSGJRcdX8As3Wxr9pzJI722iiBOa9isB-nixKAbK3jYtK0k_Q-jU_vMAS4zPMbGpf-EnhrcKYsIgMNmkXXhMq6hokr_1Ma8EhfSDU7Pd4qiAFWGDC0Fao83Tx9iSkRhnmrKv2xP-O8paIkLxnzzmU1AWho6JOnN_jxQ--CxLoTu67zBdzA6kFD_s41n22anmHIPQhllnvs_o3XjnBdJM6amGjyvhN7-bSpQkcK-nkIsBJkw1SMOnDcNhaPopc70mYSsPuZahOwiUN_XzKyYukrF6YzxGW8rMOF3Qj2eZlXABoYF1sKt-8sn0YqileQdtc_lhpK3BGZ4ldbl5o-Lbd-M76oGIJuQz041wL-NrOD7QjMq1lUTwzpa1RBwpLWrUKigl3BmXA",
"has_more": false
}And here is the answer to the following request : (This time we get the Delete event)
Spoiler
{
"events": [
{
"timestamp": "2021-11-17T15:11:14Z",
"event_category": { ".tag": "file_operations" },
"actor": {
".tag": "admin",
"admin": {
".tag": "team_member",
"account_id": "dbid:AAA4IxcQI59v7ONmxBTvJuVN7iMmLEAR3IY",
"display_name": "Xalbat Echeverria",
"email": "xecheverria@isdecisions.com",
"team_member_id": "dbmid:AAAAlVKFr0jmMrY1FT_1Wbh-1LJUJrxuHwM"
}
},
"origin": {
"geo_location": {
"city": "Anglet",
"region": "Nouvelle-Aquitaine",
"country": "FR",
"ip_address": "185.182.168.24"
},
"access_method": {
".tag": "end_user",
"end_user": {
".tag": "desktop",
"session_id": "dbdsid:AACbqF35lbBz44w8my11bsfQsldXapES9Ro"
}
}
},
"involve_non_team_member": false,
"context": {
".tag": "team_member",
"account_id": "dbid:AAA4IxcQI59v7ONmxBTvJuVN7iMmLEAR3IY",
"display_name": "Xalbat Echeverria",
"email": "xecheverria@isdecisions.com",
"team_member_id": "dbmid:AAAAlVKFr0jmMrY1FT_1Wbh-1LJUJrxuHwM"
},
"participants": [],
"assets": [
{
".tag": "file",
"path": {
"contextual": "/Test X/New Text Document.txt",
"namespace_relative": {
"ns_id": "1861968209",
"relative_path": "/New Text Document.txt",
"is_shared_namespace": true
}
},
"display_name": "New Text Document.txt",
"file_id": "id:rb8b75y3ODAAAAAAAAAAOQ",
"file_size": 0
}
],
"event_type": {
".tag": "file_delete",
"description": "Deleted files and/or folders"
},
"details": { ".tag": "file_delete_details" }
}
],
"cursor": "AACaqNQXMiNfSfGwmBwHHBAtVAcP5r4hg_UsGdbxee-7Cdsz1dmer-iSfAlHC51QavOj4tlYvJE7z1saP9EPNSeFd1EwHsjZ84o_8iPQHhQOzf9L02LryljIb58Yd01JxBjk9rEWKY_lZuDytd21pHAXBZ-pO3XAMRn7rSin-G6kol-YJ1hQHbrIvat8HWan474TFtlK6TCArPWbgSuevZGRyitwT5YcBN_U-IPWkzjMuKgZQoLl2MlkXGuiGlAHpEIB1rOfT0Ni5yWHQwsjjJzfvpq5Ds83OGfr-8VE37tTizrmbL_MM4hWXk3QT1R2Hs1lFEWtedsx4siDS78K7B2PeiFE38eaFptW4zgO7uJ8Z2AJ7hao7YmTOlzVJGSwBQSJoV-_uCE34UfIi7bVEb4R9iUSEewZIjP5CIkATKZbdw",
"has_more": false
}I don't understand why sometimes the last event is missing, and it is causing us some troubles with applications that are in production.
Is this a known issue ? Am I missing something ?
Tell me if you need any more infos.