-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support for POST? #449
Comments
+1 on this in general. Though I just remembered that POST on In STAC we use it on the |
Yes, POST to |
Ah, interesting. Didn't realize POST could work that day - you learn something new every day :) I suppose we'll charge ahead in STAC, but would be great to have you review it so we have a chance of aligning to what's to come from Features API. We'll probably just stick with POST-ing to /search, as you can specify a single collection there, but ideally the request would be pretty much the same. |
@cholmes the behaviour is controlled by the content type. POST with application/geo+json you have an insert. POST with application/x-www-form-url you have a query. POST is flexible that way. However, I would prefer the STAC approach by using something like a /collections/{collectionId}/search endpoint just to separate concerns. POST a filter expression (CQL, or something else) to /collections/{collectionId}/search and you execute a query using the specified filter expression; easy, clean. |
Cool. For now in STAC we just have top-level /search And will probably stick with that as it makes describing it simpler: implement Features API, and add the /search endpoint. But happy to have that approach at the collection level too, just will wait for you all to specify it. The other aspect to potentially think about is 'saved search' - post a persistent search query that you can revisit, and stays up to date. In Planet's API that's what our /search/ endpoint does, and then we have a 'quick-search' which behaves like we're saying - POST and get results. See https://developers.planet.com/docs/data/quick-saved-search/ |
@cholmes well, I did not want to bring that up (too much info in one shot) but the issues of stored queries that has been on my mind for a very long time (see https://portal.ogc.org/files/?artifact_id=44852&version=1). So, yes, stored queries are on our radar. The plan, as @cportele mentioned, is to write an "complex query" extension (bad name?) that incorporates all these search endpoint ideas. First, however, we need to finish CQL and Simple Transactions (which of course implies there will be a complex Transactions too). ;) |
Cool, great to hear that's on the radar too. The other more advanced query thing I'd love to see is aggregation. Planet has done bits of that in our custom data api's, and wants to do more. And Astraea implemented some with STAC, and made a proposal - https://github.com/radiantearth/stac-api-spec/pull/36/files And that really belongs more at the Features API level. I do think 'complex query' is a bad name. I'd encourage moving away from simple vs complex nomenclature, and to not bundle all advanced things in a single extension. Have each idea as its own, very small extension. Complex doesn't communicate anything except that it's 'not simple'. Simple at least communicates 'start here'. Though in transactions, for example, I'd just call it 'CRUD transactions' instead of 'simple transactions'. I forget what exactly is planned for 'complex' ones, but I'd say if there's two or three ideas that can stand alone then don't bundle them in 'complex'. Similar with search - a cross-collection search as one thing, joins as another (depends on cross-collection search), POST-ing a search is another. I think it's fine if they're a coherent work item to think through and produce them all at once, but from a user perspective I think it's better not to 'bundle' them. Just my 2 cents... And yes, agree on finishing CQL and Transactions first :) |
Makes sense, but then this would go into the extension that will specify the
+1 on this, in particular with respect to not use "complex" and for not bundling more advanced capabilities in a single extension. We should identify the capability that a spec adds and name the extension accordingly. The use of "simple" can be ok, I think, but I also see that being more explicit like "CRUD" or "CRUD operations" may be better. We could then simply use "Transactions" for the next extension. In the same sense I would call the extension that specifies the key aspects of the I think I will open a new issue for discussion of priorities for what follows after the current tasks/extensions in the SWG charter are complete... |
Meeting 2020-11-09: It will be added in the future Query / Search extension and not be included in Part 3. |
Related to this, there is also a discussion about a SEARCH method: HTTP SEARCH Method |
That IETF draft has evolved and the proposed HTTP method is now QUERY: https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html |
Do we need support for POST at
/collections/{collectionId}/items
?This could be useful/necessary for filter expressions with large geometries (this could use
application/x-www-form-urlencoded
with cql-text) or for filter expressions with cql-json (with media typeapplication/json
and an object with a property for each parameter).The text was updated successfully, but these errors were encountered: