Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Zimmerman
Authority
Authority

Synchronous Tasks?

Is there any way to get API calls which return tasks to instead wait and return their results when they are done? Specifically, I'm interested in 'show changes'. I don't care how long it takes, since I perform all my API calls on background threads. I just want to get the data back in the same context where I make the call.

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

Not as far as I know, but maybe @Omer_Kleinstern can confirm.

0 Kudos
Omer_Kleinstern
Employee
Employee

The API calls will always return a task, however there are tools which offer the option to wait for the task to complete.

For example: mgmt_cli or the Python SDK.

0 Kudos
Bob_Zimmerman
Authority
Authority

Thanks! I figured since I didn't see an obvious way to do it, there probably wasn't one. I can handle asynchronous API results, it's just a bit annoying. Not a big deal.

On a related note, is there a list of all of the API calls which return a Task instead of returning results directly?

Is there a list of the types of Task object which don't remain in the 'show tasks' output? Specifically, 'show changes' returns a Task, but 'show tasks' doesn't seem to ever show that Task.

Is there a schema of just what a Task's task-details might contain?

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events