cancel
Showing results for 
Search instead for 
Did you mean: 
rw89
Level 7
Report Inappropriate Content
Message 1 of 4

Problem with clienttask.run Parameter: comma-separated list of names, ip addresses or ID's

Hello

I've just started to to work with the WebAPI, but unfortunately I have some problems with the method 'clienttask.run'. Maybe someone can help me or tell me what I am doing wrong.

I'm trying to use the Agent-GUID as the first (id) parameter, but it fails everytime. (I'm using the ePO API Explorer 1.0.1.0 to check this methods)

1. When I am trying to use the method 'clienttask.run ids' I get this error message then (Example-GUID: 8ae8d8d0-e6aa-11e1-aff1-0800200c9a66):

Error 0 :

For input string: "8ae8d8d0-e6aa-11e1-aff1-0800200c9a66"

2. When I'm trying to use the method 'clienttask.run name' I get this error message:

Error 0 :

System Ids or names list is empty

The scripting guide says that I have to use a comma-separated list of names etc. Although I have only one GUID, I've tried this with 2 and more (always separated by a comma) but it still didn't worked!

PS: Only when I'm using the system-name instead of the Agent-GUID --> it works ! 

So, what am I doing wrong?

Thanks!

3 Replies

Re: Problem with clienttask.run Parameter: comma-separated list of names, ip addresses or ID's

I have the same error message when using an AgentGUID. I also tried to use system.wakeupAgent with an AgentGUID, but that did not work either.

Since ePO 4.6 something changed regarding AgentGUIDs. In previous version you could search for an AgentGUID using the "Quick System Search" on the ePO dashboard, but this functionality was removed.

jking
Level 10
Report Inappropriate Content
Message 3 of 4

Re: Problem with clienttask.run Parameter: comma-separated list of names, ip addresses or ID's

Ah, sorry those are database identifiers not agent GUIDs.  You can find the 'id' column either by doing a system.find (which does search in AgentGUID).  Like:

https://localhost:8443/remote/system.find?searchText=99974&Smiley Surprisedutput=terse

OK:

System Location System Name    Description ...

--------------- -------------- ----------- ...

85              aaa-DEMO-MAC-0             ...

Or you can get exactly the values you want by doing a core.executeQuery, like:

https://localhost:8443/remote/core.executeQuery?target=EPOLeafNode&select=%28select%20EPOLeafNode.Au...Smiley Surprised

OK:

Unique ID System Name  

--------- --------------

85        aaa-DEMO-MAC-0

Hope that helps.

Jon

Message was edited by: jking on 9/4/12 11:47:25 AM CDT

Re: Problem with clienttask.run Parameter: comma-separated list of names, ip addresses or ID's

Thanks for the info, the core.executeQuery works fine for me, but I'm not getting any result when using system.find. I use the same AgentGUID (or part of) for both API calls.

(It's not my intention to hijack the thread, just sharing my experiences)