Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ include::clause_7_update.adoc[]

include::clause_8_optimistic-locking.adoc[]

include::clause_9_features.adoc[]
include::clause_9_return-created-resource.adoc[]

include::clause_10_media_types.adoc[]
include::clause_10_features.adoc[]

include::clause_11_security_considerations.adoc[]
include::clause_11_media_types.adoc[]

include::clause_12_security_considerations.adoc[]

<<<
include::annex_ats.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ include::requirements/features/REQ_collection-endpoint.adoc[]
.A collection with `supportsNonAutogeneratedResourceIds` set to `true`
include::../examples/json/ex07_supportsNonAutogeneratedResourceIds.adoc[]

[[return-created-feature]]
=== Support for returning a created feature

T.B.D.

[[feature-crs]]
=== Coordinate reference systems (CRS)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[[return-created-resource_clause]]
== Requirements Class "Return Created Resource"

[[return-create-resource-overview]]
=== Overview

include::requirements/requirements_class_return_created-resource.adoc[]

A server that implements this requirements class provides the ability to return
a representation of a newly created resource in the response body of a
<<create,create resource>> operation.


[[return-created-resource-header]]
=== Return-Created-Resource header

==== Definition

include::requirements/return-created-resource/REQ_header.adoc[]

==== Response

include::requirements/return-created-resource/REQ_response.adoc[]

include::requirements/return-created-resource/REQ_representation.adoc[]

==== Exceptions

See <<http_status_codes,HTTP status codes>>.

==== Example

The following example illustrates the use of the `Return-Creates-Resource`
HTTP header to request that a representation of the newly created resource be
returned in the response body of the <<create,create operation>>.

....
Client Server
| |
| POST <resources endpoint> HTTP/1.1 |
| Content-Type: <media type of resource representation> |
| Return-Created-Resource: true |
| Accept: <media type of returned resource representation> |
| |
| ... Body contains representation of the resource ... |
|-------------------------------------------------------------->|
| |
| HTTP/1.1 201 Created |
| Location: <resource endpoint> |
| |
| ... Response body containing represenation of created |
| resource ... |
|<--------------------------------------------------------------|
....
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
|Conditional Dependency |<<OAFeat-1,OGC API - Features - Part 1: Core, Requirements Class "Geography Markup Language (GML), Simple Features Profile, Level 0">>
|Conditional Dependency |<<OAFeat-1,OGC API - Features - Part 1: Core, Requirements Class "Geography Markup Language (GML), Simple Features Profile, Level 2">>
|Conditional Dependency |<<update_clause>>
|Conditional Dependency |<<return-created-resource_clause>>
|Conditional Dependency |<<rfc7396,RFC 7396 (JSON Merge Patch)>>
|Conditional Dependency |<<OAFeat-2,OGC API - Features - Part 2: Coordinate Reference Systems by Reference>>
|Conditional Dependency |<<OAFeat-5,OGC API - Features - Part 5: Schemas, Requirements Class "Returnables and Receivables">>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[rc_return-created-resource]]
[cols="1,4",width="90%"]
|===
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-features-4/1.0/req/return-created-resource
|Target type |Web API
|Dependency |<<rfc9110,RFC 9110 (HTTP Semantics)>>
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[rec_return-created-resource_http-header]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/return-created-resource/http-header*
^|A |Server implementations SHALL recognize the `Return-Created-Resource` HTTP header.
^|B |The `Return-Created-Resource` header SHALL be a boolean accepting the values of `true` or `false`.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[rec_return-created-resource_representation]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/return-created-resource/response*
^|A |The representation of the resource returned in the response body of a <<create,create operation>> SHALL be negotiated using https://www.rfc-editor.org/rfc/rfc9110.html#name-content-negotiation[HTTP content negotiation] mechanisms (e.g. use of the HTTP `Accept` header).
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[rec_return-created-resource_response]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/return-created-resource/response*
^|A |A value of `true` for the `Return-Created-Resource` SHALL indicate that the server SHALL return a representation of a newly created resource in the response body of a <<create,create operation>>.
^|B |A value of `false` or the absence of the `Return-Created-Resource` header SHALL indiciate that a representation of a newly created resource SHALL NOT be returned in the response body of a <<create,create operation>>.
|===