Downloading data with asstore (v2)

Updated

asstore is a time-limited task result store, which allows clients to retrieve the results of submitted tasks as and when they become available.

  • Task results are stored for a limited period before being expired and deleted
  • A task result may only be downloaded once; it is deleted once consumed

Fetching task results

Once a client has satisfied themselves that a task has completed its results are available on asstore, the results can be retrieved with a simple request.

All authentication is performed using a token which must be present in the request's Authorization header. In the following example request, the retrieval_endpoint value from the task status should be used to fetch the task's results.

$ curl \
    -X GET \
    -H 'Authorization: Token <TOKEN>' \
    <RETRIEVAL_ENDPOINT> -D -

With a valid retrieval endpoint the result could look like this:

$ curl \
    -X GET \
    -H 'Authorization: Token <TOKEN>' \
    https://asstore.reincubate.com/fetch/asstore/de7d38ca-1d63-45d1-9036-824bbaeda4db -D -

If the result has already been consumed, the server's will respond with an HTTP 404 in the following format:

HTTP/1.1 404 Not Found
Content-Type: application/json
...16:17
{"message": "No results were found for this task id.", "success": false, "error": "task-result-not-found"}

Troubleshooting HTTP response codes

Status Text Description
200 OK Everything is fine.
400 Bad Request Client has submitted invalid data.
401 Unauthorized Token is invalid.
404 Result Unavailable The requested task result does not exist: perhaps it has already been fetched.
503 Service Unavailable asstore is currently unavailable: check status.reincubate.com.

How can we help?

Our support team are here to help!

Our office hours are Monday to Friday, 9am to 5pm GMT.

We aim to reply to all messages within one working day.

Get in touch › Our awesome support team

© 2008 - 2019 Reincubate Ltd. All rights reserved. Registered in England and Wales #5189175, VAT GB151788978. Reincubate® is a registered trademark. Privacy & terms. We recommend 2FA. Built with in London.