lib/hachi/clients/case.rb in hachi-0.1.2 vs lib/hachi/clients/case.rb in hachi-0.2.0
- old
+ new
@@ -22,34 +22,21 @@
severity: severity,
start_date: start_date,
owner: owner,
flag: flag,
tlp: tlp,
- tags: tags
+ tags: tags,
)
post("/api/case", kase.payload) { |json| json }
end
- def search(query, range: "all")
- validate_range range
+ def search(attributes, range: "all")
+ _search("/api/case/_search", attributes: attributes, range: range) { |json| json }
+ end
- payload = {
- query: {
- _and:
- [
- { string: query },
- { _and:
- [
- { _not: { status: "Deleted" } },
- { _not:
- { _in: { _field: "_type", _values: ["dashboard", "data", "user", "analyzer", "caseTemplate", "reportTemplate", "action"] } } }
- ] }
- ]
- }
- }
-
- post("/api/case/_search?range=#{range}", payload) { |json| json }
+ def links(id)
+ get("/api/case/#{id}/links") { |json| json }
end
end
end
end