maxRecords

The "maxRecords" is an optional integer from -1 to 65535 that sets the maximum number of records to return from an action. It is used in query actions to paginate the query results when returning records directly. The default for most actions is to return 20 records.

-1 returns all records and should be used very carefully because a large query can return so many records that it eventually times out and wastes server and client resources.

  • When present, "maxRecords" works in conjunction with the "skipRecords" (and, when applicable, "reverseOrder") properties to paginate results.
  • "maxRecords" returns an error when "returnCursor" is true.
    • This does not apply to the actions where "returnCursor" is not present.
  • When returning a cursor, retrieve records using the "getRecordsFromCursor" action.
  • A value of 0 for "maxRecords" is not useful because it causes the action to return no records.
  • "maxRecords" is ignored by the "getRecordsByIds" action.