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

[Web Gateway] REST API for rules and rulesets

Jump to solution

Hello,

I am using the REST API of Web Gateway. I'm able to get all the rulesets with the following URL : https://XXXXXXXX/Konfigurator/REST/rulesets

Now, I'm trying to have the details of a ruleset but I can't get them with the following URL : https://XXXXXXXX/Konfigurator/REST/rulesets/rulegroups/$idRuleset

Here is an example of the command I'm using : curl -k -X GET -H "Cookie: JSESSIONID=FC5E77B855B19FAA38DE46AAA522ABD2" "https://XXXXXXXX/Konfigurator/REST/rulesets/rulegroups/$idRuleset"

For this query, I get the following response : Method Not Allowed.

I tried all methods but I still have the same answer.

Can you please tell me how to get the details of a ruleset? Or, at least, is it possible to get them with the REST API? If not possible, is it possible to have the rule attached to a specific list (ex: WhiteLists, BlackLists etc...)?

Thanks

1 Solution

Accepted Solutions
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 5 of 7

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

Yes indeed, use POST.

I asked if you had a SR so I could send you the Beta REST API guide...

Best Regards,

Jon

View solution in original post

6 Replies
McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 2 of 7

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

Hi hatonis!

To download the ruleset you must add "export" to the path:

/rulesets/rulegroups/$id/export

There is no GET allowed at that level, only deletes.

Did you have a service request open at all?

Best Regards,

Jon

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

Hello,

Thank you for the answer. But, I'm still having the same answer : Method Not Allowed.

Is the following curl command correct for that : curl -k -X GET -H "Cookie: JSESSIONID=D7F5A2A2AA836A25DFFADB8A4EE01E18" "https://XXXXXX/Konfigurator/REST/rulesets/rulegroups/$id/export"


Can you give me an example of a correct call please?

No, I don't have a service request opened.

Regards

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

use the POST method:

curl -i -b cookies.txt -X POST "$REST/rulesets/rulegroups/98676/export"

McAfee Employee
McAfee Employee
Report Inappropriate Content
Message 5 of 7

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

Yes indeed, use POST.

I asked if you had a SR so I could send you the Beta REST API guide...

Best Regards,

Jon

View solution in original post

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

I'm interested in the Beta REST API guide also 🙂

Re: [Web Gateway] REST API for rules and rulesets

Jump to solution

Thank you very much for your help Jon Scholten and eelsasser. It's working now.

We will open a Service Request from another account.

Thanks again.

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