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

Automatic Import using API

Jump to solution

Hi,

is it possible, that the following steps can be automated via ePO Web API:

Menu / System / System Tree / Groups Details / Import
Menu / Policy / Policy Assignments / Import
Menu / Client Task / Client Task Assignments / Import
Menu / Client Task / Client Task Catalog / Import
Menu / Automation / Server Task / Import
Menu / Reporting / Querys & Reporting / Import

 

Thanks

1 Solution

Accepted Solutions
cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 10

Re: Automatic Import using API

Jump to solution

See attached web api guide.  There are some examples for importing data.

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?

View solution in original post

9 Replies
cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 10

Re: Automatic Import using API

Jump to solution

See attached web api guide.  There are some examples for importing data.

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?

View solution in original post

Re: Automatic Import using API

Jump to solution

@cdinet 

I am unable to download the file due to some restrictions, how can I get it?

Venu
cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 4 of 10

Re: Automatic Import using API

Jump to solution

You can get it here:

https://kc.mcafee.com/corporate/index?page=content&id=PD24810

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?

rokasporch
Level 9
Report Inappropriate Content
Message 5 of 10

Re: Automatic Import using API

Jump to solution

Hi again,

on page 15 there is a description how to add for example a User with

 

"core.addUser"

 

Is it possible tho add a Group?

 

Thanks

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

Re: Automatic Import using API

Jump to solution

Where specifically do you want to add a user group?  I don't believe that would be possible.

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?

rokasporch
Level 9
Report Inappropriate Content
Message 7 of 10

Re: Automatic Import using API

Jump to solution

done in another threat

thanks

Re: Automatic Import using API

Jump to solution

You can use the ePolicy Orchestrator web API commands, with the command-line, to automate ePolicy Orchestrator configuration using scripts instead of using the user interface.

This section uses examples of the cURL command-line tool for transferring data with URL syntax. Each command is designed to work without user interaction. The cURL executable is a free and open software that runs under a wide variety of operating systems.

Each cURL example includes standard parameters followed by the actual ePolicy Orchestrator web API URL that executes a command on your McAfee ePO server. These parameters should help you to understand what the command does, although in practice you should implement tighter security when it comes to trusting the site's certificate.

This command, for example, shows the cURL syntax and the URL to illustrate the core capabilities of the web API.

curl -k -u ga:ga https://localhost:8443/remote/core.help

McAfee also provides a software download that includes Python version 2.7 and the Python Remote Client software, also known as pyclient. The supplied Python Remote Client software simplifies communication with, and exploration of, your ePolicy Orchestrator web API.

Using ePolicy Orchestrator web API commands with a scripting language, like Python, provides flexibility. The scripting language allows you to use the output of one command as the input to another, or to use conditions to perform actions based on script input or command output.

ePoMaster
Level 8
Report Inappropriate Content
Message 9 of 10

Re: Automatic Import using API

Jump to solution

Hello,

 

I also am stuck with no documentation about importing a policies XML file through the API.

The documentation you mentioned doesn't include the specific command (for curl). I tried:

curl -v -k -u ga:ga "https://localhost:8443/policy.importPolicy? file=@file.xml 

 

BUT only get an error 400 so I guess the command isn't right.

 

Seems this issue is here since 2011, is there any update about documenting the problem?

 

Thanks per advance

cdinet
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 10 of 10

Re: Automatic Import using API

Jump to solution

https://docs.mcafee.com/bundle/epolicy-orchestrator-web-api-reference-guide/page/GUID-B8003FFB-E960-...

You can use this to find correct syntax - 

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

 This is what it will return:

OK:
policy.importPolicy file [force]
Import policies from a file or a fully qualified file location
Requires edit permission for at least one product
Parameters:
 file (param 1) - Path to a local XML file (URI). If using the Python client and
want to upload the XML file, the location of the XML file must start with the
value "file:///". Example: file:///C:/policies.xml.
 force (param 2) - If true overwrites an existing matching policy. 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?

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