Retrieve success/failed data count in an import using integrator APIs

Hi,

We need to get the success/failure count for each import via the integrator APIs for a stat report mechanism.
Is the only way to fetch success/failure counts from the jobs API?

Jobs API endpoints

GitHub API doc link

We would like to fetch the success/failure count for past periods as well.

Example: we need to fetch how many payslips have been synced via the integration for the past 3 months.

Is there any way to fetch “/v1/jobs?type=import&status=completed”? The return responses of the APIs were a bit confusing.

Could you please help us?

Yes, you should use the jobs API. I would call:

/v1/jobs?createdAt_gte={{lastExportDateTime}}&status=canceled&status=completed&status=failed&type=import

What is confusing about the response? It's a list of all runs against that import and you'd need to send this data to a database to then aggregate the results.

Additionally, you can only go 3 months back if you're retention policy is setup for longer than 30 days.