Optimizing response time

Avoiding calculation of the number of records returned

When executing an API call, use countSwitch=1 attribute to avoid calculating number of reported rows. To return total number of the rows for an API query, use countSwitch=2 and then retrieve pages of the records.

  1. Retrieve total number of available records.
    https://hostname:port/api/sam/raw_file_facts?token=token&countSwitch=2
  2. Retrieve first 10000 records by using the limit parameter.
    https://hostname:port/api/sam/raw_file_facts?token=token&countSwitch=1&limit=10000&offset=0
  3. Retrieve next 10000 records. You can ignore the already retrieved records by using the offset parameter.
    https://hostname:port/api/sam/raw_file_facts?token=token&countSwitch=1&limit=10000&offset=10000