Poll a Query In Progress
Bronto provides an async API for long-running queries, which allows users to poll an in-progress query to monitor its progress and to receive partial results. It also allows an API client to handle multiple requests concurrently without blocking, and is more tolerant of network failures since a query will continue to execute if a connection is broken. Additionally it allows clients to cancel requests they are no longer interested in. For extremely long running queries it helps avoid issues due to timeouts.
When the client makes an async query request, the server will initially respond with either a 201 or a 202 response code.
The 201 response code is returned if the query was very short and the results are immediately available.
Otherwise, if the query has started and is in-progress, the server will return a 202 response code and the
response body will contain a status endpoint link (/search/status/<status id>) which should be polled periodically.
When polled, the server will continue to respond with a 202 response code if the query is still in-progress, or it
will respond with a 201 response code if the query has completed.
The link must be polled at least once every 1 minute, otherwise the query will be cancelled.
Once a query is completed the results can be retrieved using the status endpoint for at least 5 minutes,
and up to 7 days (if the query results have expired the server will respond with a 410 response code).
Authorizations
Path Parameters
The status id for the query.
Response
In progress query.
The current status of the query. Possible value:
COMPLETED- the query finished successfully.IN_PROGRESS- the query is still running.CANCELLED_BY_USER- the query was stopped as a result of aDELETErequest being issued.TIMED_OUT- the query was stopped as it was not polled in time (as indicated by theRetry-Afterheader in the response for the initial search request, or last poll).INTERNAL_SERVER_ERROR- the query failed due to internal server error.
"IN_PROGRESS"
A value between 0 and 100 indicating how much of the processing has finished.
56
The time the query was started at, in human readable format.
"Tue Aug 06 15:24:15 GMT 2024"

