Page 1 of 1

Get Simpro All Jobs

Posted: Thu Sep 27, 2018 9:49 am
by harpreet
Hello,
I was using jobs endpoint of your API.
/api/v1.0/companies/{companyID}/jobs/

It was giving me full set of all available jobs, but today i'm getting only 30 jobs from same endpoint.
I can't get all the jobs as I have no way to use the paging with same endpoint. I have check the documentation again and could not find any API help me to get pagination.
Please help me to get all jobs from your endpoint.

Thanks

Re: Get Simpro All Jobs

Posted: Fri Sep 28, 2018 12:39 am
by rick.lan
Hi harpreet,

Once you sent the request, the pagination information should be showing in the response header, something like this:

Code: Select all

Link →<https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=2>; rel="next", <https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=904>; rel="last", <https://client.simprosuite.com/api/v1.0/companies/0/jobs/?page=1>; rel="first"
you can then parse that information to retrieve the next page.

kind regards,

Rick

Re: Get Simpro All Jobs

Posted: Fri Sep 28, 2018 5:37 am
by harpreet
Thanks Rick , your help did work.

Now I want to get last hour modified jobs. Can you please help?

Re: Get Simpro All Jobs

Posted: Wed Oct 03, 2018 12:26 am
by rick.lan
Hi harpreet,

sorry for the late reply, you can add

Code: Select all

If-Modified-Since
to header, e.g.

Code: Select all

If-Modified-Since: Wed, 21 Oct 2016 07:28:00 GMT
This will give you all modified jobs since 21/Oct/2016 7:28:00.

Please note that we are adding this feature gradually so not all the routes support this header.

cheers,

Rick