Download Storage Object

Retrieve an object stored on the Indico Platform

Introduction

Just like the ability to upload files, the Indico SDK provides the ability for one to download storage objects generated by the Indico platform, for example, retrieving a submission result.

If the storage object is in json format, the result will automatically be deserialized into the native object format for that language, for example dict in python. Otherwise, the result will be in plain text or binary format, depending on the content type of the storage object being retrieved.

RetrieveStorageObject

Input

📥

RetrieveStorageObject Inputs

result_url: strA string representing the indico storage url of a storage object.

Output

📤

RetrieveStorageObject Outputs

Binary file data, plain text, or json.

Try It Out

You can try outRetrieveStorageObject below:

from indico.client import IndicoClient
from indico.queries import RetrieveStorageObject

client = IndicoClient()

# From another operation such as GetSubmission
result_url = "indico-file:///storage/submission/1/2/submission_3_result.json"

# Retrieve storage object
result = client.call(RetrieveStorageObject(result_url))
using IndicoV2;

// With provided token and host
var client = new IndicoClient(token, new Uri(host));
var storageClient = client.Storage();

// From another operation such as GetSubmission
var resultUrl = "indico-file:///storage/submission/1/2/submission_3_result.json";

// Retrieve storage object
var result = await storageClient.GetAsync(new Uri(resultUrl), default);

import com.indico.IndicoClient;
import com.indico.IndicoKtorClient;
import com.indico.storage.RetrieveBlob;
import com.indico.storage.Blob;

// Create client with config provided
IndicoClient client = new IndicoKtorClient(config);
RetrieveBlob retrieveBlob = client.retrieveBlob();

// From another operation such as GetSubmission
String resultUrl = "indico-file:///storage/submission/1/2/submission_3_result.json";

// Retrieve storage object
Blob blob = retrieveBlob.url(resultUrl).execute();