REST API for JobEntrySvc/JobEntries only returns 100 results

I’m using the /api/v1/Erp.BO.JobEntrySvc/JobEntries endpoint to try and query for all open jobs with $filter=JobComplete eq false . When I hit any endpoint in the JobEntrySvc really, it only returns 100 records.

The real issue here is that when I use $inlinecount=allpages, it always says 100 (even though there are thousands of jobs, and even when I use different filters or orderbys it always says 100, even though it’s returning different datasets), but when I $skip=100 it returns 0 records.

So it seems like something is blocking this service from returning more than the first 100 jobs no matter what, even when I use $skip?

For example JobEntrySvc/JobOpers?$skip=100 returns an empty array, but JobOperSearchSvc/JobOperSearches?$skip=100 returns more records.

Hi Jon (@jgr3go),
You can use the $top parameter to change the number of rows returned in the single query.

/api/v1/Erp.BO.JobEntrySvc/JobEntries?$top=1000 for example.

I’m also seeing an empty result set when using $skip=100 alone. If I use $skip=100 AND $top=100 it returns the next 100 records. I need to read more about OData to understand if this is correct behavior or not.

1 Like

If you are not a cloud customer, you can switch that limit off in web.config

Hello Olga!

Is this true for the BAQSvc too? I don’t remember seeing that behavior here in the class.

Thanks,

Mark

Hi Olga,
Please specify the parameter.

It looks like using $top with $skip does work, I don’t think that’s expected behavior. It’s not the case in other services.

That said, once you apply $inlinecount=allpages again it totally breaks. So it looks like there’s a bug in this service, at least.

I’m a cloud customer, so there’s nothing in the web.config I can change.

1 Like

To change/remove the limit use
<add key="DefaultMaxRowCount" value="<number or 0 to remove the limit>" /> into web.config section.

2 Likes

I think so, but it was long time ago when I looked