cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[API] Import a system Tree from text file

Hello

I get a 400 bad Request erro while trying to import a system tree through the API. Everything works fine if I import a group or syste individually but not a file.

Here is my command:

curl -k -u username:passwd "https://server:8443/remote/system.importSystem?names=C:\temp/mcafee_epo/SystemTree.txt&branchNodeID=2"

 

I suppose it's a syntax problem but I can't put the finger on where the problem is...

 

Thanks for any help!

5 Replies
vivs
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 6

Re: [API] Import a system Tree from text file

Hello @ePoMaster 

Thanks for your post.

See attached web api guide.  There are some examples

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

Re: [API] Import a system Tree from text file

Hello Vivs,

Thanks but I think I start to know this document ^^. Do you refer to the page 17 of it?
I don't see any example...
cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 4 of 6

Re: [API] Import a system Tree from text file

If you run https://localhost:8443/remote/core.help?command=system.importSystem, you will get these results - see if that helps clear up any syntax issues.

system.importSystem names branchNodeID [allowDuplicates] [uninstallRemoved]
[pushAgent] [pushAgentForceInstall] [pushAgentSkipIfInstalled]
[pushAgentSuppressUI] [pushAgentInstallPath] [pushAgentPackagePath]
[pushAgentDomainName] [pushAgentUserName] [pushAgentPassword] [deleteIfRemoved]
[flattenTreeStructure]
Imports systems from text
Requires permission to edit System Tree
Parameters:
 [names (param 1) | fileName | uploadFile] - You need to either supply the
"names" with a comma-separated list of names or path to the file which contains
names.
 branchNodeID (param 2) - System Tree group ID as returned by system.findGroups
command
 allowDuplicates (param 3) - If true, systems with same name will be added as
duplicates. Defaults to false.
 uninstallRemoved (param 4) - If true, Agent will be removed from the client
system when it is removed from the System Tree. Defaults to false.
 pushAgent (param 5) - If true, deploys the Agent. Defaults to false.
 pushAgentForceInstall (param 6) - If true, force installation on client systems
even if the same version is already installed. Defaults to false.
 pushAgentSkipIfInstalled (param 7) - If true, does not over-install on systems
with an existing agent. Defaults to false.
 pushAgentSuppressUI (param 8) - If true, does not display installer user
interface on the client system. Defaults to false.
 pushAgentInstallPath (param 9) - Installation path on the client system.
Defaults to standard Agent installation path.
 pushAgentPackagePath (param 10) - Path to the agent package, for example
"Current/EPOAGENT3000/Install/0409".
 pushAgentDomainName (param 11) - Windows domain name of user account used for
authentication to the client system. No default.
 pushAgentUserName (param 12) - User name to authenticate on the client system
when deploying Agents. Must have administrator rights to the client system.
 pushAgentPassword (param 13) - Password to authenticate on the client system
when deploying Agents. Defaults to blank password.
 deleteIfRemoved (param 14) - If true, system will be removed from the System
Tree when it is removed from the synchronization point. Defaults to false.
 flattenTreeStructure (param 15) - If true, Flatten tree structure. Defaults to
false.

 

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

Re: [API] Import a system Tree from text file

Sorry but that doesn't help either as there is no real syntax example for importing a file.
Is it a problem about the path? Did I forget a /?
Thanks.
cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 6 of 6

Re: [API] Import a system Tree from text file

Try putting in correct path - you have slashes going 2 different ways:

C:\temp/mcafee_epo/SystemTree.txt

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community