{
"basePath": "/",
"swaggerVersion": "1.1",
"apiVersion": "0.1",
"apis": [
{
"operations": [
{
"errorResponses": [
{
"reason": "is returned if no job-id was specified in the request. In this case, no x-arango-async-id HTTP header will be returned. ",
"code": "400"
},
{
"reason": "is returned if the job was not found or already deleted or fetched from the job result list. In this case, no x-arango-async-id HTTP header will be returned. ",
"code": "404"
}
],
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": "true",
"name": "job-id",
"description": "The async job id. "
}
],
"notes": "Returns the result of an async job identified by job-id. If the async job result is present on the server, the result will be removed from the list of result. That means this method can be called for each job-id once.
The method will return the original job result's headers and body, plus the additional HTTP header x-arango-async-job-id. If this header is present, then the job was found and the response contains the original job's result. If the header is not present, the job was not found and the response contains status information from the job amanger.
",
"summary": "Returns the result of an async job",
"httpMethod": "PUT",
"examples": "Not providing a job-id:
unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n
unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409420199\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409420199\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409420199\n\n{\"server\":\"arango\",\"version\":\"1.4.3\"}\n\n
unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409485735\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409485735\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409485735\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409551271\n\nunix> curl --dump - http://localhost:8529/_api/job/done\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n \"409551271\" \n]\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409616807\n\nunix> curl --dump - http://localhost:8529/_api/job/pending\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409682343\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true \n}\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409747879\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1385372569\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true \n}\n\n
unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true \n}\n\n
unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"not found\", \n \"code\" : 404, \n \"errorNum\" : 404 \n}\n\n