Is there any API to get count of all records for an object in v2.1 ?

I am using Insightly API v2.1 . Since count information is not available in GET API response of Insightly. Is there any other count API in v2.1  exists to know how many records exists for an object i.e CONTACTS or LEADS . 

0

Comments

3 comments
  • Hi Pradeep,

    Unfortunately the count query is not implemented on V2.1 and an OData $count will also not respond with anything. I would suggest you try V2.2, there you can simply make a GET List call with a TOP=1 parameter and then add "count_total=true"

    https://api.insight.ly/v2.2/Leads/?top=1&count_total=true

    You will find the total in the response header 

    X-Total-Count →155405

     

    Thank you for using Insightly!

    --Engineering

    0
    Comment actions Permalink
  • Thanks Patrick for your reply. As per our requirement we are bound to use API v 2.1. Could you please confirm if the GET api call for an Insightly object returns all the records for that object ? In that case we will count and conclude the actual number of records that exist for that object. Is there any default limit is applied on the GET API call response returned by insightly or it returns all the response in a single GETAPI call when user don't specify any limit in its GET call ?

    0
    Comment actions Permalink
  • Hi Pradeep,

    Yes, API v2.1 GET does return the complete list of objects.  

    Example: https://api.insight.ly/v2.1/contacts?Brief=True

    However, we highly recommend you to re-consider API v2.2 approach due to performance and connectivity issues of loading all objects, which might also create instability to your application.

     

    Regards,

    Kevin

    0
    Comment actions Permalink

Please sign in to leave a comment.