One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
martindart
8 years agoExplorer | Level 3
list_folder does not contain property_group
Hi,
I just want to ask why Property_Group is null even though I'm expecting some values. I'm using .Net sdk - list_folder method. Please see the the image below:
Thanks!
- Greg-DB
Dropbox Staff
Can you share the code that's not working for you? That is, the call where you're adding properties to this file, and the output from that, as well as the list_folder call? Thanks in advance!- martindartExplorer | Level 3Hi Greg,
Sure thing, here it is:
add property (https://api.dropboxapi.com/2/file_properties/templates/add_for_user)==================================================================
{
"name": "Vendor Custom Properties",
"description": "These are custom property for each accounts.",
"fields": [
{
"name": "DateUploaded",
"description": "This is the original Date of the file uploaded",
"type": {
".tag": "string"
}
},
{
"name": "Author",
"description": "This is the original Author of the file uploaded",
"type": {
".tag": "string"
}
}
]
}
Call to list_folder=========================================================
curl -X POST https://api.dropboxapi.com/2/files/list_folder \ --header 'Authorization: Bearer <token here>' \ --header 'Content-Type: application/json' \ --data '{"path":"/Apps/Workorder_QA/Documents"}'
RESPONSE=========================================================================
{ "entries": [ { ".tag": "file", "name": "Test Attachment 1 Small_636438665288743768.docx", "path_lower": "/apps/workorder_qa/documents/test attachment 1 small_636438665288743768.docx", "path_display": "/Apps/WorkOrder_QA/Documents/Test Attachment 1 Small_636438665288743768.docx", "id": "id:4-ydy_dUzQAAAAAAAAAAiw", "client_modified": "2017-10-18T02:48:50Z", "server_modified": "2017-10-18T02:48:50Z", "rev": "1235d400473", "size": 11274, "content_hash": "96ce589548047eb8e2f748dc21093c2334b189dbf8a5f71f786272a483b5b7de" } ], "cursor": "AAFygHNnj6xgvLIV8p4YySC42UxZlQHJxQZ-dRObkc5EY21mu430xQJB9Vj0KxFIzIhXi2Ws7s-D8_qjGgzFc2jWlojmjSxnQiM2Bk1kKgbFOWvLlyUaWAbFbFmFaIui8GyJIoyWuXYCqfan7sWH0m8AK4DbGOeViUUeQd0HVf2ZLzljRtHAn7cSkVkjy4laxPkbI76YDTcl-h5phorvYLrV75ILmTAxBPLfYeGc8Eko2qpQnJoEB-HdphBokLXDL4c3kwznlMDYj2f72B3IcAW-w5P4wOND3j5nXyNyuTP7lA", "has_more": false }
Thank you!- Greg-DB
Dropbox Staff
Thanks! I see you're adding the template for the user, and then are listing the files for the user, but it seems you're missing the step of setting the values for that template for the desired file(s). That is, you're missing step 2 below:
The basic flow would be like this:
- Call /2/file_properties/templates/add_for_user to add a template.
- Call/2/file_properties/properties/add to add property groups for that template to a file (or repeatedly for multiple files).
- Call /2/files/list_folder (or /2/files/get_metadata, etc.) later to read them back when listing files.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 days ago
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!