Hello
I’ve initialy open an issue on github about this point, but discourse seems a better place to talk about this.
I was wondering if it’s plan to write specs when doing asynchronous processing. Maybe it’s completely irrelevant…
If not, will love to discuss about it. I’m writing Blueprint API and try to write proper asynchronous processing with the Json-API spec in mind.
- Posting return :
HTTP/1.1 202 Accepted
Location: http://example.com/photos/queue/5234
Content-Type: application/vnd.api+json
Does response need a body with more informations ? Seems enough for me.
- Get status
HTTP/1.1 200 Ok
Content-Type: application/vnd.api+json
{
"links": {
"self": "/photos/queue/5234"
},
"data": {
"type": "queue job",
"id": "5234",
"status": "Process failed, see errors",
"errors": [
{
"code": "too_long",
"field": "/photos/title"
},
{
"code": "invalid_format",
"field": "/photos/file01"
}
]
}
}
- If success
HTTP/1.1 303 See other
Location: http://example.com/photos/4577
Content-Type: application/vnd.api+json
Thanks in advance.