Closed chambbj closed 7 years ago
@chambbj It doesn't seem unreasonable to include the export_set as part of the aoi_list as these are simply FK lookups. @AlexMountain what level of details makes sense on that return, just a list of PKs that can be requested by export details calls would be my vote.
Unless there is a lot of overhead involved, I'd personally vote for the export objects. I think the client can do a lot of filtering of the results on their own and cut down on the number of API calls.
On the topic of intersects, Robbie has been working on caching for the UI and maybe that's something we can use for the API too in order to return these intersects efficiently. The HATEOAS portion is probably a little further down the line but I like the general idea.
As for the exports, we can definitely look into adding in the export_set, I think that should be fine.
So let's split this into two issues. I'll rename this one as expose the export_set. That can be a near term goal. Intersects may be farther down the road.
The export set will now be included in the initial v3 api aoi list call.
v3 AOI returns now have an "exports" property which is an array of the generated export objects.
@AlexMountain IIRC, intersects (pointcloud and raster) are not included in the general AOI listing endpoint, as it takes time to compute these.
But the same doesn't hold true for exports, does it? I think it would be really handy to be able to tell which AOIs have exports without digging down into the details endpoint. Ideally, just include the
export_set
array, even when empty.So, back to intersects, I wonder if there is any sort of compromise to be able to provide an intersects response even at that top level AOI query. I haven't thought a lot about it, but maybe a cached response of some sort - the intersects that existed at AOI creation, or the last time the AOI detail endpoint was hit. Getting into HATEOAS a little, maybe you timestamp the intersects portion of the response, and provide a link to the details endpoint for users to get the most up-to-date intersects. I understand that may be complicated/misleading though, just throwing ideas out there.