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

Included in:
Wazuh::Api::Endpoints, V4::Rules
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
# File 'lib/wazuh/api/endpoints/rules.rb', line 9

def all_rules(options = {})
  offset_request('get', '/rules', options)
end

#gdpr_rules(options = {}) ⇒ Object

Returns the GDPR requirements of all rules.



23
24
25
# File 'lib/wazuh/api/endpoints/rules.rb', line 23

def gdpr_rules(options = {})
  offset_request('get', '/rules/gdpr', options)
end

#gpg13_rules(options = {}) ⇒ Object

Returns the GPG13 requirements of all rules.



30
31
32
# File 'lib/wazuh/api/endpoints/rules.rb', line 30

def gpg13_rules(options = {})
  offset_request('get', '/rules/gpg13', options)
end

#hipaa_rules(options = {}) ⇒ Object

Returns the HIPAA requirements of all rules.



44
45
46
# File 'lib/wazuh/api/endpoints/rules.rb', line 44

def hipaa_rules(options = {})
  offset_request('get', '/rules/hipaa', options)
end

#nist_800_53_rules(options = {}) ⇒ Object

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



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

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

#pic_rules(options = {}) ⇒ Object

Returns the PCI requirements of all rules



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

def pic_rules(options = {})
  offset_request('get', '/rules/pci', options)
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:



74
75
76
# File 'lib/wazuh/api/endpoints/rules.rb', line 74

def rule_by_id(rule_id, options = {})
  offset_request('get', "/rules/#{rule_id}", options)
end

#rule_files(options = {}) ⇒ Object

Returns the files of all rules.



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

def rule_files(options = {})
  offset_request('get', '/rules/files', options)
end

#rules_groups(options = {}) ⇒ Object

Returns the groups of all rules.



37
38
39
# File 'lib/wazuh/api/endpoints/rules.rb', line 37

def rules_groups(options = {})
  offset_request('get', '/rules/groups', options)
end