cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Erik
Level 9
Report Inappropriate Content
Message 1 of 11

ePO Web Api - Create Group

Jump to solution

Am I missing something or is it not possible to create a group using epo web api?

Please create a function for this in a future version

1 Solution

Accepted Solutions
JoeBidgood
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 10 of 11

Re: ePO Web Api - Create Group

Jump to solution

I was able to get this to work by making two small changes: replace the backslash with a forward slash, and put the entire URL in quotes:

 

curl -k -u user:pwd "https://localhost:8443/remote/system.importSystem?names=Testgroup/&branchNodeID=2"

 

Give that try - hopefully it will work for you.

HTH -

Joe

View solution in original post

10 Replies

Re: ePO Web Api - Create Group

Jump to solution

You can use the system.importSystem command.  When you pass it the computer name parameter add a backslash.

To test this out easily you can use the API explorer in the ePO Tools Exchange or use a browser with the follwing URL.  Once authenticated you should see the new group. 

https://localhost:8443/remote/system.importSystem?names=testgroup\&branchNodeID=2

Subgroups can be create by adding addtional groupnames with backslashes

https://localhost:8443/remote/system.importSystem?names=testgroup\group1\&branchNodeID=2

API Explorer https://community.mcafee.com/docs/DOC-2931 :

11-1-2011 10-57-10 PM.png

mdyer
Level 7
Report Inappropriate Content
Message 3 of 11

Re: ePO Web Api - Create Group

Jump to solution

Can the Web API be used to edit the 'Notes' field on the created group (similar to system.setUserProperties)?

Message was edited by: mdyer on 12/24/11 9:02:24 AM EST

Re: ePO Web Api - Create Group

Jump to solution

Bumping an old thread to avoid duplicate posts. Has this been updated in ePO 5.1.2? I tried to call system.importSystem as follows but it just created an unmanaged system in the lost&found.

wget -q -O - --no-check-certificate --user=USERNAME --password=PASSWORD https://server:8443/remote/system.importSystem?names=testgroup\&branchNodeID=2

Any advice would be appreciated.

Thanks!

ePoMaster
Level 8
Report Inappropriate Content
Message 5 of 11

Re: ePO Web Api - Create Group

Jump to solution

Also bumping in this old post but for a different reason:

I'm getting the "'branchNodeID' is not recognized as an internal or external command operable program or batch file.' error while I literally copied your command to test it.

 

Am I doing something wrong? Kind of new to this.

 

Thanks per advance, 

cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 6 of 11

Re: ePO Web Api - Create Group

Jump to solution

Database schema has changed over the years.  See if this command gives you a little more info:

curl -k -u ga:ga https://localhost:8443/remote/core.help?command=system.importSystem

This is what mine returned:

OK:
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 😎 - 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?

ePoMaster
Level 8
Report Inappropriate Content
Message 7 of 11

Re: ePO Web Api - Create Group

Jump to solution

Thank you for your response. Althought, how would you use this command having the first two parameters?

 

Is this correct?:

curl -k -u user:pwd https://localhost:8443/remote/system.importSystem?names=Testgroup\&branchNodeID=2

 

This is as I read on the documentation it should be written... Is there any small change that would effect the execution?

 

Also, if I try asking to add a group without the branchNodeID param, it asks for it anyway.

 

cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 8 of 11

Re: ePO Web Api - Create Group

Jump to solution

The branchnode ID might not be correct, so you might need to use the suggested query to find the correct branchnodeid.

branchNodeID (param 2) - System Tree group ID as returned by system.findGroups
command

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?

ePoMaster
Level 8
Report Inappropriate Content
Message 9 of 11

Re: ePO Web Api - Create Group

Jump to solution

Thanks for the quick response.

 

 I tried 'system.findGroups?search=My" which reaturned the group ID "2". The group path being 'My Organization'

 

It didn't return any other group.

JoeBidgood
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 10 of 11

Re: ePO Web Api - Create Group

Jump to solution

I was able to get this to work by making two small changes: replace the backslash with a forward slash, and put the entire URL in quotes:

 

curl -k -u user:pwd "https://localhost:8443/remote/system.importSystem?names=Testgroup/&branchNodeID=2"

 

Give that try - hopefully it will work for you.

HTH -

Joe

View solution in original post

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