Using the API to get current status of commands

When I run an episode search through the Sonarr UI I get status messages like “Searching 1 indexers for [Adventure Time : S07E13]” and “No results found”. How do I access these messages through the API?

I understand that I can use GET to retrieve the current status of a command. For example, I can hit:

http://192.168.1.9:8989/api/command/15743?apikey=xxxxxxxxxxxxxxxxx

and get the response:

{
   name: "EpisodeSearch",
   message: "Completed",
   body: {
      episodeIds: [
         475
      ],
      sendUpdatesToClient: true,
      updateScheduledTask: true,
      completionMessage: "Completed",
      name: "EpisodeSearch",
      trigger: "manual"
   },
   priority: "normal",
   status: "completed",
   queued: "0001-01-01T00:00:00Z",
   duration: "00:00:03.0110480",
   trigger: "manual",
   state: "completed",
   manual: true,
   startedOn: "0001-01-01T00:00:00Z",
   sendUpdatesToClient: true,
   updateScheduledTask: true,
   id: 15743
}

But as far as I can tell, ‘state’ and ‘status’ are always either ‘started’ or ‘completed’. How do I access the more detailed status updates?

Thanks!

Those are sent via SignalR, http://signalr.net/ we use signalR to provider realtime updates to the UI, but its not something we intended to be used outside of the UI, though it may be possible.

Got it. Wasn’t sure if I was missing something.

SignalR looks over my head. I might try having my script look at the latest entries in the log file to see if the episode search returned any results.

Thanks for your help!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.