Closed ghost closed 5 years ago
Change download call -- use the saved projectIds from the original search query to quickly get all data, instead of having to do the query logic again. This means download route now takes a filterId, not a big project query
@julialucyhogan
Hi! Just want to make sure I understand: a call to /projects
returns a filterId
which should be used for subsequent pagination OR downloads.
Change download call -- use the saved projectIds from the original search query to quickly get all data, instead of having to do the query logic again. This means download route now takes a filterId, not a big project query
@julialucyhogan
Hi! Just want to make sure I understand: a call to
/projects
returns afilterId
which should be used for subsequent pagination OR downloads.
yes! it is returned in the meta
property of the response, as queryId
and should be passes as a query param to either a pagination request (optimization, not required) ((also, this used to be a header, but that was random and bad implementation)) or download (required)
Closing this pull request in favor of https://github.com/NYCPlanning/labs-zap-api/pull/150 which has clean squashed commits.
A few loose ends still to be tied up:
/export
route (I believe this just creates a json object of all project bbls for all projects); it is still used but I somehow missed it until a last pass yesterday so I haven't implemented it in CRM context yet. Confirm that this is useful before doing it tho.Overall tho, this is the new ZAP API which almost works as a drop in with the existing ZAP frontend. Required changes:
download
call -- use the saved projectIds from the original search query to quickly get all data, instead of having to do the query logic again. This means download route now takes a filterId, not a big project query/projects
responses) asX-Filter-Id
header to enable more efficient pagination requests (so we don't have to do the full get on every single page, only once to determine to filtered dataset meta)