GET /beta/task-status/pending-tasks reports more tasks in the X-Total-Count header than it actually returns

What problem are you observing?

API: beta/task-status/pending-tasks
The results do not appear to be only showing pending-tasks. Adding count=true produces an x-total-count of 25568. When doing the same thing with beta/task-status the x-total-count is 18533 for our tenant.

What is the correct behavior?

I would expect the pending-tasks total to be significantly lower than the task-status total.

What product feature is this related to?

Identity Security Cloud - API

What are the steps to reproduce the issue?

GET https://<tenant>.api.identitynow.com/beta/task-status/pending-tasks?count=true
GET https://<tenant>.api.identitynow.com/beta/task-status?count=true
1 Like

This chat has others with this same issue:

I have reproduced this issue in my tenant. However, I would like to make some clarifying points and see if you concur with my observations before I report this to engineering.

  1. I can see that GET /beta/task-status/pending-tasks is only returning a subset of the total number of tasks being reported in the X-Total-Count header. In my tenant, this endpoint only returns 68 pending tasks, but X-Total-Count reports 567 tasks. Clearly there is a mismatch that needs to be investigated and fixed. I did not observe the same issue with /beta/task-status, which returns the same number of results as reported by X-Total-Count. Please correct me if I’m mistaken on that.
  2. There may be some missing documentation that explains how /beta/task-status and /beta/task-status/pending-tasks work. I noticed in my tenant that /beta/task-status only returns 128 tasks, and they are all completed but in various states (i.e. Error, Success, etc.). /beta/task-status/pending-tasks, however, only returns tasks that are not yet complete (i.e. pending). So it’s quite possible that the former only returns completed tasks, and not pending tasks. I will confirm with engineering, but if that’s the case then I will update the API documentation to make that clear.

Your observations are correct. The number of tasks was so high when I ran the Pending-Tasks that it was hard to tell that the actual results were a different number than the X-Total-Count.

/beta/task-status does appear to only be completed tasks. I grabbed an id from /beta/task-status/pending-tasks and added it to a filter on task-status and the endpoint didn’t return any results.

As a feature enhancement, it would be great if there was an API endpoint for performing bulk Update Task Status updates.

I have created an engineering ticket to look into the mismatch between actual tasks returned and the number reported by X-Total-Count. Ticket number is IDNDENALI-10018.

I have created a feature request ticket (IDNDENALI-10021) asking engineering to create a new endpoint (/beta/tasks) that will return all tasks by default, but allows you to specify either the pending or completed query params to return just pending or just completed tasks.

I also created a docs ticket (DEVREL-1640) to fix the description of /beta/task-status to clearly indicate that this endpoint only returns completed tasks, not all tasks.

1 Like

DEVREL-1640 to fix the description of get-task-status-list | SailPoint Developer Community has been completed.

IDNDENALI-10018 to look into the mismatch between actual tasks returned and the number reported by X-Total-Count has also been completed. X-Total-Count now returns the correct number of results.

The only remaining ticket is IDNDENALI-10021, but since that is a feature request, I will go ahead and mark this bug as fixed.