Skip to content

Commit 3c8a3ba

Browse files
authored
Merge pull request json-api#1226 from TrentBartlem/patch-1
Clarify pending async process response json-api#1223
2 parents 6f083ca + bb72f07 commit 3c8a3ba

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

recommendations/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,27 @@ GET /photos/queue-jobs/5234 HTTP/1.1
230230
Accept: application/vnd.api+json
231231
```
232232

233+
Requests for still-pending jobs **SHOULD** return a status `200 OK`, as the server is reporting the status successfully. Optionally, the server can return a `Retry-After` header to provide guidance to the client as to how long it should wait before checking again. Recommendations to retry sooner than 1 second can be accomplised with `Retry-After: 0`.
234+
235+
```http
236+
HTTP/1.1 200 OK
237+
Content-Type: application/vnd.api+json
238+
Retry-After: 1
239+
240+
{
241+
"data": {
242+
"type": "queue-jobs",
243+
"id": "5234",
244+
"attributes": {
245+
"status": "Pending request, waiting other process"
246+
},
247+
"links": {
248+
"self": "/photos/queue-jobs/5234"
249+
}
250+
}
251+
}
252+
```
253+
233254
When job process is done, the request **SHOULD** return a status `303 See other` with a link in `Location` header.
234255

235256
```http

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy