HTTP Data API
...
Legacy HTTP API
Querying: HTTP (Legacy)

408 Timeout Responses (Legacy)

If your queries target large collections and match thousands of documents, you may recieve a 408 Request Timeout response status code. For more information, see the official Mozilla Developer Network (MDN) Web Docs > "408 Request Timeout" topic.

To manage performance and prevent potential performance issues that may occur as a result to attempting to retrieve a large number of documents in a single query, by default, sets of matching documents is limited to a count of 1000.

To resolve this error, break down one large query into several selective queries.

For example, the following cURL request:

  • Retrieves documents within the people collection with the field property of name set to the value of John.
  • Limits the number of results returned to 2.
  • Instructs to sort results by _id in ascending (asc) order.
  • Indicates that the response is to include not only the values but also information (latestValuesAndTypes) about their types.
cURL


Once invoked, you'd receive the following response:

JSON