Module: Wazuh::Api::Endpoints::Rules

Included in:
Wazuh::Api::Endpoints
Defined in:
lib/wazuh/api/endpoints/rules.rb

Instance Method Summary collapse

Instance Method Details

#all_rules(options = {}) ⇒ Object

Returns all rules.



9
10
11
12
# File 'lib/wazuh/api/endpoints/rules.rb', line 9

def all_rules(options = {})
  data = get '/rules', options
  data.items
end

#gdpr_rules(options = {}) ⇒ Object

Returns the GDPR requirements of all rules.



25
26
27
28
# File 'lib/wazuh/api/endpoints/rules.rb', line 25

def gdpr_rules(options = {})
  data = get '/rules/gdpr', options
  data.items
end

#gpg13_rules(options = {}) ⇒ Object

Returns the GPG13 requirements of all rules.



33
34
35
36
# File 'lib/wazuh/api/endpoints/rules.rb', line 33

def gpg13_rules(options = {})
  data = get '/rules/gpg13', options
  data.items
end

#hipaa_rules(options = {}) ⇒ Object

Returns the HIPAA requirements of all rules.



49
50
51
52
# File 'lib/wazuh/api/endpoints/rules.rb', line 49

def hipaa_rules(options = {})
  data = get '/rules/hipaa', options
  data.items
end

#nist_800_53_rules(options = {}) ⇒ Object

Returns the NIST-800-53 requirements of all rules.



57
58
59
60
# File 'lib/wazuh/api/endpoints/rules.rb', line 57

def nist_800_53_rules(options = {})
  data = get '/rules/nist-800-53', options
  data.items
end

#pic_rules(options = {}) ⇒ Object

Returns the PCI requirements of all rules



65
66
67
68
# File 'lib/wazuh/api/endpoints/rules.rb', line 65

def pic_rules(options = {})
  data = get '/rules/pci', options
  data.items
end

#rule_by_id(rule_id, options = {}) ⇒ Object

Returns the rules with the specified id.

Parameters:

  • rule_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

See Also:



82
83
84
85
# File 'lib/wazuh/api/endpoints/rules.rb', line 82

def rule_by_id(rule_id, options = {})
  data = get "/rules/#{rule_id}", options
  data.items
end

#rule_files(options = {}) ⇒ Object

Returns the files of all rules.



17
18
19
20
# File 'lib/wazuh/api/endpoints/rules.rb', line 17

def rule_files(options = {})
  data = get '/rules/files', options
  data.items
end

#rules_groups(options = {}) ⇒ Object

Returns the groups of all rules.



41
42
43
44
# File 'lib/wazuh/api/endpoints/rules.rb', line 41

def rules_groups(options = {})
  data = get '/rules/groups', options
  data.items
end