Method: MISP::Attribute#search
- Defined in:
- lib/misp/attribute.rb
#search(**params) ⇒ Array<MISP::Attributes>
Search for attributes
138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/misp/attribute.rb', line 138 def search(**params) base = { returnFormat: "json", limit: "100", page: "0" } _post("/attributes/restSearch", base.merge(params)) do |json| attributes = json.dig(:response, :Attribute) || [] attributes.map { |attribute| Attribute.new(**attribute) } end end |