Help with syntax for /folders API call to retrieve custom field
I'm using the Get Folder Tree API call and need to add a single custom field to the response for each project. The doc is sparse on syntax examples (https://developers.wrike.com/api/v4/folders-projects/#get-folder-tree), and so far I haven't been able to get this working.
This call succeeds but doesn't actually include any custom fields in the response.
{{Wrike API}}/folders/{{MASKED}}/folders?fields=["customFields"]
Hey Laura Boylan, I've asked our Support team to take a look 👍
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover
Any follow up here on what the answer was? I'm running into the same issue.
Hi Laura Boylan, may I kindly ask you to share with Tyler Sheffield the reply you received from our Support Team about this case? 🙂
I'm sure many other users will benefit from accessing this info. Thank you!
I had the same issue and just figured it out. You need to include the parameter "descendants=false". when you don't include it (default), it doesn't include the customFields response parameter. They used this parameter in an example in their documentation but didn't specify that it was needed to get back customField values:
curl -g -X GET -H 'Authorization: bearer eyJ0dCI6InAiLCJhbGciOiJIUzI1NiIsInR2IjoiMSJ9.eyJkIjoie1wiYVwiOjI0NDYwMDAxLFwiaVwiOjIsXCJjXCI6MTAwMSxcInZcIjpcIlwiLFwidVwiOjMsXCJyXCI6XCJVU1wiLFwic1wiOltcIk5cIixcIklcIixcIldcIixcIkZcIixcIktcIixcIlVcIixcIkNcIixcIkFcIixcIkxcIixcIlBcIixcIkJcIixcIkRcIl0sXCJ6XCI6W10sXCJ0XCI6MTc1NjM3Mzc3NzAwMH0iLCJleHAiOjE3NTYzNzM3NzcsImlhdCI6MTc1NjM3MDE3N30.jKcvJVNLvrCtp51LpRjYrN5Q_SC8MvpMscKQS8oaRoQ' 'https://www.wrike.com/api/v4/folders/IEAXKOXBI4AB5BET/folders?fields=["customFields","space"]&descendants=false'
Thanks a lot, Tim Sauchuk, for posting the solution here. I really appreciate it, and I hope other Community members find it helpful as well 🙌
Rohan V Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Rohan V Wrike Team member Become a Wrike expert with Wrike Discover