From 51bdaa2bc866d96442f4677b50653f310257f99e Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Wed, 26 Nov 2014 15:55:47 -0800 Subject: [PATCH] Clarify asynchronous resource creation Change-Id: I6d1111991414301206f579a7f3d20f2a37cc0ae9 --- guidelines/http.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/guidelines/http.rst b/guidelines/http.rst index dd9807f..3f8bce9 100644 --- a/guidelines/http.rst +++ b/guidelines/http.rst @@ -19,11 +19,13 @@ Success Codes * If the API call creates a resource on a server, the return code should be **201 Created**. -* If the API call succeeds, but the result of the call has created an - asynchronous task that will need to be polled to get completion or state - information, the return code should be **202 Accepted**, and the body of the - request should contain a link that the client can follow in order to get such - state information. +* Asynchronous resource creation + + * Response status code must be ``202 Accepted`` + * Must return a Location header set to one of the following: + * the URI of the resource to be created, if known. + * the URI of a status resource that the client can use to query the + progress of the asynchronous operation. * For all other successful calls, the return code should be **200 OK**.