json - Api Blueprint and long running jobs -


i design json api long running jobs blueprint. need process files, return 202 accepted location header , design temporary location receive 303 see other , final object 201 created.

is there way design sequence ?

the blueprint this:

# stars [/stars]  collection of stars.  ## create [post] + request (application/json)      create star      + body              {"name": "death star"}  + response 202      request has been accepted queue. poll queue item check result.       + headers              location: /queue/12345   # queue item [/queue/{id}]  1 item in job queue.  + parameters     + id: 12345 (number) - id of queue  ## query status [get] + response 200 (aplication/xml)      job still in progress.      + body              <response>                 <status>pending</status>                 <eta>2 mins.</eta>                 <link rel="cancel" method="delete" href="/queue/12345" />             </response>  + response 303      job has finished. see created resource.      + headers              location: /stars/97865 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -