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

return=minimal for status monitor resources #2024

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -3013,8 +3013,8 @@ <h2 id="116-asynchronous-requests"><a id="AsynchronousRequests" href="#Asynchron
<p>If the client has specified<code> respond-async</code> in the request, the service MAY process the request asynchronously and return a <a href="#ResponseCode202Accepted"><code>202 Accepted</code></a> response. A service MUST NOT reply to a <a href="#DataServiceRequests">Data Service Request</a> with <code>202 Accepted</code> if the request has not included the <code>respond-async</code> preference.</p>
<p>Responses that return <code>202 Accepted</code> MUST include a <a href="#HeaderLocation"><code>Location</code></a> header pointing to a <em>status monitor resource</em> that represents the current state of the asynchronous processing in addition to an optional <a href="#HeaderRetryAfter"><code>Retry-After</code></a> header indicating the time, in seconds, the client should wait before querying the service for status. Services MAY include a response body, for example, to provide additional status information.</p>
<p>A <code>GET</code> request to the status monitor resource again returns <code>202 Accepted</code> response if the asynchronous processing has not finished. This response MUST again include a <a href="#HeaderLocation"><code>Location</code></a> header and MAY include a <a href="#HeaderRetryAfter"><code>Retry-After</code></a> header to be used for a subsequent request. The <code>Location</code> header and optional <code>Retry-After</code> header may or may not contain the same values as returned by the previous request.</p>
<p>A <code>GET</code> request to the status monitor resource returns <a href="#ResponseCode200OK"><code>200 OK</code></a> once the asynchronous processing has completed. For OData 4.01 or greater responses, or OData 4.0 requests that include an <code>Accept</code> header that does not specify <code>application/http</code>, the response MUST include the <a href="#HeaderAsyncResult"><code>AsyncResult</code></a> response header. Any other headers, along with the response body, represent the result of the completed asynchronous operation. If the <code>GET</code> request to the status monitor includes an <code>OData-MaxVersion</code> header with a value of <code>4.0</code> and no <code>Accept</code> header, or an <code>Accept</code> header that includes <code>application/http</code>, then the body of the final <code>200 OK</code> response MUST be represented as an HTTP message, as described in <a href="#rfc9110">RFC9110</a>, which is the full HTTP response to the completed asynchronous operation.</p>
<p>A <code>DELETE</code> request sent to the status monitor resource requests that the asynchronous processing be canceled. A <code>200 OK</code> or a <a href="#ResponseCode204NoContent"><code>204 No Content</code></a> response indicates that the asynchronous processing has been successfully canceled. A client can request that the <code>DELETE</code> should be executed asynchronously. A <code>202 Accepted</code> response indicates that the cancellation is being processed asynchronously; the client can use the returned <a href="#HeaderLocation"><code>Location</code></a> header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns <a href="#ResponseCode405MethodNotAllowed"><code>405 Method Not Allowed</code></a>.</p>
<p>Once the asynchronous processing has completed, a <code>GET</code> request to the status monitor resource returns <a href="#ResponseCode200OK"><code>200 OK</code></a>, or <a href="#ResponseCode204NoContent"><code>204 No Content</code></a> if the request included a <code>Prefer</code> header with a value of <code>return=minimal</code> that was applied by the service. For OData 4.01 or greater responses, or OData 4.0 requests that include an <code>Accept</code> header that does not specify <code>application/http</code>, the response MUST include the <a href="#HeaderAsyncResult"><code>AsyncResult</code></a> response header. A <code>204 No Content</code> response MUST include a <code>Location</code> header that contains the status monitor resource URL, which may or may not be the current request’s URL. In a <code>200 OK</code> response any other headers, along with the response body, represent the result of the completed asynchronous operation. If the <code>GET</code> request to the status monitor includes an <code>OData-MaxVersion</code> header with a value of <code>4.0</code> and no <code>Accept</code> header, or an <code>Accept</code> header that includes <code>application/http</code>, then the body of the final <code>200 OK</code> response MUST be represented as an HTTP message, as described in <a href="#rfc9110">RFC9110</a>, which is the full HTTP response to the completed asynchronous operation.</p>
<p>A <code>DELETE</code> request sent to the status monitor resource requests that the asynchronous processing be canceled. A <code>200 OK</code> or a <code>204 No Content</code> response indicates that the asynchronous processing has been successfully canceled. A client can request that the <code>DELETE</code> should be executed asynchronously. A <code>202 Accepted</code> response indicates that the cancellation is being processed asynchronously; the client can use the returned <code>Location</code> header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns <a href="#ResponseCode405MethodNotAllowed"><code>405 Method Not Allowed</code></a>.</p>
<p>After a successful <code>DELETE</code> request against the status monitor resource, any subsequent <code>GET</code> requests for the same status monitor resource returns <a href="#ResponseCode404NotFound"><code>404 Not Found</code></a>.</p>
<p>If an asynchronous request is cancelled for reasons other than the consumers issuing a <code>DELETE</code> request against the status monitor resource, a <code>GET</code> request to the status monitor resource returns <code>200 OK</code> with a response body containing a single HTTP response with a status code in the <a href="#ServerErrorResponses"><code>5xx Server Error</code></a> range indicating that the operation was cancelled.</p>
<p>The service MUST ensure that no observable change has occurred as a result of a canceled request.</p>
Expand Down
14 changes: 8 additions & 6 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -5863,11 +5863,13 @@ and MAY include a [`Retry-After`](#HeaderRetryAfter) header to be used for a sub
`Location` header and optional `Retry-After` header may or may not
contain the same values as returned by the previous request.

A `GET` request to the status monitor resource returns [`200 OK`](#ResponseCode200OK) once the
asynchronous processing has completed. For OData 4.01 or greater
responses, or OData 4.0 requests that include an `Accept` header that
Once the asynchronous processing has completed, a `GET` request to the status monitor resource returns [`200 OK`](#ResponseCode200OK),
or [`204 No Content`](#ResponseCode204NoContent) if the request included a `Prefer` header with a value of `return=minimal` that was applied by the service.
For OData 4.01 or greater responses, or OData 4.0 requests that include an `Accept` header that
does not specify `application/http`, the response MUST include the
[`AsyncResult`](#HeaderAsyncResult) response header. Any other headers,
[`AsyncResult`](#HeaderAsyncResult) response header.
A `204 No Content` response MUST include a `Location` header that contains the status monitor resource URL, which may or may not be the current request's URL.
In a `200 OK` response any other headers,
along with the response body, represent the result of the completed
asynchronous operation. If the `GET` request to the status monitor
includes an `OData-MaxVersion` header with a value of `4.0` and no
Expand All @@ -5878,11 +5880,11 @@ HTTP response to the completed asynchronous operation.

A `DELETE` request sent to the status monitor resource requests that the
asynchronous processing be canceled. A `200 OK` or a
[`204 No Content`](#ResponseCode204NoContent) response indicates that the asynchronous processing has
`204 No Content` response indicates that the asynchronous processing has
been successfully canceled. A client can request that the `DELETE`
should be executed asynchronously. A `202 Accepted` response indicates
that the cancellation is being processed asynchronously; the client can
use the returned [`Location`](#HeaderLocation) header (which MUST be
use the returned `Location` header (which MUST be
different from the status monitor resource of the initial request) to
query for the status of the cancellation. If a delete request is not
supported by the service, the service returns
Expand Down
14 changes: 8 additions & 6 deletions odata-protocol/11.5 Operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,13 @@ and MAY include a [`Retry-After`](#HeaderRetryAfter) header to be used for a sub
`Location` header and optional `Retry-After` header may or may not
contain the same values as returned by the previous request.

A `GET` request to the status monitor resource returns [`200 OK`](#ResponseCode200OK) once the
asynchronous processing has completed. For OData 4.01 or greater
responses, or OData 4.0 requests that include an `Accept` header that
Once the asynchronous processing has completed, a `GET` request to the status monitor resource returns [`200 OK`](#ResponseCode200OK),
or [`204 No Content`](#ResponseCode204NoContent) if the request included a `Prefer` header with a value of `return=minimal` that was applied by the service.
For OData 4.01 or greater responses, or OData 4.0 requests that include an `Accept` header that
does not specify `application/http`, the response MUST include the
[`AsyncResult`](#HeaderAsyncResult) response header. Any other headers,
[`AsyncResult`](#HeaderAsyncResult) response header.
A `204 No Content` response MUST include a `Location` header that contains the status monitor resource URL, which may or may not be the current request's URL.
ralfhandl marked this conversation as resolved.
Show resolved Hide resolved
In a `200 OK` response any other headers,
along with the response body, represent the result of the completed
asynchronous operation. If the `GET` request to the status monitor
includes an `OData-MaxVersion` header with a value of `4.0` and no
Expand All @@ -520,11 +522,11 @@ HTTP response to the completed asynchronous operation.

A `DELETE` request sent to the status monitor resource requests that the
asynchronous processing be canceled. A `200 OK` or a
[`204 No Content`](#ResponseCode204NoContent) response indicates that the asynchronous processing has
`204 No Content` response indicates that the asynchronous processing has
been successfully canceled. A client can request that the `DELETE`
should be executed asynchronously. A `202 Accepted` response indicates
that the cancellation is being processed asynchronously; the client can
use the returned [`Location`](#HeaderLocation) header (which MUST be
use the returned `Location` header (which MUST be
different from the status monitor resource of the initial request) to
query for the status of the cancellation. If a delete request is not
supported by the service, the service returns
Expand Down