Skip to content

Retrieving run error after executing a job using WorkspaceClient #384

Closed Answered by KoningJasper
ahmadnazeri asked this question in Q&A
Discussion options

You must be logged in to vote

@ahmadnazeri

When you create and execute a job it consists of a job-run and 1 to 100 task-runs. The job-run itself doesn't have any output it's simply a holder status for the collection of all your task-runs. Therefore, API 2.1 will return this error message when you try to retrieve the output of the job-run, since it's only a holder. For API 2.0 we added a compatibility layer, if your job-run has only a single task-run we will retrieve it's output.
In-order to retrieve the output using API 2.1 you have to call it with the run-id of the task-run (NOT the job-run). You can retrieve this run-id by calling get-run. That will show the tasks array containing all the task-runs.

Replies: 3 comments 1 reply

Comment options

nfx
May 9, 2023
Collaborator

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nfx
Comment options

You must be logged in to vote
1 reply
@ahmadnazeri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #375 on May 09, 2023 17:38.