How to get the last task approval via API

I'm working on a custom workflow/automation where each task might have multiple associated approvals.

I need to get information about just the latest approval, via API call. Ideally, I won't have to get all the task approvals and loop through them to compare dates in order to accomplish this.

From the documentation at https://developers.wrike.com/documentation/api/methods/get-approvals, I thought I might be able to use the "limit" parameter (hoping that the return order would be by descending date so limiting to 1 would get just the latest approval), but in testing via Postman I'm getting an error.

API GET call (where {TASK-ID} is an actual task ID):

https://www.wrike.com/api/v4/tasks/{TASK-ID}/approvals?limit=1

Error:

Does anyone know why "limit" doesn't work as described in the documentation?

Is there a better/different way to get information about just the last approval on a given task?

0
1 commento
Spot On Innovative Approach Stellar Advice
Avatar

Hi Laura Boylan! I think someone from our Advanced Support could help with that, so I'm raising a ticket for you now 🙂

Lisa Community Team at Wrike Become a Wrike expert with Wrike Discover

0
Azioni per commenti Permalink

Folllowing List for Post: How to get the last task approval via API
[this list is visible for admins and agents only]

Didn’t find what you were looking for? Write new post