Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAC API description of POST implementation #489

Merged
merged 9 commits into from
Jun 18, 2019

Conversation

philvarner
Copy link
Collaborator

No description provided.

api-spec/README.md Outdated Show resolved Hide resolved
| bbox | [number] | WFS3, STAC | Requested bounding box [west, south, east, north] |
| time | string | WFS3, STAC | Single date, date+time, or a range ('/' seperator), formatted to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) |
| intersects | GeoJSON Feature | STAC | Searches items by performing intersection between their geometry and provided GeoJSON Feature |
| page | number | STAC | The page number of results. Defaults to 1 |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change from page -> next will be picked up by a different PR.

api-spec/api-spec.md Outdated Show resolved Hide resolved
api-spec/api-spec.md Outdated Show resolved Hide resolved
api-spec/api-spec.md Outdated Show resolved Hide resolved
api-spec/api-spec.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@m-mohr m-mohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, looks good now!

@joshfix
Copy link
Contributor

joshfix commented Jun 11, 2019

The Filter Parameters table shows limit and page typed as number. Should we change those to explicitly be integer?

@m-mohr
Copy link
Collaborator

m-mohr commented Jun 11, 2019

The Filter Parameters table shows limit and page typed as number. Should we change those to explicitly be integer?

Yes, sure!

Edit: Applied the changes, also in the openAPI files.

@m-mohr m-mohr force-pushed the api-stac-search-post branch from ec7a537 to ab83ef2 Compare June 11, 2019 18:38
@philvarner
Copy link
Collaborator Author

What's supposed to be the difference between the api-spec/STAC.yaml and api-spec/openapi/STAC.yaml?

@m-mohr
Copy link
Collaborator

m-mohr commented Jun 12, 2019

What's supposed to be the difference between the api-spec/STAC.yaml and api-spec/openapi/STAC.yaml?

STAC.yaml is generatred from openapi/STAC.yaml (and others like WFS). I.e. openapi/STAC.yaml is a fragment, which only includes the core STAC API without extensions and external input such as WFS.

@philvarner
Copy link
Collaborator Author

What's supposed to be the difference between the api-spec/STAC.yaml and api-spec/openapi/STAC.yaml?

STAC.yaml is generatred from openapi/STAC.yaml (and others like WFS). I.e. openapi/STAC.yaml is a fragment, which only includes the core STAC API without extensions and external input such as WFS.

Ah, understand that in the documentation now.

@philvarner
Copy link
Collaborator Author

This PR is ready for merge pending approval.

Copy link
Contributor

@joshfix joshfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explicitly state that POST is not supported for the collections endpoints (api-spec lines 15&16) as it conflicts with the transactions extension and that POST is only supported for /stac/search.


### WFS3 Endpoints
Since STAC adds additional filter parameters that may have much larger values, like `intersects`, it is **recommended** to also support `POST` for both the WFS3 and STAC endpoints that
accept filter parameters (e.g., `/collections/{collection_id}/items` and `/stac/search`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we do not want to recommend supporting POST for the collections endpoints as this conflicts with the transactions extension: https://github.com/radiantearth/stac-spec/tree/master/api-spec/extensions/transaction
I believe we want to recommend that for more complex searches that require POST to exclusively use the /stac/search endpoint.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that as to not conflict with the Transactions Ext as it is currently defined.

However, I think we should reconsider whether or not Transactions should extend the behavior of the paths defined in WFS 3. For example, what if an existing WFS 3 implementation has already implemented the GET and POST form-data operations on /collections/{collectionID}/items? I feel that if we want to provide extensions/behaviors on top of the ones defined by WFS 3 that we should duplicate the endpoints, such that, for example, we have /collections/{collectionID}/items that implements only the WFS 3 semantics, and /stac/collections/{collectionID}/items that implements our own semantics (e.g., the transactions POST behavior)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So originally, before it was an actual extension, I used PUT, PATCH, and DELETE to handle creating, updating, and deleting items against the dynamic api endpoint. I think it was during the second sprint it was decided that transactions should be executed via the collections endpoint. I'm not 100% certain why. @m-mohr is there a WFS-T3 spec that defines transactions against the collections endpoint? We also have our own catalog endpoints. Would that make more sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's as much conflict as I originally thought. I think we just needed to be explicit about the use of the application/json . See the changes in e7dbfaa

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshfix Not yet, as far as I know, but there will probably be a WFS-T extension in the future that we could adopt.

Fine with the changes by @philvarner. Approved (again).

@joshfix joshfix merged commit 1ad37aa into radiantearth:dev Jun 18, 2019
@m-mohr m-mohr deleted the api-stac-search-post branch June 19, 2019 09:43
@hgs-msmith hgs-msmith mentioned this pull request Aug 20, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants