Updating a Submission

Update the retrieval status of a Submission by id

Introduction

After a Submission is done processing, and once you've downloaded any results from it, you may find it helpful to update it to indicate you've retrieved those predictions. You can do so via the UpdateSubmissionquery. Like the queries above, it also returns a Submission object for downstream use.

UpdateSubmission

Inputs

📥

UpdateSubmission Inputs

submission_id: int Submission id

retrieved: bool Bool to indicate if you have retrieved prediction results

Outputs

General description of the output. Labore et dolore magna aliqua. Nunc non blandit massa enim.

📤

UpdateSubmission Outputs

Found Submission object

Try It Out

You can try outUpdateSubmission below:

from indico.queries import UpdateSubmission
from indico.types import Submission

submission_id: int = 1
  
submission: Submission = client.call(UpdateSubmission(submission_id, retrieved=True))

// Call MarkSubmissionAsRetrieved will update the submission and set retrieved to True
using System;
using System.IO;
using System.Threading.Tasks;
using IndicoV2;

namespace Examples
{
    public class MarkSubmissionAsRetrieved
    {
        private static string GetToken() =>
            File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
                "indico_api_token.txt"));

        public static async Task Main()
        {
            var client = new IndicoClient(GetToken(), new Uri("https://mycluster.indico.io"));

            var submissionClient = client.Submissions();

            var submissionId = 1;

            var submission = await submissionClient.MarkSubmissionAsRetrieved(submissionId);
            Console.WriteLine(submission.Id);
        }
    }
}
package com.indico;

import com.indico.entity.Submission;

import com.indico.mutation.UpdateSubmission;

public class main {

    public IndicoClient client;
    private static String token_path = "./indico_api_token.txt";
    private static String host  =  "mycluster.indico.io"
    private static Integer submission_id = 1;

    public static void main(String args[]) throws Exception {

        
        IndicoConfig config = new IndicoConfig.Builder().host(host)
                .protocol("https")
                .tokenPath(token_path)
                .build();
        client = new IndicoKtorClient(config);

        client.updateSubmission().submissionId(submission_id).retrieved(true).execute();

        System.exit(0);
    }
}

What’s Next

Related to: