cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Discuss Dropbox Developer & API

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

Not able to copy the file into quarantine folder through API, running into 409 errors

Not able to copy the file into quarantine folder through API, running into 409 errors

krishnpriya12
New member | Level 2

Hi Team, 

I am facing an issue with an API, 

{"url":"https://api.dropboxapi.com/2/files/copy_reference/get","http_method":"POST","headers":{"Dropbox-API-Path-Root":"","Content-Type":"application/json","Dropbox-API-Select-User":"dbmid:AADMhj2pSRiiUYONHLNfd5H1niR4V7r-qkY"},"query_parameters":{},"body":{"path":"ns:11460496721/coco.docx"},"input":["param_user_id","param_file_path"]} failed with status=409 headers=content-type: application/jsoncache-control: no-cachecontent-security-policy: sandbox allow-forms allow-scriptsx-content-type-options: nosniffdate: Thu, 26 Sep 2024 17:05:57 GMTserver: envoycontent-length: 94x-dropbox-response-origin: far_remotex-dropbox-request-id: 17f6201cd0f44db680648fade0d6df91 body=Response{protocol=h2, code=409, message=, url=https://api.dropboxapi.com/2/files/copy_reference/get}

I am getting everytime path not found errors in the response.

I tried editing the passing the path in this way also "ns:5162725089/Test_Tarjetas.CSV" but didn't get a luck on it. Running into the same error.

For the below activity the event that I have received from team logs is:-

{
"timestamp": "2024-09-27T06:21:08Z",
"event_category": {
".tag": "file_operations"
},
"actor": {
".tag": "admin",
"admin": {
".tag": "team_member",
"account_id": "dbid:AAC6mPATGODbRum_nz6Mv_CRwLC4emU5nVw",
"display_name": "Sudhamini Tirumalagari",
"email": "sudhamini.tirumalagari@skyhighsecurity.com",
"team_member_id": "dbmid:AADMhj2pSRiiUYONHLNfd5H1niR4V7r-qkY"
}
},
"origin": {
"geo_location": {
"city": "Patna",
"region": "Bihar",
"country": "IN",
"ip_address": "103.156.103.158"
},
"access_method": {
".tag": "end_user",
"end_user": {
".tag": "web",
"session_id": "dbwsid:162871108987873971850818952396323230069"
}
}
},
"involve_non_team_member": false,
"context": {
".tag": "team_member",
"account_id": "dbid:AAC6mPATGODbRum_nz6Mv_CRwLC4emU5nVw",
"display_name": "Sudhamini Tirumalagari",
"email": "sudhamini.tirumalagari@skyhighsecurity.com",
"team_member_id": "dbmid:AADMhj2pSRiiUYONHLNfd5H1niR4V7r-qkY"
},
"participants": [],
"assets": [
{
".tag": "file",
"path": {
"contextual": "/F111/coco.docx",
"namespace_relative": {
"ns_id": "5117643041",
"relative_path": "/coco.docx",
"is_shared_namespace": true
}
},
"display_name": "coco.docx",
"file_id": "id:decDtw1cxAUAAAAAAAAABw",
"file_size": 13186
}
],
"event_type": {
".tag": "file_delete",
"description": "Deleted files and/or folders"
},
"details": {
".tag": "file_delete_details"
}
}

Can you please help in understanding what is the alternate way to add path for this type of event when we recieve?
1 Reply 1

Greg-DB
Dropbox Staff

I see you're not actually setting "Dropbox-API-Path-Root", so that would default to the "home" mode, but the namespace you're trying to access may not be mounted underneath the user's home.

 

That being the case, you'll need to set the root such that the namespace will be found. You can do that like this, for example:

  • set the Dropbox-API-Path-Root header to {".tag": "namespace_id", "namespace_id": "11460496721"}
  • and set the path parameter to "/coco.docx"
Need more support?
Who's talking

Top contributors to this post

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