vincere-io / restful-api-support

5 stars 0 forks source link

Get all data tables fom API #22

Open ma7ammad opened 3 years ago

ma7ammad commented 3 years ago

We are trying to retrieve all data tables(all candidates, all contacts, all companies, all jobs, ...) from Vincere API for reporting (in Power BI). However the API does not seem to support this for most of those tables (except users via: /user/summaries/all). Would you please advice how this could be achieved?

MomoTwo commented 3 years ago

Should be possible with IDs.. Every canidate, job, contact, company, etc. has a unique ID. They should only increase by one so you'd just have to increase after every request. There are exceptions to this if a candidate was deleted but that shouldn't be too hard to work around. If the IDs vary wildly and your dataset isn't too big just uncheck every option in the table except for the ID and select scroll down the page. After that just paste it in Excel.

mrbkiter commented 3 years ago

@ma7ammad you should use Vincere Search APIs using cursorMark for loading big tables. The maximum returned docs in one page is 100, so your code would look like:

Loop till no new cursorMark / empty cursor Mark Fetch one page with cursorMark Assign new cursorMark End Loop