Cannot Tie Tasks to Projects via API call
We are working on building out Wrike reporting for our team in PowerBI. We have been able to have success in pulling project information for our request system, but are getting stuck in reporting information out from our recurring reports.
We would like to show our recurring report projects and highlight when the next recurring task is due. Only problem is that we cannot tie any ID field in the GET API call for tasks to a project. We can tie it to a folder, but not to the correct project. Is there any way to do this or something we are missing? It doesn't make sense if the overall hierarchy of Wrike is/was task --> project --> folder --> space that there is no way to see what project a task is a part of.
We have tried to download the work_project_to_task BI Export and use this, but the IDs from this API functionality are different than what comes back from GET calls.
Any help is appreciated!
Folder and projects are the same thing in the API I believe.
Francesco Mannino can you help Devree Czupinski please?
Russell Sprague the ID that comes from the folder/project API call gives us the folder that the project lives in, not the project.
Devree Czupinski What is the call method you are using? How are you getting the ID that is pulling the folder?
Russell Sprague We are using the V4 API Task method and using parentIds to get to the folder (or what we thought would be project).
content = Web.Contents("https://www.wrike.com/api/v4/folders/FolderID/tasks?=true&fields=[""description"",""customFields"",""parentIds""]"
Thanks for your input!
Hey Devree Czupinski, I'll be happy to ask our Support team to look into your question, please let me know if that would work!
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
Lisa Thank you! That would work as well. Appreciate the help and assistance!
Hi Devree Czupinski,
I would like to share with you the solution I found for my project because I had the same problem in the past.
Is it a project or a folder?
Based on the Get Folder endpoint (https://developers.wrike.com/api/v4/folders-projects), you can use the project response parameter in order to understand if a folder is a project or not.
How can i link a task to its project?
You can iterate on parentids or superparentids response parameter (Get Task endpoint https://developers.wrike.com/api/v4/tasks/) and get folders properties: in this list you should found the task's project using the project response parameter that I have explained in the previous section.
I know it's a little bit tricky even for performances, but maybe it could be a solution.
Let me know if this could be useful for you 😁
Done Devree Czupinski, let us know if you need anything else.
Francesco Mannino, thank you for sharing! 💚
Elaine Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Elaine Wrike Team member Become a Wrike expert with Wrike Discover