CRREL / GRiD-API

9 stars 3 forks source link

New data indicator for AOIs #24

Closed chambbj closed 7 years ago

chambbj commented 7 years ago

@AlexMountain @trevorskaggs We have talked about webhooks or similar to notify users of new data in an AOI, which is great, but GRiD is already able to flag AOIs that have "New data". How is this obtained? Can it be exposed via the API? If so, what is the best way? As a flag attached to individual intersects? As it's own (possibly empty) array of intersecting pks (with further information available in the intersect objects)?

AlexMountain commented 7 years ago

This could be exposed to the API with some tweaks. We determine this for any aoi_detail call. The new data flag is at the individual intersect level, so a flag there would probably be the easiest/most direct approach.

We would need to revise the clearing away of the "new data" designation that also works with the API. For the UI this happens when you navigate to the respective generate export screen, but maybe for the API we mark as viewed after the aoi_detail return.

AlexMountain commented 7 years ago

AOI GET requests now return a list product IDs for new data loaded, one time (will not show up in subsequent GET requests to the same AOI). Docs are updated to reflect this.