Returns Task information including its states and events.

You can only retrieve a Task if you have access to it. For example, you can get a Task relating to an Application Instance if you created the Instance.

Tasks are created in response to creating Datasets and launching Applications and Jobs.

Tasks contain of a list of states and events. A Task will always have states but may not have events.

States and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 500 events are returned.

You can control the number of events returned by using the event_limit query parameter. You can also retrieve the next set of events by combining it with the event_prior_ordinal, setting it to the ordinal of the oldest event you've already received.

Dataset* tasks must be allowed to complete successfully before you can expect it to be available through the dataset API endpoints. Application Instances are not available until their task state is STARTED.

For Dataset Tasks, where the task purpose is DATASET, you must wait until done is true. The Dataset is available when the Task object's done field is true and the exit_code field is zero (0). If you discover the Task is done but you have a non-zero exit_code, the Dataset upload will have failed, and you may need need to inspect the final state and any related events to understand why.

For Application Instance Tasks, where the Task purpose is INSTANCE, you must wait until you find the STARTED state in the states list. An Application Instance is only done when the Application Instance has been deleted.

  • Parameters

    • taskId: string
    • Optionalparams: GetTaskParams
    • Optionaloptions: AxiosRequestConfig
    • Optionalsignal: AbortSignal

    Returns Promise<TaskGetResponse>