- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
Export NetMRI compliance policies and associated rules with REST API
10-18-2022 12:48 PM
The title says what I want to do. I've been browsing the NetMRI API documentation and I found a method for importing a compliance policy into a NetMRI system. It's part of the Policy model and is called 'import_file' surprisingly enough. However, I can't find any method that will export a policy such that I can use its output to feed to the 'import_file' method.
Does such a method really not exist in the API or have I just missed it? I hope I just missed it.
Re: Export NetMRI compliance policies and associated rules with REST API
10-18-2022 01:56 PM
Well, I found an undocumented method called 'export_file' that is part of the Policy model. It spits out exactly the same text you get when you export a policy using the GUI. Now I'm trying to convince the 'import_file' method to use it's output to import the policy into a second NetMRI system.
Right now, using the 'import_file' method give me this error.
Policy file does not contain valid data: undefined method
'rewind' for #<String:0x0000000d03bb20>
Has anyone successfully used the 'import_file' method to import a policy into a NetMRI system?