Page 1 of 1

Getting "TOO_MUCH_DATA_REQUESTED" warning when querying

Posted: Fri Sep 25, 2020 6:53 am
by cyclrPatrick
Hi

I am trying to get around the deprecation of the "*" wildcard, and so am now entering all of the fields in the fields query parameter instead of simply using an asterisk to select all fields.
When sending the following request:

Code: Select all

/query/Appointment?BhRestToken=REDACTED&start=0&count=100&fields=id,appointmentUUID,candidateReference,childAppointments,clientContactReference,communicationMethod,dateAdded,dateBegin,dateEnd,dateLastModified,editHistory,guests,isAllDay,isDeleted,isPrivate,jobOrder,jobSubmission,lead,location,notificationMinutes,owner,parentAppointment,placement,recurrenceDayBits,recurrenceFrequency,recurrenceMax,recurrenceMonthBits,recurrenceStyle,recurrenceType,showTimeAs,subject,timeZoneID,type&where=dateLastModified > 0 and dateAdded < 0
I get the following warning:

Code: Select all

"messages":[{"detailMessage":"The requested number of to-many field queries exceeds the maximum of 200. The number of queries equals the count value times the number of to-many fields requested in the fields query parameter.","severity":"WARNING","type":"TOO_MUCH_DATA_REQUESTED"}]}
I would like all of the data that is requested in the fields parameter. How can I fix this?

Thanks,
Patrick

Re: Getting "TOO_MUCH_DATA_REQUESTED" warning when querying

Posted: Tue Sep 29, 2020 2:53 pm
by tluczak
Hi Patrick,

This issue is due to trying to return too much data due to the to-many fields as the error suggests. We have a hard limit in REST of returning 200 to-many associations per call. When you include three or more to-many fields we restrict the return based on the number of to-many fields requested. The results will be truncated as the limit is on the fields, not the number of associations returned. I would suggest lowering your count parameter to 50.

Re: Getting "TOO_MUCH_DATA_REQUESTED" warning when querying

Posted: Fri Oct 02, 2020 5:42 am
by cyclrPatrick
tluczak wrote: Tue Sep 29, 2020 2:53 pm Hi Patrick,

This issue is due to trying to return too much data due to the to-many fields as the error suggests. We have a hard limit in REST of returning 200 to-many associations per call. When you include three or more to-many fields we restrict the return based on the number of to-many fields requested. The results will be truncated as the limit is on the fields, not the number of associations returned. I would suggest lowering your count parameter to 50.
Thanks tluczak, that fixed the problem.

Re: Getting "TOO_MUCH_DATA_REQUESTED" warning when querying

Posted: Mon Oct 05, 2020 12:18 pm
by bbagwell
Thank you for letting us know!