wazuh-ruby-client 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/Wazuh.html +4 -4
- data/docs/Wazuh/Api.html +2 -2
- data/docs/Wazuh/Api/Endpoints.html +3 -3
- data/docs/Wazuh/Api/Endpoints/ActiveResponse.html +1 -1
- data/docs/Wazuh/Api/Endpoints/Agents.html +3218 -594
- data/docs/Wazuh/Api/Endpoints/Cache.html +1 -1
- data/docs/Wazuh/Api/Endpoints/Ciscat.html +5 -3
- data/docs/Wazuh/Api/Endpoints/Cluster.html +48 -44
- data/docs/Wazuh/Api/Endpoints/Decoders.html +25 -17
- data/docs/Wazuh/Api/Endpoints/Experimental.html +60 -42
- data/docs/Wazuh/Api/Endpoints/Lists.html +15 -11
- data/docs/Wazuh/Api/Endpoints/Manager.html +26 -24
- data/docs/Wazuh/Api/Endpoints/Rootcheck.html +26 -20
- data/docs/Wazuh/Api/Endpoints/Rules.html +60 -42
- data/docs/Wazuh/Api/Endpoints/SecurityConfigurationAssessment.html +11 -7
- data/docs/Wazuh/Api/Endpoints/Summary.html +1 -1
- data/docs/Wazuh/Api/Endpoints/Syscheck.html +29 -30
- data/docs/Wazuh/Api/Endpoints/Syscollector.html +43 -31
- data/docs/Wazuh/Api/Errors.html +3 -5
- data/docs/Wazuh/Api/Errors/WazuhError.html +79 -7
- data/docs/Wazuh/Client.html +6 -6
- data/docs/Wazuh/Config.html +1 -1
- data/docs/Wazuh/Logger.html +1 -1
- data/docs/Wazuh/{Faraday.html → Sawyer.html} +9 -9
- data/docs/Wazuh/{Faraday → Sawyer}/Connection.html +6 -6
- data/docs/Wazuh/{Faraday → Sawyer}/Request.html +10 -10
- data/docs/WazuhRubyClient.html +2 -2
- data/docs/_index.html +15 -52
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +138 -2
- data/docs/index.html +138 -2
- data/docs/method_list.html +219 -83
- data/docs/top-level-namespace.html +1 -1
- data/lib/wazuh-ruby-client/version.rb +1 -1
- data/lib/wazuh/api/endpoints/agents.rb +2 -1
- data/lib/wazuh/version.rb +1 -1
- metadata +6 -11
- data/docs/.nojekyll +0 -0
- data/docs/Wazuh/Api/Errors/TooManyRequestsError.html +0 -398
- data/docs/Wazuh/Faraday/Response.html +0 -115
- data/docs/Wazuh/Faraday/Response/RaiseError.html +0 -191
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ee6623bb491081899d0769df71e12fca755e9dc68bf86b6dfb1a36fc8e0a3ad
|
4
|
+
data.tar.gz: c9536ba23160a14a47c8f41ba6846edde3b49dbf1c6d008d66be3c177dec1655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623e3f6a34bfc98fed98cf08f0c4ec2adfcf20d28bcab4b5d0b3a68d36219d75271ba44212428246b629fff74d284221e0322a49213cf52121f12f8733a2bd42
|
7
|
+
data.tar.gz: 7527db0567ed152561ee7d372e95fec140998fab2e21c814c447e53f3bad0740b24193aaef950107189bb89420d11516e6fd2f76fc0a9bafea4708d0a122887b
|
data/CHANGELOG.md
CHANGED
data/docs/Wazuh.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/wazuh/client.rb<span class="defines">,<br />
|
82
|
-
lib/wazuh/config.rb,<br /> lib/wazuh/logger.rb,<br /> lib/wazuh/version.rb,<br /> lib/wazuh/api/error.rb,<br /> lib/wazuh/api/endpoints.rb,<br /> lib/wazuh/
|
82
|
+
lib/wazuh/config.rb,<br /> lib/wazuh/logger.rb,<br /> lib/wazuh/version.rb,<br /> lib/wazuh/api/error.rb,<br /> lib/wazuh/api/endpoints.rb,<br /> lib/wazuh/sawyer/request.rb,<br /> lib/wazuh/sawyer/connection.rb,<br /> lib/wazuh/api/endpoints/cache.rb,<br /> lib/wazuh/api/endpoints/lists.rb,<br /> lib/wazuh/api/endpoints/rules.rb,<br /> lib/wazuh/api/endpoints/agents.rb,<br /> lib/wazuh/api/endpoints/ciscat.rb,<br /> lib/wazuh/api/endpoints/cluster.rb,<br /> lib/wazuh/api/endpoints/manager.rb,<br /> lib/wazuh/api/endpoints/summary.rb,<br /> lib/wazuh/api/endpoints/decoders.rb,<br /> lib/wazuh/api/endpoints/syscheck.rb,<br /> lib/wazuh/api/errors/wazuh_error.rb,<br /> lib/wazuh/api/endpoints/rootcheck.rb,<br /> lib/wazuh/api/endpoints/experimental.rb,<br /> lib/wazuh/api/endpoints/syscollector.rb,<br /> lib/wazuh/api/endpoints/active_response.rb,<br /> lib/wazuh/api/endpoints/security_configuration_assessment.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -89,7 +89,7 @@
|
|
89
89
|
<p class="children">
|
90
90
|
|
91
91
|
|
92
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Wazuh/Api.html" title="Wazuh::Api (module)">Api</a></span>, <span class='object_link'><a href="Wazuh/Config.html" title="Wazuh::Config (module)">Config</a></span>, <span class='object_link'><a href="Wazuh/
|
92
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Wazuh/Api.html" title="Wazuh::Api (module)">Api</a></span>, <span class='object_link'><a href="Wazuh/Config.html" title="Wazuh::Config (module)">Config</a></span>, <span class='object_link'><a href="Wazuh/Sawyer.html" title="Wazuh::Sawyer (module)">Sawyer</a></span>
|
93
93
|
|
94
94
|
|
95
95
|
|
@@ -109,7 +109,7 @@
|
|
109
109
|
<dt id="VERSION-constant" class="">VERSION =
|
110
110
|
|
111
111
|
</dt>
|
112
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.
|
112
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.2.3</span><span class='tstring_end'>'</span></span></pre></dd>
|
113
113
|
|
114
114
|
</dl>
|
115
115
|
|
@@ -246,7 +246,7 @@
|
|
246
246
|
</div>
|
247
247
|
|
248
248
|
<div id="footer">
|
249
|
-
Generated on
|
249
|
+
Generated on Tue Feb 18 20:12:27 2020 by
|
250
250
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
251
251
|
0.9.16 (ruby-2.5.1).
|
252
252
|
</div>
|
data/docs/Wazuh/Api.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/wazuh/api/error.rb<span class="defines">,<br />
|
82
|
-
lib/wazuh/api/endpoints.rb,<br /> lib/wazuh/api/endpoints/cache.rb,<br /> lib/wazuh/api/endpoints/lists.rb,<br /> lib/wazuh/api/endpoints/rules.rb,<br /> lib/wazuh/api/endpoints/agents.rb,<br /> lib/wazuh/api/endpoints/ciscat.rb,<br /> lib/wazuh/api/endpoints/cluster.rb,<br /> lib/wazuh/api/endpoints/manager.rb,<br /> lib/wazuh/api/endpoints/summary.rb,<br /> lib/wazuh/api/endpoints/decoders.rb,<br /> lib/wazuh/api/endpoints/syscheck.rb,<br /> lib/wazuh/api/errors/wazuh_error.rb,<br /> lib/wazuh/api/endpoints/rootcheck.rb,<br /> lib/wazuh/api/endpoints/experimental.rb,<br /> lib/wazuh/api/endpoints/syscollector.rb,<br /> lib/wazuh/api/endpoints/active_response.rb,<br /> lib/wazuh/api/
|
82
|
+
lib/wazuh/api/endpoints.rb,<br /> lib/wazuh/api/endpoints/cache.rb,<br /> lib/wazuh/api/endpoints/lists.rb,<br /> lib/wazuh/api/endpoints/rules.rb,<br /> lib/wazuh/api/endpoints/agents.rb,<br /> lib/wazuh/api/endpoints/ciscat.rb,<br /> lib/wazuh/api/endpoints/cluster.rb,<br /> lib/wazuh/api/endpoints/manager.rb,<br /> lib/wazuh/api/endpoints/summary.rb,<br /> lib/wazuh/api/endpoints/decoders.rb,<br /> lib/wazuh/api/endpoints/syscheck.rb,<br /> lib/wazuh/api/errors/wazuh_error.rb,<br /> lib/wazuh/api/endpoints/rootcheck.rb,<br /> lib/wazuh/api/endpoints/experimental.rb,<br /> lib/wazuh/api/endpoints/syscollector.rb,<br /> lib/wazuh/api/endpoints/active_response.rb,<br /> lib/wazuh/api/endpoints/security_configuration_assessment.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -123,7 +123,7 @@
|
|
123
123
|
</div>
|
124
124
|
|
125
125
|
<div id="footer">
|
126
|
-
Generated on
|
126
|
+
Generated on Tue Feb 18 20:12:27 2020 by
|
127
127
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
128
128
|
0.9.16 (ruby-2.5.1).
|
129
129
|
</div>
|
@@ -199,7 +199,7 @@
|
|
199
199
|
|
200
200
|
|
201
201
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Endpoints/Lists.html" title="Wazuh::Api::Endpoints::Lists (module)">Lists</a></span></h3>
|
202
|
-
<p class="inherited"><span class='object_link'><a href="Endpoints/Lists.html#
|
202
|
+
<p class="inherited"><span class='object_link'><a href="Endpoints/Lists.html#cdb_files_path-instance_method" title="Wazuh::Api::Endpoints::Lists#cdb_files_path (method)">#cdb_files_path</a></span>, <span class='object_link'><a href="Endpoints/Lists.html#cdb_lists-instance_method" title="Wazuh::Api::Endpoints::Lists#cdb_lists (method)">#cdb_lists</a></span></p>
|
203
203
|
|
204
204
|
|
205
205
|
|
@@ -265,7 +265,7 @@
|
|
265
265
|
|
266
266
|
|
267
267
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Endpoints/Agents.html" title="Wazuh::Api::Endpoints::Agents (module)">Agents</a></span></h3>
|
268
|
-
<p class="inherited"><span class='object_link'><a href="Endpoints/Agents.html#add_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agent (method)">#add_agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#add_agent_quick-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agent_quick (method)">#add_agent_quick</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent-instance_method" title="Wazuh::Api::Endpoints::Agents#agent (method)">#agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_by_name-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_by_name (method)">#agent_by_name</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_key-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_key (method)">#agent_key</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#all_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#all_agents (method)">#all_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#distinct_fields_in_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#distinct_fields_in_agents (method)">#distinct_fields_in_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#insert_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#insert_agent (method)">#insert_agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#outdated_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#outdated_agents (method)">#outdated_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_agents (method)">#restart_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_all_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_all_agents (method)">#restart_all_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_an_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_an_agents (method)">#restart_an_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#upgrade_result_from_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#upgrade_result_from_agent (method)">#upgrade_result_from_agent</a></span></p>
|
268
|
+
<p class="inherited"><span class='object_link'><a href="Endpoints/Agents.html#add_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agent (method)">#add_agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#add_agent_quick-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agent_quick (method)">#add_agent_quick</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#add_agent_to_group-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agent_to_group (method)">#add_agent_to_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#add_agents_to_group-instance_method" title="Wazuh::Api::Endpoints::Agents#add_agents_to_group (method)">#add_agents_to_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent-instance_method" title="Wazuh::Api::Endpoints::Agents#agent (method)">#agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_by_name-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_by_name (method)">#agent_by_name</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_config-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_config (method)">#agent_config</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_key-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_key (method)">#agent_key</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_os_summary-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_os_summary (method)">#agent_os_summary</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_summary-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_summary (method)">#agent_summary</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agent_sync_status-instance_method" title="Wazuh::Api::Endpoints::Agents#agent_sync_status (method)">#agent_sync_status</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agents_by_group-instance_method" title="Wazuh::Api::Endpoints::Agents#agents_by_group (method)">#agents_by_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#agents_by_no_group-instance_method" title="Wazuh::Api::Endpoints::Agents#agents_by_no_group (method)">#agents_by_no_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#all_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#all_agents (method)">#all_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#create_group-instance_method" title="Wazuh::Api::Endpoints::Agents#create_group (method)">#create_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#delete_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#delete_agent (method)">#delete_agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#delete_agent_by_group-instance_method" title="Wazuh::Api::Endpoints::Agents#delete_agent_by_group (method)">#delete_agent_by_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#delete_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#delete_agents (method)">#delete_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#distinct_fields_in_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#distinct_fields_in_agents (method)">#distinct_fields_in_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#get_file_in_group-instance_method" title="Wazuh::Api::Endpoints::Agents#get_file_in_group (method)">#get_file_in_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#group_configuration-instance_method" title="Wazuh::Api::Endpoints::Agents#group_configuration (method)">#group_configuration</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#group_files-instance_method" title="Wazuh::Api::Endpoints::Agents#group_files (method)">#group_files</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#groups-instance_method" title="Wazuh::Api::Endpoints::Agents#groups (method)">#groups</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#insert_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#insert_agent (method)">#insert_agent</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#outdated_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#outdated_agents (method)">#outdated_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#remove_agent_of_group-instance_method" title="Wazuh::Api::Endpoints::Agents#remove_agent_of_group (method)">#remove_agent_of_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#remove_agents_of_group-instance_method" title="Wazuh::Api::Endpoints::Agents#remove_agents_of_group (method)">#remove_agents_of_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#remove_all_agent_of_group-instance_method" title="Wazuh::Api::Endpoints::Agents#remove_all_agent_of_group (method)">#remove_all_agent_of_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#remove_group-instance_method" title="Wazuh::Api::Endpoints::Agents#remove_group (method)">#remove_group</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_agents (method)">#restart_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_all_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_all_agents (method)">#restart_all_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#restart_an_agents-instance_method" title="Wazuh::Api::Endpoints::Agents#restart_an_agents (method)">#restart_an_agents</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#update_group_ossec_configuration-instance_method" title="Wazuh::Api::Endpoints::Agents#update_group_ossec_configuration (method)">#update_group_ossec_configuration</a></span>, <span class='object_link'><a href="Endpoints/Agents.html#upgrade_result_from_agent-instance_method" title="Wazuh::Api::Endpoints::Agents#upgrade_result_from_agent (method)">#upgrade_result_from_agent</a></span></p>
|
269
269
|
|
270
270
|
|
271
271
|
|
@@ -282,7 +282,7 @@
|
|
282
282
|
</div>
|
283
283
|
|
284
284
|
<div id="footer">
|
285
|
-
Generated on
|
285
|
+
Generated on Tue Feb 18 20:12:27 2020 by
|
286
286
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
287
287
|
0.9.16 (ruby-2.5.1).
|
288
288
|
</div>
|
@@ -268,7 +268,7 @@ a script name instead of a command name.</p>
|
|
268
268
|
</div>
|
269
269
|
|
270
270
|
<div id="footer">
|
271
|
-
Generated on
|
271
|
+
Generated on Tue Feb 18 20:12:28 2020 by
|
272
272
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
273
273
|
0.9.16 (ruby-2.5.1).
|
274
274
|
</div>
|
@@ -130,7 +130,7 @@
|
|
130
130
|
<li class="public ">
|
131
131
|
<span class="summary_signature">
|
132
132
|
|
133
|
-
<a href="#add_agent_quick-instance_method" title="#add_agent_quick (instance method)">#<strong>add_agent_quick</strong>(
|
133
|
+
<a href="#add_agent_quick-instance_method" title="#add_agent_quick (instance method)">#<strong>add_agent_quick</strong>(agent_name) ⇒ Object </a>
|
134
134
|
|
135
135
|
|
136
136
|
|
@@ -154,7 +154,7 @@
|
|
154
154
|
<li class="public ">
|
155
155
|
<span class="summary_signature">
|
156
156
|
|
157
|
-
<a href="#
|
157
|
+
<a href="#add_agent_to_group-instance_method" title="#add_agent_to_group (instance method)">#<strong>add_agent_to_group</strong>(agent_id, group_id, options = {}) ⇒ Object </a>
|
158
158
|
|
159
159
|
|
160
160
|
|
@@ -169,7 +169,7 @@
|
|
169
169
|
|
170
170
|
|
171
171
|
<span class="summary_desc"><div class='inline'>
|
172
|
-
<p>
|
172
|
+
<p>Add agent group Adds an agent to the specified group.</p>
|
173
173
|
</div></span>
|
174
174
|
|
175
175
|
</li>
|
@@ -178,7 +178,7 @@
|
|
178
178
|
<li class="public ">
|
179
179
|
<span class="summary_signature">
|
180
180
|
|
181
|
-
<a href="#
|
181
|
+
<a href="#add_agents_to_group-instance_method" title="#add_agents_to_group (instance method)">#<strong>add_agents_to_group</strong>(ids, group_id) ⇒ Object </a>
|
182
182
|
|
183
183
|
|
184
184
|
|
@@ -193,7 +193,8 @@
|
|
193
193
|
|
194
194
|
|
195
195
|
<span class="summary_desc"><div class='inline'>
|
196
|
-
<p>
|
196
|
+
<p>Add a list of agents to a group Adds a list of agents to the specified
|
197
|
+
group.</p>
|
197
198
|
</div></span>
|
198
199
|
|
199
200
|
</li>
|
@@ -202,7 +203,7 @@
|
|
202
203
|
<li class="public ">
|
203
204
|
<span class="summary_signature">
|
204
205
|
|
205
|
-
<a href="#
|
206
|
+
<a href="#agent-instance_method" title="#agent (instance method)">#<strong>agent</strong>(agent_id, options = {}) ⇒ Sawyer::Resource </a>
|
206
207
|
|
207
208
|
|
208
209
|
|
@@ -217,7 +218,7 @@
|
|
217
218
|
|
218
219
|
|
219
220
|
<span class="summary_desc"><div class='inline'>
|
220
|
-
<p>Returns
|
221
|
+
<p>Returns various information from an agent.</p>
|
221
222
|
</div></span>
|
222
223
|
|
223
224
|
</li>
|
@@ -226,7 +227,7 @@
|
|
226
227
|
<li class="public ">
|
227
228
|
<span class="summary_signature">
|
228
229
|
|
229
|
-
<a href="#
|
230
|
+
<a href="#agent_by_name-instance_method" title="#agent_by_name (instance method)">#<strong>agent_by_name</strong>(agent_name, options = {}) ⇒ Sawyer::Resource </a>
|
230
231
|
|
231
232
|
|
232
233
|
|
@@ -241,7 +242,7 @@
|
|
241
242
|
|
242
243
|
|
243
244
|
<span class="summary_desc"><div class='inline'>
|
244
|
-
<p>Returns
|
245
|
+
<p>Returns various information from an agent called :agent_name.</p>
|
245
246
|
</div></span>
|
246
247
|
|
247
248
|
</li>
|
@@ -250,7 +251,7 @@
|
|
250
251
|
<li class="public ">
|
251
252
|
<span class="summary_signature">
|
252
253
|
|
253
|
-
<a href="#
|
254
|
+
<a href="#agent_config-instance_method" title="#agent_config (instance method)">#<strong>agent_config</strong>(agent_id, component, configuration) ⇒ Object </a>
|
254
255
|
|
255
256
|
|
256
257
|
|
@@ -265,8 +266,7 @@
|
|
265
266
|
|
266
267
|
|
267
268
|
<span class="summary_desc"><div class='inline'>
|
268
|
-
<p>
|
269
|
-
fields.</p>
|
269
|
+
<p>Get active configuration.</p>
|
270
270
|
</div></span>
|
271
271
|
|
272
272
|
</li>
|
@@ -275,7 +275,7 @@ fields.</p>
|
|
275
275
|
<li class="public ">
|
276
276
|
<span class="summary_signature">
|
277
277
|
|
278
|
-
<a href="#
|
278
|
+
<a href="#agent_key-instance_method" title="#agent_key (instance method)">#<strong>agent_key</strong>(agent_id, options = {}) ⇒ String </a>
|
279
279
|
|
280
280
|
|
281
281
|
|
@@ -290,7 +290,7 @@ fields.</p>
|
|
290
290
|
|
291
291
|
|
292
292
|
<span class="summary_desc"><div class='inline'>
|
293
|
-
<p>
|
293
|
+
<p>Get agent key Returns the key of an agent.</p>
|
294
294
|
</div></span>
|
295
295
|
|
296
296
|
</li>
|
@@ -299,7 +299,7 @@ fields.</p>
|
|
299
299
|
<li class="public ">
|
300
300
|
<span class="summary_signature">
|
301
301
|
|
302
|
-
<a href="#
|
302
|
+
<a href="#agent_os_summary-instance_method" title="#agent_os_summary (instance method)">#<strong>agent_os_summary</strong>(options = {}) ⇒ Object </a>
|
303
303
|
|
304
304
|
|
305
305
|
|
@@ -314,7 +314,7 @@ fields.</p>
|
|
314
314
|
|
315
315
|
|
316
316
|
<span class="summary_desc"><div class='inline'>
|
317
|
-
<p>Returns
|
317
|
+
<p>Get OS summary Returns a summary of the OS.</p>
|
318
318
|
</div></span>
|
319
319
|
|
320
320
|
</li>
|
@@ -323,7 +323,7 @@ fields.</p>
|
|
323
323
|
<li class="public ">
|
324
324
|
<span class="summary_signature">
|
325
325
|
|
326
|
-
<a href="#
|
326
|
+
<a href="#agent_summary-instance_method" title="#agent_summary (instance method)">#<strong>agent_summary</strong> ⇒ Object </a>
|
327
327
|
|
328
328
|
|
329
329
|
|
@@ -338,7 +338,7 @@ fields.</p>
|
|
338
338
|
|
339
339
|
|
340
340
|
<span class="summary_desc"><div class='inline'>
|
341
|
-
<p>
|
341
|
+
<p>Get agents summary Returns a summary of the available agents.</p>
|
342
342
|
</div></span>
|
343
343
|
|
344
344
|
</li>
|
@@ -347,7 +347,7 @@ fields.</p>
|
|
347
347
|
<li class="public ">
|
348
348
|
<span class="summary_signature">
|
349
349
|
|
350
|
-
<a href="#
|
350
|
+
<a href="#agent_sync_status-instance_method" title="#agent_sync_status (instance method)">#<strong>agent_sync_status</strong>(agent_id) ⇒ Object </a>
|
351
351
|
|
352
352
|
|
353
353
|
|
@@ -362,7 +362,7 @@ fields.</p>
|
|
362
362
|
|
363
363
|
|
364
364
|
<span class="summary_desc"><div class='inline'>
|
365
|
-
<p>
|
365
|
+
<p>Get sync status of agent Returns the sync status in JSON format.</p>
|
366
366
|
</div></span>
|
367
367
|
|
368
368
|
</li>
|
@@ -371,7 +371,7 @@ fields.</p>
|
|
371
371
|
<li class="public ">
|
372
372
|
<span class="summary_signature">
|
373
373
|
|
374
|
-
<a href="#
|
374
|
+
<a href="#agents_by_group-instance_method" title="#agents_by_group (instance method)">#<strong>agents_by_group</strong>(group_id, options = {}) ⇒ Object </a>
|
375
375
|
|
376
376
|
|
377
377
|
|
@@ -386,7 +386,7 @@ fields.</p>
|
|
386
386
|
|
387
387
|
|
388
388
|
<span class="summary_desc"><div class='inline'>
|
389
|
-
<p>
|
389
|
+
<p>Get agents in a group Returns the list of agents in a group.</p>
|
390
390
|
</div></span>
|
391
391
|
|
392
392
|
</li>
|
@@ -395,7 +395,7 @@ fields.</p>
|
|
395
395
|
<li class="public ">
|
396
396
|
<span class="summary_signature">
|
397
397
|
|
398
|
-
<a href="#
|
398
|
+
<a href="#agents_by_no_group-instance_method" title="#agents_by_no_group (instance method)">#<strong>agents_by_no_group</strong>(options = {}) ⇒ Object </a>
|
399
399
|
|
400
400
|
|
401
401
|
|
@@ -410,258 +410,2667 @@ fields.</p>
|
|
410
410
|
|
411
411
|
|
412
412
|
<span class="summary_desc"><div class='inline'>
|
413
|
-
<p>Returns
|
413
|
+
<p>Get agents without group Returns a list with the available agents without
|
414
|
+
group.</p>
|
414
415
|
</div></span>
|
415
416
|
|
416
417
|
</li>
|
417
418
|
|
418
419
|
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
<div id="instance_method_details" class="method_details_list">
|
425
|
-
<h2>Instance Method Details</h2>
|
420
|
+
<li class="public ">
|
421
|
+
<span class="summary_signature">
|
422
|
+
|
423
|
+
<a href="#all_agents-instance_method" title="#all_agents (instance method)">#<strong>all_agents</strong>(options = {}) ⇒ Array </a>
|
424
|
+
|
426
425
|
|
427
426
|
|
428
|
-
|
429
|
-
|
427
|
+
</span>
|
428
|
+
|
430
429
|
|
431
|
-
#<strong>add_agent</strong>(options = {}) ⇒ <tt>Object</tt>
|
432
430
|
|
433
|
-
|
434
431
|
|
435
|
-
|
436
432
|
|
437
|
-
</h3><div class="docstring">
|
438
|
-
<div class="discussion">
|
439
|
-
|
440
|
-
<p>Add a new agent</p>
|
441
|
-
|
442
|
-
|
443
|
-
</div>
|
444
|
-
</div>
|
445
|
-
<div class="tags">
|
446
|
-
<p class="tag_title">Parameters:</p>
|
447
|
-
<ul class="param">
|
448
433
|
|
449
|
-
<li>
|
450
|
-
|
451
|
-
<span class='name'>options</span>
|
452
|
-
|
453
|
-
|
454
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
455
|
-
|
456
|
-
|
457
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
458
|
-
|
459
|
-
|
460
|
-
—
|
461
|
-
<div class='inline'>
|
462
|
-
<p>a customizable set of options</p>
|
463
|
-
</div>
|
464
|
-
|
465
|
-
</li>
|
466
434
|
|
467
|
-
</ul>
|
468
435
|
|
469
436
|
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
<ul class="option">
|
474
|
-
|
475
|
-
<li>
|
476
|
-
<span class="name">:name</span>
|
477
|
-
<span class="type">(<tt>name</tt>)</span>
|
478
|
-
<span class="default">
|
479
|
-
|
480
|
-
</span>
|
481
|
-
|
482
|
-
— <div class='inline'>
|
483
|
-
<p>Name to agent</p>
|
484
|
-
</div>
|
485
|
-
|
486
|
-
</li>
|
487
|
-
|
488
|
-
<li>
|
489
|
-
<span class="name">:ip</span>
|
490
|
-
<span class="type">(<tt>ip</tt>)</span>
|
491
|
-
<span class="default">
|
492
|
-
|
493
|
-
</span>
|
494
|
-
|
495
|
-
— <div class='inline'>
|
496
|
-
<p>IP to agent If this is not included, the API will get the IP automatically.
|
497
|
-
If you are behind a proxy, you must set the option config.BehindProxyServer
|
498
|
-
to yes at config.js. Allowed values: IP, IP/NET, ANY</p>
|
499
|
-
</div>
|
500
|
-
|
501
|
-
</li>
|
502
|
-
|
503
|
-
<li>
|
504
|
-
<span class="name">:force</span>
|
505
|
-
<span class="type">(<tt>force</tt>)</span>
|
506
|
-
<span class="default">
|
507
|
-
|
508
|
-
</span>
|
509
|
-
|
510
|
-
— <div class='inline'>
|
511
|
-
<p>Remove the old agent with the same IP if disconnected since <force>
|
512
|
-
seconds.</p>
|
513
|
-
</div>
|
514
|
-
|
515
|
-
</li>
|
516
|
-
|
517
|
-
</ul>
|
437
|
+
<span class="summary_desc"><div class='inline'>
|
438
|
+
<p>Returns a list with the available agents.</p>
|
439
|
+
</div></span>
|
518
440
|
|
441
|
+
</li>
|
519
442
|
|
520
|
-
|
521
|
-
|
522
|
-
<
|
443
|
+
|
444
|
+
<li class="public ">
|
445
|
+
<span class="summary_signature">
|
523
446
|
|
524
|
-
<
|
447
|
+
<a href="#create_group-instance_method" title="#create_group (instance method)">#<strong>create_group</strong>(group_id) ⇒ Object </a>
|
525
448
|
|
526
|
-
</ul>
|
527
|
-
|
528
|
-
</div><table class="source_code">
|
529
|
-
<tr>
|
530
|
-
<td>
|
531
|
-
<pre class="lines">
|
532
|
-
|
533
|
-
|
534
|
-
143
|
535
|
-
144
|
536
|
-
145</pre>
|
537
|
-
</td>
|
538
|
-
<td>
|
539
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 143</span>
|
540
449
|
|
541
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_add_agent'>add_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
542
|
-
<span class='id identifier rubyid_post'>post</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
543
|
-
<span class='kw'>end</span></pre>
|
544
|
-
</td>
|
545
|
-
</tr>
|
546
|
-
</table>
|
547
|
-
</div>
|
548
450
|
|
549
|
-
|
550
|
-
|
451
|
+
</span>
|
452
|
+
|
551
453
|
|
552
|
-
#<strong>add_agent_quick</strong>(options = {}) ⇒ <tt>Object</tt>
|
553
454
|
|
554
|
-
|
555
455
|
|
556
|
-
|
557
456
|
|
558
|
-
</h3><div class="docstring">
|
559
|
-
<div class="discussion">
|
560
|
-
|
561
|
-
<p>Adds a new agent with name :agent_name. This agent will use ANY as IP.</p>
|
562
|
-
|
563
|
-
|
564
|
-
</div>
|
565
|
-
</div>
|
566
|
-
<div class="tags">
|
567
|
-
<p class="tag_title">Parameters:</p>
|
568
|
-
<ul class="param">
|
569
457
|
|
570
|
-
<li>
|
571
|
-
|
572
|
-
<span class='name'>options</span>
|
573
|
-
|
574
|
-
|
575
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
576
|
-
|
577
|
-
|
578
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
579
|
-
|
580
|
-
|
581
|
-
—
|
582
|
-
<div class='inline'>
|
583
|
-
<p>a customizable set of options</p>
|
584
|
-
</div>
|
585
|
-
|
586
|
-
</li>
|
587
458
|
|
588
|
-
</ul>
|
589
459
|
|
590
460
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
<ul class="option">
|
595
|
-
|
596
|
-
<li>
|
597
|
-
<span class="name">:name</span>
|
598
|
-
<span class="type">(<tt>name</tt>)</span>
|
599
|
-
<span class="default">
|
600
|
-
|
601
|
-
</span>
|
602
|
-
|
603
|
-
— <div class='inline'>
|
604
|
-
<p>Name to agent</p>
|
605
|
-
</div>
|
606
|
-
|
607
|
-
</li>
|
608
|
-
|
609
|
-
</ul>
|
461
|
+
<span class="summary_desc"><div class='inline'>
|
462
|
+
<p>Create a group Creates a new group.</p>
|
463
|
+
</div></span>
|
610
464
|
|
465
|
+
</li>
|
611
466
|
|
612
|
-
|
613
|
-
|
614
|
-
<
|
467
|
+
|
468
|
+
<li class="public ">
|
469
|
+
<span class="summary_signature">
|
615
470
|
|
616
|
-
<
|
471
|
+
<a href="#delete_agent-instance_method" title="#delete_agent (instance method)">#<strong>delete_agent</strong>(agent_id, options = {}) ⇒ Object </a>
|
617
472
|
|
618
|
-
</ul>
|
619
473
|
|
620
|
-
</div><table class="source_code">
|
621
|
-
<tr>
|
622
|
-
<td>
|
623
|
-
<pre class="lines">
|
624
|
-
|
625
|
-
|
626
|
-
152
|
627
|
-
153
|
628
|
-
154</pre>
|
629
|
-
</td>
|
630
|
-
<td>
|
631
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 152</span>
|
632
|
-
|
633
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_add_agent_quick'>add_agent_quick</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
634
|
-
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
635
|
-
<span class='kw'>end</span></pre>
|
636
|
-
</td>
|
637
|
-
</tr>
|
638
|
-
</table>
|
639
|
-
</div>
|
640
474
|
|
641
|
-
|
642
|
-
|
475
|
+
</span>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
643
480
|
|
644
|
-
#<strong>agent</strong>(agent_id, options = {}) ⇒ <tt>Object</tt>
|
645
481
|
|
646
|
-
|
647
482
|
|
648
483
|
|
649
484
|
|
650
|
-
|
651
|
-
|
485
|
+
<span class="summary_desc"><div class='inline'>
|
486
|
+
<p>Delete an agent Removes an agent.</p>
|
487
|
+
</div></span>
|
488
|
+
|
489
|
+
</li>
|
490
|
+
|
491
|
+
|
492
|
+
<li class="public ">
|
493
|
+
<span class="summary_signature">
|
494
|
+
|
495
|
+
<a href="#delete_agent_by_group-instance_method" title="#delete_agent_by_group (instance method)">#<strong>delete_agent_by_group</strong>(ids) ⇒ Object </a>
|
652
496
|
|
653
|
-
<p>Returns various information from an agent.</p>
|
654
497
|
|
498
|
+
|
499
|
+
</span>
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
655
507
|
|
656
|
-
|
657
|
-
|
658
|
-
<
|
659
|
-
|
660
|
-
|
508
|
+
|
509
|
+
<span class="summary_desc"><div class='inline'>
|
510
|
+
<p>Delete a list of groups.</p>
|
511
|
+
</div></span>
|
512
|
+
|
513
|
+
</li>
|
514
|
+
|
515
|
+
|
516
|
+
<li class="public ">
|
517
|
+
<span class="summary_signature">
|
518
|
+
|
519
|
+
<a href="#delete_agents-instance_method" title="#delete_agents (instance method)">#<strong>delete_agents</strong>(options = {}) ⇒ Object </a>
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
</span>
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
<span class="summary_desc"><div class='inline'>
|
534
|
+
<p>Delete agents Removes agents, using a list of them or a criterion based on
|
535
|
+
the status or time of the last connection.</p>
|
536
|
+
</div></span>
|
537
|
+
|
538
|
+
</li>
|
539
|
+
|
540
|
+
|
541
|
+
<li class="public ">
|
542
|
+
<span class="summary_signature">
|
543
|
+
|
544
|
+
<a href="#distinct_fields_in_agents-instance_method" title="#distinct_fields_in_agents (instance method)">#<strong>distinct_fields_in_agents</strong>(options = {}) ⇒ Object </a>
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
</span>
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
<span class="summary_desc"><div class='inline'>
|
559
|
+
<p>Returns all the different combinations that agents have for the selected
|
560
|
+
fields.</p>
|
561
|
+
</div></span>
|
562
|
+
|
563
|
+
</li>
|
564
|
+
|
565
|
+
|
566
|
+
<li class="public ">
|
567
|
+
<span class="summary_signature">
|
568
|
+
|
569
|
+
<a href="#get_file_in_group-instance_method" title="#get_file_in_group (instance method)">#<strong>get_file_in_group</strong>(group_id, filename, options = {}) ⇒ Object </a>
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
</span>
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
<span class="summary_desc"><div class='inline'>
|
584
|
+
<p>Get a file in group Returns the specified file belonging to the group
|
585
|
+
parsed to JSON.</p>
|
586
|
+
</div></span>
|
587
|
+
|
588
|
+
</li>
|
589
|
+
|
590
|
+
|
591
|
+
<li class="public ">
|
592
|
+
<span class="summary_signature">
|
593
|
+
|
594
|
+
<a href="#group_configuration-instance_method" title="#group_configuration (instance method)">#<strong>group_configuration</strong>(group_id, options = {}) ⇒ Object </a>
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
</span>
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
<span class="summary_desc"><div class='inline'>
|
609
|
+
<p>Get group configuration.</p>
|
610
|
+
</div></span>
|
611
|
+
|
612
|
+
</li>
|
613
|
+
|
614
|
+
|
615
|
+
<li class="public ">
|
616
|
+
<span class="summary_signature">
|
617
|
+
|
618
|
+
<a href="#group_files-instance_method" title="#group_files (instance method)">#<strong>group_files</strong>(group_id, options = {}) ⇒ Object </a>
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
</span>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
<span class="summary_desc"><div class='inline'>
|
633
|
+
<p>Get group files Returns the files belonging to the group.</p>
|
634
|
+
</div></span>
|
635
|
+
|
636
|
+
</li>
|
637
|
+
|
638
|
+
|
639
|
+
<li class="public ">
|
640
|
+
<span class="summary_signature">
|
641
|
+
|
642
|
+
<a href="#groups-instance_method" title="#groups (instance method)">#<strong>groups</strong>(options = {}) ⇒ Object </a>
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
</span>
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
<span class="summary_desc"><div class='inline'>
|
657
|
+
<p>Get groups Returns the list of existing agent groups.</p>
|
658
|
+
</div></span>
|
659
|
+
|
660
|
+
</li>
|
661
|
+
|
662
|
+
|
663
|
+
<li class="public ">
|
664
|
+
<span class="summary_signature">
|
665
|
+
|
666
|
+
<a href="#insert_agent-instance_method" title="#insert_agent (instance method)">#<strong>insert_agent</strong>(options = {}) ⇒ Object </a>
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
</span>
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
<span class="summary_desc"><div class='inline'>
|
681
|
+
<p>Insert an agent with an existing id and key.</p>
|
682
|
+
</div></span>
|
683
|
+
|
684
|
+
</li>
|
685
|
+
|
686
|
+
|
687
|
+
<li class="public ">
|
688
|
+
<span class="summary_signature">
|
689
|
+
|
690
|
+
<a href="#outdated_agents-instance_method" title="#outdated_agents (instance method)">#<strong>outdated_agents</strong>(options = {}) ⇒ Object </a>
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
</span>
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
<span class="summary_desc"><div class='inline'>
|
705
|
+
<p>Returns the list of outdated agents.</p>
|
706
|
+
</div></span>
|
707
|
+
|
708
|
+
</li>
|
709
|
+
|
710
|
+
|
711
|
+
<li class="public ">
|
712
|
+
<span class="summary_signature">
|
713
|
+
|
714
|
+
<a href="#remove_agent_of_group-instance_method" title="#remove_agent_of_group (instance method)">#<strong>remove_agent_of_group</strong>(agent_id, group_id) ⇒ Object </a>
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
</span>
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
<span class="summary_desc"><div class='inline'>
|
729
|
+
<p>Remove a single group of an agent Remove the group of the agent but will
|
730
|
+
leave the rest of its group if it belongs to a multigroup.</p>
|
731
|
+
</div></span>
|
732
|
+
|
733
|
+
</li>
|
734
|
+
|
735
|
+
|
736
|
+
<li class="public ">
|
737
|
+
<span class="summary_signature">
|
738
|
+
|
739
|
+
<a href="#remove_agents_of_group-instance_method" title="#remove_agents_of_group (instance method)">#<strong>remove_agents_of_group</strong>(ids, groups) ⇒ Object </a>
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
</span>
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
<span class="summary_desc"><div class='inline'>
|
754
|
+
<p>Remove a single group of multiple agents Remove a list of agents of a
|
755
|
+
group.</p>
|
756
|
+
</div></span>
|
757
|
+
|
758
|
+
</li>
|
759
|
+
|
760
|
+
|
761
|
+
<li class="public ">
|
762
|
+
<span class="summary_signature">
|
763
|
+
|
764
|
+
<a href="#remove_all_agent_of_group-instance_method" title="#remove_all_agent_of_group (instance method)">#<strong>remove_all_agent_of_group</strong>(agent_id) ⇒ Object </a>
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
</span>
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
<span class="summary_desc"><div class='inline'>
|
779
|
+
<p>Remove all agent groups.</p>
|
780
|
+
</div></span>
|
781
|
+
|
782
|
+
</li>
|
783
|
+
|
784
|
+
|
785
|
+
<li class="public ">
|
786
|
+
<span class="summary_signature">
|
787
|
+
|
788
|
+
<a href="#remove_group-instance_method" title="#remove_group (instance method)">#<strong>remove_group</strong>(group_id) ⇒ Object </a>
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
</span>
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
<span class="summary_desc"><div class='inline'>
|
803
|
+
<p>Remove group Removes the group.</p>
|
804
|
+
</div></span>
|
805
|
+
|
806
|
+
</li>
|
807
|
+
|
808
|
+
|
809
|
+
<li class="public ">
|
810
|
+
<span class="summary_signature">
|
811
|
+
|
812
|
+
<a href="#restart_agents-instance_method" title="#restart_agents (instance method)">#<strong>restart_agents</strong>(options = {}) ⇒ Object </a>
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
</span>
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
<span class="summary_desc"><div class='inline'>
|
827
|
+
<p>Restarts a list of agents.</p>
|
828
|
+
</div></span>
|
829
|
+
|
830
|
+
</li>
|
831
|
+
|
832
|
+
|
833
|
+
<li class="public ">
|
834
|
+
<span class="summary_signature">
|
835
|
+
|
836
|
+
<a href="#restart_all_agents-instance_method" title="#restart_all_agents (instance method)">#<strong>restart_all_agents</strong> ⇒ Object </a>
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
</span>
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
|
848
|
+
|
849
|
+
|
850
|
+
<span class="summary_desc"><div class='inline'>
|
851
|
+
<p>Restarts all agents.</p>
|
852
|
+
</div></span>
|
853
|
+
|
854
|
+
</li>
|
855
|
+
|
856
|
+
|
857
|
+
<li class="public ">
|
858
|
+
<span class="summary_signature">
|
859
|
+
|
860
|
+
<a href="#restart_an_agents-instance_method" title="#restart_an_agents (instance method)">#<strong>restart_an_agents</strong>(agent_id, options = {}) ⇒ Object </a>
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
</span>
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
|
874
|
+
<span class="summary_desc"><div class='inline'>
|
875
|
+
<p>Restart an agent.</p>
|
876
|
+
</div></span>
|
877
|
+
|
878
|
+
</li>
|
879
|
+
|
880
|
+
|
881
|
+
<li class="public ">
|
882
|
+
<span class="summary_signature">
|
883
|
+
|
884
|
+
<a href="#update_group_ossec_configuration-instance_method" title="#update_group_ossec_configuration (instance method)">#<strong>update_group_ossec_configuration</strong>(group_id, config) ⇒ Object </a>
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
</span>
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
<span class="summary_desc"><div class='inline'>
|
899
|
+
<p>Put configuration file (agent.conf) into a group Upload the group
|
900
|
+
configuration (agent.conf).</p>
|
901
|
+
</div></span>
|
902
|
+
|
903
|
+
</li>
|
904
|
+
|
905
|
+
|
906
|
+
<li class="public ">
|
907
|
+
<span class="summary_signature">
|
908
|
+
|
909
|
+
<a href="#upgrade_result_from_agent-instance_method" title="#upgrade_result_from_agent (instance method)">#<strong>upgrade_result_from_agent</strong>(agent_id, options = {}) ⇒ Object </a>
|
910
|
+
|
911
|
+
|
912
|
+
|
913
|
+
</span>
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
<span class="summary_desc"><div class='inline'>
|
924
|
+
<p>Returns the upgrade result from an agent.</p>
|
925
|
+
</div></span>
|
926
|
+
|
927
|
+
</li>
|
928
|
+
|
929
|
+
|
930
|
+
</ul>
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
<div id="instance_method_details" class="method_details_list">
|
936
|
+
<h2>Instance Method Details</h2>
|
937
|
+
|
938
|
+
|
939
|
+
<div class="method_details first">
|
940
|
+
<h3 class="signature first" id="add_agent-instance_method">
|
941
|
+
|
942
|
+
#<strong>add_agent</strong>(options = {}) ⇒ <tt>Object</tt>
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
</h3><div class="docstring">
|
949
|
+
<div class="discussion">
|
950
|
+
|
951
|
+
<p>Add a new agent</p>
|
952
|
+
|
953
|
+
|
954
|
+
</div>
|
955
|
+
</div>
|
956
|
+
<div class="tags">
|
957
|
+
<p class="tag_title">Parameters:</p>
|
958
|
+
<ul class="param">
|
959
|
+
|
960
|
+
<li>
|
961
|
+
|
962
|
+
<span class='name'>options</span>
|
963
|
+
|
964
|
+
|
965
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
966
|
+
|
967
|
+
|
968
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
969
|
+
|
970
|
+
|
971
|
+
—
|
972
|
+
<div class='inline'>
|
973
|
+
<p>a customizable set of options</p>
|
974
|
+
</div>
|
975
|
+
|
976
|
+
</li>
|
977
|
+
|
978
|
+
</ul>
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
984
|
+
<ul class="option">
|
985
|
+
|
986
|
+
<li>
|
987
|
+
<span class="name">:name</span>
|
988
|
+
<span class="type">(<tt>name</tt>)</span>
|
989
|
+
<span class="default">
|
990
|
+
|
991
|
+
</span>
|
992
|
+
|
993
|
+
— <div class='inline'>
|
994
|
+
<p>Name to agent</p>
|
995
|
+
</div>
|
996
|
+
|
997
|
+
</li>
|
998
|
+
|
999
|
+
<li>
|
1000
|
+
<span class="name">:ip</span>
|
1001
|
+
<span class="type">(<tt>ip</tt>)</span>
|
1002
|
+
<span class="default">
|
1003
|
+
|
1004
|
+
</span>
|
1005
|
+
|
1006
|
+
— <div class='inline'>
|
1007
|
+
<p>IP to agent If this is not included, the API will get the IP automatically.
|
1008
|
+
If you are behind a proxy, you must set the option config.BehindProxyServer
|
1009
|
+
to yes at config.js. Allowed values: IP, IP/NET, ANY</p>
|
1010
|
+
</div>
|
1011
|
+
|
1012
|
+
</li>
|
1013
|
+
|
1014
|
+
<li>
|
1015
|
+
<span class="name">:force</span>
|
1016
|
+
<span class="type">(<tt>force</tt>)</span>
|
1017
|
+
<span class="default">
|
1018
|
+
|
1019
|
+
</span>
|
1020
|
+
|
1021
|
+
— <div class='inline'>
|
1022
|
+
<p>Remove the old agent with the same IP if disconnected since <force>
|
1023
|
+
seconds.</p>
|
1024
|
+
</div>
|
1025
|
+
|
1026
|
+
</li>
|
1027
|
+
|
1028
|
+
</ul>
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
<p class="tag_title">See Also:</p>
|
1033
|
+
<ul class="see">
|
1034
|
+
|
1035
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent</a></li>
|
1036
|
+
|
1037
|
+
</ul>
|
1038
|
+
|
1039
|
+
</div><table class="source_code">
|
1040
|
+
<tr>
|
1041
|
+
<td>
|
1042
|
+
<pre class="lines">
|
1043
|
+
|
1044
|
+
|
1045
|
+
147
|
1046
|
+
148
|
1047
|
+
149</pre>
|
1048
|
+
</td>
|
1049
|
+
<td>
|
1050
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 147</span>
|
1051
|
+
|
1052
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_agent'>add_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1053
|
+
<span class='id identifier rubyid_post'>post</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
1054
|
+
<span class='kw'>end</span></pre>
|
1055
|
+
</td>
|
1056
|
+
</tr>
|
1057
|
+
</table>
|
1058
|
+
</div>
|
1059
|
+
|
1060
|
+
<div class="method_details ">
|
1061
|
+
<h3 class="signature " id="add_agent_quick-instance_method">
|
1062
|
+
|
1063
|
+
#<strong>add_agent_quick</strong>(agent_name) ⇒ <tt>Object</tt>
|
1064
|
+
|
1065
|
+
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
</h3><div class="docstring">
|
1070
|
+
<div class="discussion">
|
1071
|
+
|
1072
|
+
<p>Adds a new agent with name :agent_name. This agent will use ANY as IP.</p>
|
1073
|
+
|
1074
|
+
|
1075
|
+
</div>
|
1076
|
+
</div>
|
1077
|
+
<div class="tags">
|
1078
|
+
<p class="tag_title">Parameters:</p>
|
1079
|
+
<ul class="param">
|
1080
|
+
|
1081
|
+
<li>
|
1082
|
+
|
1083
|
+
<span class='name'>agent_name</span>
|
1084
|
+
|
1085
|
+
|
1086
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
—
|
1091
|
+
<div class='inline'>
|
1092
|
+
<p>Name to agent</p>
|
1093
|
+
</div>
|
1094
|
+
|
1095
|
+
</li>
|
1096
|
+
|
1097
|
+
</ul>
|
1098
|
+
|
1099
|
+
|
1100
|
+
<p class="tag_title">See Also:</p>
|
1101
|
+
<ul class="see">
|
1102
|
+
|
1103
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent-quick-method" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent-quick-method">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#add-agent-quick-method</a></li>
|
1104
|
+
|
1105
|
+
</ul>
|
1106
|
+
|
1107
|
+
</div><table class="source_code">
|
1108
|
+
<tr>
|
1109
|
+
<td>
|
1110
|
+
<pre class="lines">
|
1111
|
+
|
1112
|
+
|
1113
|
+
181
|
1114
|
+
182
|
1115
|
+
183</pre>
|
1116
|
+
</td>
|
1117
|
+
<td>
|
1118
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 181</span>
|
1119
|
+
|
1120
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_agent_quick'>add_agent_quick</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_name'>agent_name</span><span class='rparen'>)</span>
|
1121
|
+
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_name'>agent_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1122
|
+
<span class='kw'>end</span></pre>
|
1123
|
+
</td>
|
1124
|
+
</tr>
|
1125
|
+
</table>
|
1126
|
+
</div>
|
1127
|
+
|
1128
|
+
<div class="method_details ">
|
1129
|
+
<h3 class="signature " id="add_agent_to_group-instance_method">
|
1130
|
+
|
1131
|
+
#<strong>add_agent_to_group</strong>(agent_id, group_id, options = {}) ⇒ <tt>Object</tt>
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
</h3><div class="docstring">
|
1138
|
+
<div class="discussion">
|
1139
|
+
|
1140
|
+
<p>Add agent group Adds an agent to the specified group.</p>
|
1141
|
+
|
1142
|
+
|
1143
|
+
</div>
|
1144
|
+
</div>
|
1145
|
+
<div class="tags">
|
1146
|
+
<p class="tag_title">Parameters:</p>
|
1147
|
+
<ul class="param">
|
1148
|
+
|
1149
|
+
<li>
|
1150
|
+
|
1151
|
+
<span class='name'>agent_id</span>
|
1152
|
+
|
1153
|
+
|
1154
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1155
|
+
|
1156
|
+
|
1157
|
+
|
1158
|
+
—
|
1159
|
+
<div class='inline'>
|
1160
|
+
<p>Agent unique ID</p>
|
1161
|
+
</div>
|
1162
|
+
|
1163
|
+
</li>
|
1164
|
+
|
1165
|
+
<li>
|
1166
|
+
|
1167
|
+
<span class='name'>group_id</span>
|
1168
|
+
|
1169
|
+
|
1170
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1171
|
+
|
1172
|
+
|
1173
|
+
|
1174
|
+
—
|
1175
|
+
<div class='inline'>
|
1176
|
+
<p>Group ID</p>
|
1177
|
+
</div>
|
1178
|
+
|
1179
|
+
</li>
|
1180
|
+
|
1181
|
+
<li>
|
1182
|
+
|
1183
|
+
<span class='name'>options</span>
|
1184
|
+
|
1185
|
+
|
1186
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1187
|
+
|
1188
|
+
|
1189
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1190
|
+
|
1191
|
+
|
1192
|
+
—
|
1193
|
+
<div class='inline'>
|
1194
|
+
<p>a customizable set of options</p>
|
1195
|
+
</div>
|
1196
|
+
|
1197
|
+
</li>
|
1198
|
+
|
1199
|
+
</ul>
|
1200
|
+
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
|
1208
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
1209
|
+
<ul class="option">
|
1210
|
+
|
1211
|
+
<li>
|
1212
|
+
<span class="name">force_single_group</span>
|
1213
|
+
<span class="type">(<tt>Bool</tt>)</span>
|
1214
|
+
<span class="default">
|
1215
|
+
|
1216
|
+
</span>
|
1217
|
+
|
1218
|
+
— <div class='inline'>
|
1219
|
+
<p>Whether to append new group to current agent’s group or replace it.</p>
|
1220
|
+
</div>
|
1221
|
+
|
1222
|
+
</li>
|
1223
|
+
|
1224
|
+
</ul>
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
<p class="tag_title">See Also:</p>
|
1229
|
+
<ul class="see">
|
1230
|
+
|
1231
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group</a></li>
|
1232
|
+
|
1233
|
+
</ul>
|
1234
|
+
|
1235
|
+
</div><table class="source_code">
|
1236
|
+
<tr>
|
1237
|
+
<td>
|
1238
|
+
<pre class="lines">
|
1239
|
+
|
1240
|
+
|
1241
|
+
251
|
1242
|
+
252
|
1243
|
+
253</pre>
|
1244
|
+
</td>
|
1245
|
+
<td>
|
1246
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 251</span>
|
1247
|
+
|
1248
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_agent_to_group'>add_agent_to_group</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1249
|
+
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/group/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
1250
|
+
<span class='kw'>end</span></pre>
|
1251
|
+
</td>
|
1252
|
+
</tr>
|
1253
|
+
</table>
|
1254
|
+
</div>
|
1255
|
+
|
1256
|
+
<div class="method_details ">
|
1257
|
+
<h3 class="signature " id="add_agents_to_group-instance_method">
|
1258
|
+
|
1259
|
+
#<strong>add_agents_to_group</strong>(ids, group_id) ⇒ <tt>Object</tt>
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
</h3><div class="docstring">
|
1266
|
+
<div class="discussion">
|
1267
|
+
|
1268
|
+
<p>Add a list of agents to a group Adds a list of agents to the specified
|
1269
|
+
group</p>
|
1270
|
+
|
1271
|
+
|
1272
|
+
</div>
|
1273
|
+
</div>
|
1274
|
+
<div class="tags">
|
1275
|
+
<p class="tag_title">Parameters:</p>
|
1276
|
+
<ul class="param">
|
1277
|
+
|
1278
|
+
<li>
|
1279
|
+
|
1280
|
+
<span class='name'>ids</span>
|
1281
|
+
|
1282
|
+
|
1283
|
+
<span class='type'>(<tt>Array[String]</tt>)</span>
|
1284
|
+
|
1285
|
+
|
1286
|
+
|
1287
|
+
—
|
1288
|
+
<div class='inline'>
|
1289
|
+
<p>List of agent ID</p>
|
1290
|
+
</div>
|
1291
|
+
|
1292
|
+
</li>
|
1293
|
+
|
1294
|
+
<li>
|
1295
|
+
|
1296
|
+
<span class='name'>group_id</span>
|
1297
|
+
|
1298
|
+
|
1299
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1300
|
+
|
1301
|
+
|
1302
|
+
|
1303
|
+
</li>
|
1304
|
+
|
1305
|
+
</ul>
|
1306
|
+
|
1307
|
+
|
1308
|
+
<p class="tag_title">See Also:</p>
|
1309
|
+
<ul class="see">
|
1310
|
+
|
1311
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-a-list-of-agents-to-a-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-a-list-of-agents-to-a-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-a-list-of-agents-to-a-group</a></li>
|
1312
|
+
|
1313
|
+
</ul>
|
1314
|
+
|
1315
|
+
</div><table class="source_code">
|
1316
|
+
<tr>
|
1317
|
+
<td>
|
1318
|
+
<pre class="lines">
|
1319
|
+
|
1320
|
+
|
1321
|
+
237
|
1322
|
+
238
|
1323
|
+
239</pre>
|
1324
|
+
</td>
|
1325
|
+
<td>
|
1326
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 237</span>
|
1327
|
+
|
1328
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_agents_to_group'>add_agents_to_group</span><span class='lparen'>(</span><span class='id identifier rubyid_ids'>ids</span><span class='comma'>,</span> <span class='id identifier rubyid_group_id'>group_id</span><span class='rparen'>)</span>
|
1329
|
+
<span class='id identifier rubyid_post'>post</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/group/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>ids:</span> <span class='id identifier rubyid_ids'>ids</span><span class='rbrace'>}</span>
|
1330
|
+
<span class='kw'>end</span></pre>
|
1331
|
+
</td>
|
1332
|
+
</tr>
|
1333
|
+
</table>
|
1334
|
+
</div>
|
1335
|
+
|
1336
|
+
<div class="method_details ">
|
1337
|
+
<h3 class="signature " id="agent-instance_method">
|
1338
|
+
|
1339
|
+
#<strong>agent</strong>(agent_id, options = {}) ⇒ <tt>Sawyer::Resource</tt>
|
1340
|
+
|
1341
|
+
|
1342
|
+
|
1343
|
+
|
1344
|
+
|
1345
|
+
</h3><div class="docstring">
|
1346
|
+
<div class="discussion">
|
1347
|
+
|
1348
|
+
<p>Returns various information from an agent.</p>
|
1349
|
+
|
1350
|
+
|
1351
|
+
</div>
|
1352
|
+
</div>
|
1353
|
+
<div class="tags">
|
1354
|
+
<p class="tag_title">Parameters:</p>
|
1355
|
+
<ul class="param">
|
1356
|
+
|
1357
|
+
<li>
|
1358
|
+
|
1359
|
+
<span class='name'>agent_id</span>
|
1360
|
+
|
1361
|
+
|
1362
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1363
|
+
|
1364
|
+
|
1365
|
+
|
1366
|
+
—
|
1367
|
+
<div class='inline'>
|
1368
|
+
<p>ID to agent</p>
|
1369
|
+
</div>
|
1370
|
+
|
1371
|
+
</li>
|
1372
|
+
|
1373
|
+
<li>
|
1374
|
+
|
1375
|
+
<span class='name'>options</span>
|
1376
|
+
|
1377
|
+
|
1378
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1379
|
+
|
1380
|
+
|
1381
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1382
|
+
|
1383
|
+
|
1384
|
+
—
|
1385
|
+
<div class='inline'>
|
1386
|
+
<p>a customizable set of options</p>
|
1387
|
+
</div>
|
1388
|
+
|
1389
|
+
</li>
|
1390
|
+
|
1391
|
+
</ul>
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
|
1397
|
+
|
1398
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
1399
|
+
<ul class="option">
|
1400
|
+
|
1401
|
+
<li>
|
1402
|
+
<span class="name">:select</span>
|
1403
|
+
<span class="type">(<tt>select</tt>)</span>
|
1404
|
+
<span class="default">
|
1405
|
+
|
1406
|
+
</span>
|
1407
|
+
|
1408
|
+
— <div class='inline'>
|
1409
|
+
<p>List of selected fields separated by commas.</p>
|
1410
|
+
</div>
|
1411
|
+
|
1412
|
+
</li>
|
1413
|
+
|
1414
|
+
</ul>
|
1415
|
+
|
1416
|
+
|
1417
|
+
<p class="tag_title">Returns:</p>
|
1418
|
+
<ul class="return">
|
1419
|
+
|
1420
|
+
<li>
|
1421
|
+
|
1422
|
+
|
1423
|
+
<span class='type'>(<tt>Sawyer::Resource</tt>)</span>
|
1424
|
+
|
1425
|
+
|
1426
|
+
|
1427
|
+
—
|
1428
|
+
<div class='inline'>
|
1429
|
+
<p>Returns Sawyer::Resource</p>
|
1430
|
+
</div>
|
1431
|
+
|
1432
|
+
</li>
|
1433
|
+
|
1434
|
+
</ul>
|
1435
|
+
|
1436
|
+
<p class="tag_title">See Also:</p>
|
1437
|
+
<ul class="see">
|
1438
|
+
|
1439
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent</a></li>
|
1440
|
+
|
1441
|
+
</ul>
|
1442
|
+
|
1443
|
+
</div><table class="source_code">
|
1444
|
+
<tr>
|
1445
|
+
<td>
|
1446
|
+
<pre class="lines">
|
1447
|
+
|
1448
|
+
|
1449
|
+
38
|
1450
|
+
39
|
1451
|
+
40</pre>
|
1452
|
+
</td>
|
1453
|
+
<td>
|
1454
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 38</span>
|
1455
|
+
|
1456
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent'>agent</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1457
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
1458
|
+
<span class='kw'>end</span></pre>
|
1459
|
+
</td>
|
1460
|
+
</tr>
|
1461
|
+
</table>
|
1462
|
+
</div>
|
1463
|
+
|
1464
|
+
<div class="method_details ">
|
1465
|
+
<h3 class="signature " id="agent_by_name-instance_method">
|
1466
|
+
|
1467
|
+
#<strong>agent_by_name</strong>(agent_name, options = {}) ⇒ <tt>Sawyer::Resource</tt>
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
</h3><div class="docstring">
|
1474
|
+
<div class="discussion">
|
1475
|
+
|
1476
|
+
<p>Returns various information from an agent called :agent_name.</p>
|
1477
|
+
|
1478
|
+
|
1479
|
+
</div>
|
1480
|
+
</div>
|
1481
|
+
<div class="tags">
|
1482
|
+
<p class="tag_title">Parameters:</p>
|
1483
|
+
<ul class="param">
|
1484
|
+
|
1485
|
+
<li>
|
1486
|
+
|
1487
|
+
<span class='name'>agent_name</span>
|
1488
|
+
|
1489
|
+
|
1490
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
—
|
1495
|
+
<div class='inline'>
|
1496
|
+
<p>Name to agent</p>
|
1497
|
+
</div>
|
1498
|
+
|
1499
|
+
</li>
|
1500
|
+
|
1501
|
+
<li>
|
1502
|
+
|
1503
|
+
<span class='name'>options</span>
|
1504
|
+
|
1505
|
+
|
1506
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1507
|
+
|
1508
|
+
|
1509
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1510
|
+
|
1511
|
+
|
1512
|
+
—
|
1513
|
+
<div class='inline'>
|
1514
|
+
<p>a customizable set of options</p>
|
1515
|
+
</div>
|
1516
|
+
|
1517
|
+
</li>
|
1518
|
+
|
1519
|
+
</ul>
|
1520
|
+
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
|
1525
|
+
|
1526
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
1527
|
+
<ul class="option">
|
1528
|
+
|
1529
|
+
<li>
|
1530
|
+
<span class="name">:select</span>
|
1531
|
+
<span class="type">(<tt>select</tt>)</span>
|
1532
|
+
<span class="default">
|
1533
|
+
|
1534
|
+
</span>
|
1535
|
+
|
1536
|
+
— <div class='inline'>
|
1537
|
+
<p>List of selected fields separated by commas.</p>
|
1538
|
+
</div>
|
1539
|
+
|
1540
|
+
</li>
|
1541
|
+
|
1542
|
+
</ul>
|
1543
|
+
|
1544
|
+
|
1545
|
+
<p class="tag_title">Returns:</p>
|
1546
|
+
<ul class="return">
|
1547
|
+
|
1548
|
+
<li>
|
1549
|
+
|
1550
|
+
|
1551
|
+
<span class='type'>(<tt>Sawyer::Resource</tt>)</span>
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
—
|
1556
|
+
<div class='inline'>
|
1557
|
+
<p>Returns Sawyer::Resource</p>
|
1558
|
+
</div>
|
1559
|
+
|
1560
|
+
</li>
|
1561
|
+
|
1562
|
+
</ul>
|
1563
|
+
|
1564
|
+
<p class="tag_title">See Also:</p>
|
1565
|
+
<ul class="see">
|
1566
|
+
|
1567
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent-by-its-name" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent-by-its-name">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-an-agent-by-its-name</a></li>
|
1568
|
+
|
1569
|
+
</ul>
|
1570
|
+
|
1571
|
+
</div><table class="source_code">
|
1572
|
+
<tr>
|
1573
|
+
<td>
|
1574
|
+
<pre class="lines">
|
1575
|
+
|
1576
|
+
|
1577
|
+
50
|
1578
|
+
51
|
1579
|
+
52</pre>
|
1580
|
+
</td>
|
1581
|
+
<td>
|
1582
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 50</span>
|
1583
|
+
|
1584
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_by_name'>agent_by_name</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_name'>agent_name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1585
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/name/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_name'>agent_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
1586
|
+
<span class='kw'>end</span></pre>
|
1587
|
+
</td>
|
1588
|
+
</tr>
|
1589
|
+
</table>
|
1590
|
+
</div>
|
1591
|
+
|
1592
|
+
<div class="method_details ">
|
1593
|
+
<h3 class="signature " id="agent_config-instance_method">
|
1594
|
+
|
1595
|
+
#<strong>agent_config</strong>(agent_id, component, configuration) ⇒ <tt>Object</tt>
|
1596
|
+
|
1597
|
+
|
1598
|
+
|
1599
|
+
|
1600
|
+
|
1601
|
+
</h3><div class="docstring">
|
1602
|
+
<div class="discussion">
|
1603
|
+
|
1604
|
+
<p>Get active configuration</p>
|
1605
|
+
|
1606
|
+
|
1607
|
+
</div>
|
1608
|
+
</div>
|
1609
|
+
<div class="tags">
|
1610
|
+
<p class="tag_title">Parameters:</p>
|
1611
|
+
<ul class="param">
|
1612
|
+
|
1613
|
+
<li>
|
1614
|
+
|
1615
|
+
<span class='name'>agent_id</span>
|
1616
|
+
|
1617
|
+
|
1618
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
</li>
|
1623
|
+
|
1624
|
+
<li>
|
1625
|
+
|
1626
|
+
<span class='name'>component</span>
|
1627
|
+
|
1628
|
+
|
1629
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1630
|
+
|
1631
|
+
|
1632
|
+
|
1633
|
+
—
|
1634
|
+
<div class='inline'>
|
1635
|
+
<p>Selected component. Alowed values see document</p>
|
1636
|
+
</div>
|
1637
|
+
|
1638
|
+
</li>
|
1639
|
+
|
1640
|
+
<li>
|
1641
|
+
|
1642
|
+
<span class='name'>configuration</span>
|
1643
|
+
|
1644
|
+
|
1645
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1646
|
+
|
1647
|
+
|
1648
|
+
|
1649
|
+
—
|
1650
|
+
<div class='inline'>
|
1651
|
+
<p>Selected component. Alowed values see document</p>
|
1652
|
+
</div>
|
1653
|
+
|
1654
|
+
</li>
|
1655
|
+
|
1656
|
+
</ul>
|
1657
|
+
|
1658
|
+
|
1659
|
+
<p class="tag_title">See Also:</p>
|
1660
|
+
<ul class="see">
|
1661
|
+
|
1662
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-active-configuration" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-active-configuration">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-active-configuration</a></li>
|
1663
|
+
|
1664
|
+
</ul>
|
1665
|
+
|
1666
|
+
</div><table class="source_code">
|
1667
|
+
<tr>
|
1668
|
+
<td>
|
1669
|
+
<pre class="lines">
|
1670
|
+
|
1671
|
+
|
1672
|
+
209
|
1673
|
+
210
|
1674
|
+
211</pre>
|
1675
|
+
</td>
|
1676
|
+
<td>
|
1677
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 209</span>
|
1678
|
+
|
1679
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_config'>agent_config</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_configuration'>configuration</span><span class='rparen'>)</span>
|
1680
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/config/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_configuration'>configuration</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1681
|
+
<span class='kw'>end</span></pre>
|
1682
|
+
</td>
|
1683
|
+
</tr>
|
1684
|
+
</table>
|
1685
|
+
</div>
|
1686
|
+
|
1687
|
+
<div class="method_details ">
|
1688
|
+
<h3 class="signature " id="agent_key-instance_method">
|
1689
|
+
|
1690
|
+
#<strong>agent_key</strong>(agent_id, options = {}) ⇒ <tt>String</tt>
|
1691
|
+
|
1692
|
+
|
1693
|
+
|
1694
|
+
|
1695
|
+
|
1696
|
+
</h3><div class="docstring">
|
1697
|
+
<div class="discussion">
|
1698
|
+
|
1699
|
+
<p>Get agent key Returns the key of an agent.</p>
|
1700
|
+
|
1701
|
+
|
1702
|
+
</div>
|
1703
|
+
</div>
|
1704
|
+
<div class="tags">
|
1705
|
+
<p class="tag_title">Parameters:</p>
|
1706
|
+
<ul class="param">
|
1707
|
+
|
1708
|
+
<li>
|
1709
|
+
|
1710
|
+
<span class='name'>agent_id</span>
|
1711
|
+
|
1712
|
+
|
1713
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1714
|
+
|
1715
|
+
|
1716
|
+
|
1717
|
+
—
|
1718
|
+
<div class='inline'>
|
1719
|
+
<p>ID to agent</p>
|
1720
|
+
</div>
|
1721
|
+
|
1722
|
+
</li>
|
1723
|
+
|
1724
|
+
</ul>
|
1725
|
+
|
1726
|
+
<p class="tag_title">Returns:</p>
|
1727
|
+
<ul class="return">
|
1728
|
+
|
1729
|
+
<li>
|
1730
|
+
|
1731
|
+
|
1732
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1733
|
+
|
1734
|
+
|
1735
|
+
|
1736
|
+
—
|
1737
|
+
<div class='inline'>
|
1738
|
+
<p>Returns the key of an agent</p>
|
1739
|
+
</div>
|
1740
|
+
|
1741
|
+
</li>
|
1742
|
+
|
1743
|
+
</ul>
|
1744
|
+
|
1745
|
+
<p class="tag_title">See Also:</p>
|
1746
|
+
<ul class="see">
|
1747
|
+
|
1748
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key</a></li>
|
1749
|
+
|
1750
|
+
</ul>
|
1751
|
+
|
1752
|
+
</div><table class="source_code">
|
1753
|
+
<tr>
|
1754
|
+
<td>
|
1755
|
+
<pre class="lines">
|
1756
|
+
|
1757
|
+
|
1758
|
+
61
|
1759
|
+
62
|
1760
|
+
63</pre>
|
1761
|
+
</td>
|
1762
|
+
<td>
|
1763
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 61</span>
|
1764
|
+
|
1765
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_key'>agent_key</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1766
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/key</span><span class='tstring_end'>"</span></span>
|
1767
|
+
<span class='kw'>end</span></pre>
|
1768
|
+
</td>
|
1769
|
+
</tr>
|
1770
|
+
</table>
|
1771
|
+
</div>
|
1772
|
+
|
1773
|
+
<div class="method_details ">
|
1774
|
+
<h3 class="signature " id="agent_os_summary-instance_method">
|
1775
|
+
|
1776
|
+
#<strong>agent_os_summary</strong>(options = {}) ⇒ <tt>Object</tt>
|
1777
|
+
|
1778
|
+
|
1779
|
+
|
1780
|
+
|
1781
|
+
|
1782
|
+
</h3><div class="docstring">
|
1783
|
+
<div class="discussion">
|
1784
|
+
|
1785
|
+
<p>Get OS summary Returns a summary of the OS.</p>
|
1786
|
+
|
1787
|
+
|
1788
|
+
</div>
|
1789
|
+
</div>
|
1790
|
+
<div class="tags">
|
1791
|
+
<p class="tag_title">Parameters:</p>
|
1792
|
+
<ul class="param">
|
1793
|
+
|
1794
|
+
<li>
|
1795
|
+
|
1796
|
+
<span class='name'>options</span>
|
1797
|
+
|
1798
|
+
|
1799
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1800
|
+
|
1801
|
+
|
1802
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1803
|
+
|
1804
|
+
|
1805
|
+
—
|
1806
|
+
<div class='inline'>
|
1807
|
+
<p>a customizable set of options</p>
|
1808
|
+
</div>
|
1809
|
+
|
1810
|
+
</li>
|
1811
|
+
|
1812
|
+
</ul>
|
1813
|
+
|
1814
|
+
|
1815
|
+
|
1816
|
+
|
1817
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
1818
|
+
<ul class="option">
|
1819
|
+
|
1820
|
+
<li>
|
1821
|
+
<span class="name">offset</span>
|
1822
|
+
<span class="type">(<tt>Number</tt>)</span>
|
1823
|
+
<span class="default">
|
1824
|
+
|
1825
|
+
</span>
|
1826
|
+
|
1827
|
+
</li>
|
1828
|
+
|
1829
|
+
<li>
|
1830
|
+
<span class="name">limit</span>
|
1831
|
+
<span class="type">(<tt>Number</tt>)</span>
|
1832
|
+
<span class="default">
|
1833
|
+
|
1834
|
+
</span>
|
1835
|
+
|
1836
|
+
</li>
|
1837
|
+
|
1838
|
+
<li>
|
1839
|
+
<span class="name">sort</span>
|
1840
|
+
<span class="type">(<tt>String</tt>)</span>
|
1841
|
+
<span class="default">
|
1842
|
+
|
1843
|
+
</span>
|
1844
|
+
|
1845
|
+
</li>
|
1846
|
+
|
1847
|
+
<li>
|
1848
|
+
<span class="name">search</span>
|
1849
|
+
<span class="type">(<tt>String</tt>)</span>
|
1850
|
+
<span class="default">
|
1851
|
+
|
1852
|
+
</span>
|
1853
|
+
|
1854
|
+
</li>
|
1855
|
+
|
1856
|
+
<li>
|
1857
|
+
<span class="name">q</span>
|
1858
|
+
<span class="type">(<tt>String</tt>)</span>
|
1859
|
+
<span class="default">
|
1860
|
+
|
1861
|
+
</span>
|
1862
|
+
|
1863
|
+
</li>
|
1864
|
+
|
1865
|
+
</ul>
|
1866
|
+
|
1867
|
+
|
1868
|
+
|
1869
|
+
<p class="tag_title">See Also:</p>
|
1870
|
+
<ul class="see">
|
1871
|
+
|
1872
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-os-summary" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-os-summary">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-os-summary</a></li>
|
1873
|
+
|
1874
|
+
</ul>
|
1875
|
+
|
1876
|
+
</div><table class="source_code">
|
1877
|
+
<tr>
|
1878
|
+
<td>
|
1879
|
+
<pre class="lines">
|
1880
|
+
|
1881
|
+
|
1882
|
+
407
|
1883
|
+
408
|
1884
|
+
409</pre>
|
1885
|
+
</td>
|
1886
|
+
<td>
|
1887
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 407</span>
|
1888
|
+
|
1889
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_os_summary'>agent_os_summary</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1890
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/summary/os</span><span class='tstring_end'>"</span></span>
|
1891
|
+
<span class='kw'>end</span></pre>
|
1892
|
+
</td>
|
1893
|
+
</tr>
|
1894
|
+
</table>
|
1895
|
+
</div>
|
1896
|
+
|
1897
|
+
<div class="method_details ">
|
1898
|
+
<h3 class="signature " id="agent_summary-instance_method">
|
1899
|
+
|
1900
|
+
#<strong>agent_summary</strong> ⇒ <tt>Object</tt>
|
1901
|
+
|
1902
|
+
|
1903
|
+
|
1904
|
+
|
1905
|
+
|
1906
|
+
</h3><div class="docstring">
|
1907
|
+
<div class="discussion">
|
1908
|
+
|
1909
|
+
<p>Get agents summary Returns a summary of the available agents.</p>
|
1910
|
+
|
1911
|
+
|
1912
|
+
</div>
|
1913
|
+
</div>
|
1914
|
+
<div class="tags">
|
1915
|
+
|
1916
|
+
|
1917
|
+
<p class="tag_title">See Also:</p>
|
1918
|
+
<ul class="see">
|
1919
|
+
|
1920
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-summary" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-summary">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-summary</a></li>
|
1921
|
+
|
1922
|
+
</ul>
|
1923
|
+
|
1924
|
+
</div><table class="source_code">
|
1925
|
+
<tr>
|
1926
|
+
<td>
|
1927
|
+
<pre class="lines">
|
1928
|
+
|
1929
|
+
|
1930
|
+
415
|
1931
|
+
416
|
1932
|
+
417</pre>
|
1933
|
+
</td>
|
1934
|
+
<td>
|
1935
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 415</span>
|
1936
|
+
|
1937
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_summary'>agent_summary</span>
|
1938
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/summary</span><span class='tstring_end'>"</span></span>
|
1939
|
+
<span class='kw'>end</span></pre>
|
1940
|
+
</td>
|
1941
|
+
</tr>
|
1942
|
+
</table>
|
1943
|
+
</div>
|
1944
|
+
|
1945
|
+
<div class="method_details ">
|
1946
|
+
<h3 class="signature " id="agent_sync_status-instance_method">
|
1947
|
+
|
1948
|
+
#<strong>agent_sync_status</strong>(agent_id) ⇒ <tt>Object</tt>
|
1949
|
+
|
1950
|
+
|
1951
|
+
|
1952
|
+
|
1953
|
+
|
1954
|
+
</h3><div class="docstring">
|
1955
|
+
<div class="discussion">
|
1956
|
+
|
1957
|
+
<p>Get sync status of agent Returns the sync status in JSON format</p>
|
1958
|
+
|
1959
|
+
|
1960
|
+
</div>
|
1961
|
+
</div>
|
1962
|
+
<div class="tags">
|
1963
|
+
<p class="tag_title">Parameters:</p>
|
1964
|
+
<ul class="param">
|
1965
|
+
|
1966
|
+
<li>
|
1967
|
+
|
1968
|
+
<span class='name'>agent_id</span>
|
1969
|
+
|
1970
|
+
|
1971
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1972
|
+
|
1973
|
+
|
1974
|
+
|
1975
|
+
—
|
1976
|
+
<div class='inline'>
|
1977
|
+
<p>Agent ID</p>
|
1978
|
+
</div>
|
1979
|
+
|
1980
|
+
</li>
|
1981
|
+
|
1982
|
+
</ul>
|
1983
|
+
|
1984
|
+
|
1985
|
+
<p class="tag_title">See Also:</p>
|
1986
|
+
<ul class="see">
|
1987
|
+
|
1988
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-sync-status-of-agent" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-sync-status-of-agent">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-sync-status-of-agent</a></li>
|
1989
|
+
|
1990
|
+
</ul>
|
1991
|
+
|
1992
|
+
</div><table class="source_code">
|
1993
|
+
<tr>
|
1994
|
+
<td>
|
1995
|
+
<pre class="lines">
|
1996
|
+
|
1997
|
+
|
1998
|
+
226
|
1999
|
+
227
|
2000
|
+
228</pre>
|
2001
|
+
</td>
|
2002
|
+
<td>
|
2003
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 226</span>
|
2004
|
+
|
2005
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agent_sync_status'>agent_sync_status</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='rparen'>)</span>
|
2006
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agent/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/group/is_sync</span><span class='tstring_end'>"</span></span>
|
2007
|
+
<span class='kw'>end</span></pre>
|
2008
|
+
</td>
|
2009
|
+
</tr>
|
2010
|
+
</table>
|
2011
|
+
</div>
|
2012
|
+
|
2013
|
+
<div class="method_details ">
|
2014
|
+
<h3 class="signature " id="agents_by_group-instance_method">
|
2015
|
+
|
2016
|
+
#<strong>agents_by_group</strong>(group_id, options = {}) ⇒ <tt>Object</tt>
|
2017
|
+
|
2018
|
+
|
2019
|
+
|
2020
|
+
|
2021
|
+
|
2022
|
+
</h3><div class="docstring">
|
2023
|
+
<div class="discussion">
|
2024
|
+
|
2025
|
+
<p>Get agents in a group Returns the list of agents in a group.</p>
|
2026
|
+
|
2027
|
+
|
2028
|
+
</div>
|
2029
|
+
</div>
|
2030
|
+
<div class="tags">
|
2031
|
+
<p class="tag_title">Parameters:</p>
|
2032
|
+
<ul class="param">
|
2033
|
+
|
2034
|
+
<li>
|
2035
|
+
|
2036
|
+
<span class='name'>group_id</span>
|
2037
|
+
|
2038
|
+
|
2039
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2040
|
+
|
2041
|
+
|
2042
|
+
|
2043
|
+
—
|
2044
|
+
<div class='inline'>
|
2045
|
+
<p>Group ID</p>
|
2046
|
+
</div>
|
2047
|
+
|
2048
|
+
</li>
|
2049
|
+
|
2050
|
+
<li>
|
2051
|
+
|
2052
|
+
<span class='name'>options</span>
|
2053
|
+
|
2054
|
+
|
2055
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2056
|
+
|
2057
|
+
|
2058
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2059
|
+
|
2060
|
+
|
2061
|
+
—
|
2062
|
+
<div class='inline'>
|
2063
|
+
<p>a customizable set of options</p>
|
2064
|
+
</div>
|
2065
|
+
|
2066
|
+
</li>
|
2067
|
+
|
2068
|
+
</ul>
|
2069
|
+
|
2070
|
+
|
2071
|
+
|
2072
|
+
|
2073
|
+
|
2074
|
+
|
2075
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2076
|
+
<ul class="option">
|
2077
|
+
|
2078
|
+
<li>
|
2079
|
+
<span class="name">offset</span>
|
2080
|
+
<span class="type">(<tt>Number</tt>)</span>
|
2081
|
+
<span class="default">
|
2082
|
+
|
2083
|
+
</span>
|
2084
|
+
|
2085
|
+
</li>
|
2086
|
+
|
2087
|
+
<li>
|
2088
|
+
<span class="name">limit</span>
|
2089
|
+
<span class="type">(<tt>Number</tt>)</span>
|
2090
|
+
<span class="default">
|
2091
|
+
|
2092
|
+
</span>
|
2093
|
+
|
2094
|
+
</li>
|
2095
|
+
|
2096
|
+
<li>
|
2097
|
+
<span class="name">select</span>
|
2098
|
+
<span class="type">(<tt>String</tt>)</span>
|
2099
|
+
<span class="default">
|
2100
|
+
|
2101
|
+
</span>
|
2102
|
+
|
2103
|
+
</li>
|
2104
|
+
|
2105
|
+
<li>
|
2106
|
+
<span class="name">sort</span>
|
2107
|
+
<span class="type">(<tt>String</tt>)</span>
|
2108
|
+
<span class="default">
|
2109
|
+
|
2110
|
+
</span>
|
2111
|
+
|
2112
|
+
</li>
|
2113
|
+
|
2114
|
+
<li>
|
2115
|
+
<span class="name">search</span>
|
2116
|
+
<span class="type">(<tt>String</tt>)</span>
|
2117
|
+
<span class="default">
|
2118
|
+
|
2119
|
+
</span>
|
2120
|
+
|
2121
|
+
</li>
|
2122
|
+
|
2123
|
+
<li>
|
2124
|
+
<span class="name">status</span>
|
2125
|
+
<span class="type">(<tt>String</tt>)</span>
|
2126
|
+
<span class="default">
|
2127
|
+
|
2128
|
+
</span>
|
2129
|
+
|
2130
|
+
</li>
|
2131
|
+
|
2132
|
+
<li>
|
2133
|
+
<span class="name">q</span>
|
2134
|
+
<span class="type">(<tt>String</tt>)</span>
|
2135
|
+
<span class="default">
|
2136
|
+
|
2137
|
+
</span>
|
2138
|
+
|
2139
|
+
</li>
|
2140
|
+
|
2141
|
+
</ul>
|
2142
|
+
|
2143
|
+
|
2144
|
+
|
2145
|
+
<p class="tag_title">See Also:</p>
|
2146
|
+
<ul class="see">
|
2147
|
+
|
2148
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-in-a-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-in-a-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-in-a-group</a></li>
|
2149
|
+
|
2150
|
+
</ul>
|
2151
|
+
|
2152
|
+
</div><table class="source_code">
|
2153
|
+
<tr>
|
2154
|
+
<td>
|
2155
|
+
<pre class="lines">
|
2156
|
+
|
2157
|
+
|
2158
|
+
292
|
2159
|
+
293
|
2160
|
+
294</pre>
|
2161
|
+
</td>
|
2162
|
+
<td>
|
2163
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 292</span>
|
2164
|
+
|
2165
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agents_by_group'>agents_by_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2166
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
2167
|
+
<span class='kw'>end</span></pre>
|
2168
|
+
</td>
|
2169
|
+
</tr>
|
2170
|
+
</table>
|
2171
|
+
</div>
|
2172
|
+
|
2173
|
+
<div class="method_details ">
|
2174
|
+
<h3 class="signature " id="agents_by_no_group-instance_method">
|
2175
|
+
|
2176
|
+
#<strong>agents_by_no_group</strong>(options = {}) ⇒ <tt>Object</tt>
|
2177
|
+
|
2178
|
+
|
2179
|
+
|
2180
|
+
|
2181
|
+
|
2182
|
+
</h3><div class="docstring">
|
2183
|
+
<div class="discussion">
|
2184
|
+
|
2185
|
+
<p>Get agents without group Returns a list with the available agents without
|
2186
|
+
group.</p>
|
2187
|
+
|
2188
|
+
|
2189
|
+
</div>
|
2190
|
+
</div>
|
2191
|
+
<div class="tags">
|
2192
|
+
<p class="tag_title">Parameters:</p>
|
2193
|
+
<ul class="param">
|
2194
|
+
|
2195
|
+
<li>
|
2196
|
+
|
2197
|
+
<span class='name'>options</span>
|
2198
|
+
|
2199
|
+
|
2200
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2201
|
+
|
2202
|
+
|
2203
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2204
|
+
|
2205
|
+
|
2206
|
+
—
|
2207
|
+
<div class='inline'>
|
2208
|
+
<p>a customizable set of options</p>
|
2209
|
+
</div>
|
2210
|
+
|
2211
|
+
</li>
|
2212
|
+
|
2213
|
+
</ul>
|
2214
|
+
|
2215
|
+
|
2216
|
+
|
2217
|
+
|
2218
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2219
|
+
<ul class="option">
|
2220
|
+
|
2221
|
+
<li>
|
2222
|
+
<span class="name">offset</span>
|
2223
|
+
<span class="type">(<tt>Number</tt>)</span>
|
2224
|
+
<span class="default">
|
2225
|
+
|
2226
|
+
</span>
|
2227
|
+
|
2228
|
+
</li>
|
2229
|
+
|
2230
|
+
<li>
|
2231
|
+
<span class="name">limit</span>
|
2232
|
+
<span class="type">(<tt>Number</tt>)</span>
|
2233
|
+
<span class="default">
|
2234
|
+
|
2235
|
+
</span>
|
2236
|
+
|
2237
|
+
</li>
|
2238
|
+
|
2239
|
+
<li>
|
2240
|
+
<span class="name">select</span>
|
2241
|
+
<span class="type">(<tt>String</tt>)</span>
|
2242
|
+
<span class="default">
|
2243
|
+
|
2244
|
+
</span>
|
2245
|
+
|
2246
|
+
</li>
|
2247
|
+
|
2248
|
+
<li>
|
2249
|
+
<span class="name">sort</span>
|
2250
|
+
<span class="type">(<tt>String</tt>)</span>
|
2251
|
+
<span class="default">
|
2252
|
+
|
2253
|
+
</span>
|
2254
|
+
|
2255
|
+
</li>
|
2256
|
+
|
2257
|
+
<li>
|
2258
|
+
<span class="name">search</span>
|
2259
|
+
<span class="type">(<tt>String</tt>)</span>
|
2260
|
+
<span class="default">
|
2261
|
+
|
2262
|
+
</span>
|
2263
|
+
|
2264
|
+
</li>
|
2265
|
+
|
2266
|
+
<li>
|
2267
|
+
<span class="name">status</span>
|
2268
|
+
<span class="type">(<tt>String</tt>)</span>
|
2269
|
+
<span class="default">
|
2270
|
+
|
2271
|
+
</span>
|
2272
|
+
|
2273
|
+
</li>
|
2274
|
+
|
2275
|
+
<li>
|
2276
|
+
<span class="name">q</span>
|
2277
|
+
<span class="type">(<tt>String</tt>)</span>
|
2278
|
+
<span class="default">
|
2279
|
+
|
2280
|
+
</span>
|
2281
|
+
|
2282
|
+
</li>
|
2283
|
+
|
2284
|
+
</ul>
|
2285
|
+
|
2286
|
+
|
2287
|
+
|
2288
|
+
<p class="tag_title">See Also:</p>
|
2289
|
+
<ul class="see">
|
2290
|
+
|
2291
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-without-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-without-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-agents-without-group</a></li>
|
2292
|
+
|
2293
|
+
</ul>
|
2294
|
+
|
2295
|
+
</div><table class="source_code">
|
2296
|
+
<tr>
|
2297
|
+
<td>
|
2298
|
+
<pre class="lines">
|
2299
|
+
|
2300
|
+
|
2301
|
+
307
|
2302
|
+
308
|
2303
|
+
309</pre>
|
2304
|
+
</td>
|
2305
|
+
<td>
|
2306
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 307</span>
|
2307
|
+
|
2308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_agents_by_no_group'>agents_by_no_group</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2309
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>agents/no_group</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
2310
|
+
<span class='kw'>end</span></pre>
|
2311
|
+
</td>
|
2312
|
+
</tr>
|
2313
|
+
</table>
|
2314
|
+
</div>
|
2315
|
+
|
2316
|
+
<div class="method_details ">
|
2317
|
+
<h3 class="signature " id="all_agents-instance_method">
|
2318
|
+
|
2319
|
+
#<strong>all_agents</strong>(options = {}) ⇒ <tt>Array</tt>
|
2320
|
+
|
2321
|
+
|
2322
|
+
|
2323
|
+
|
2324
|
+
|
2325
|
+
</h3><div class="docstring">
|
2326
|
+
<div class="discussion">
|
2327
|
+
|
2328
|
+
<p>Returns a list with the available agents.</p>
|
2329
|
+
|
2330
|
+
|
2331
|
+
</div>
|
2332
|
+
</div>
|
2333
|
+
<div class="tags">
|
2334
|
+
<p class="tag_title">Parameters:</p>
|
2335
|
+
<ul class="param">
|
2336
|
+
|
2337
|
+
<li>
|
2338
|
+
|
2339
|
+
<span class='name'>options</span>
|
2340
|
+
|
2341
|
+
|
2342
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2343
|
+
|
2344
|
+
|
2345
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2346
|
+
|
2347
|
+
|
2348
|
+
—
|
2349
|
+
<div class='inline'>
|
2350
|
+
<p>a customizable set of options</p>
|
2351
|
+
</div>
|
2352
|
+
|
2353
|
+
</li>
|
2354
|
+
|
2355
|
+
</ul>
|
2356
|
+
|
2357
|
+
|
2358
|
+
|
2359
|
+
|
2360
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2361
|
+
<ul class="option">
|
2362
|
+
|
2363
|
+
<li>
|
2364
|
+
<span class="name">:offset</span>
|
2365
|
+
<span class="type">(<tt>String</tt>)</span>
|
2366
|
+
<span class="default">
|
2367
|
+
|
2368
|
+
</span>
|
2369
|
+
|
2370
|
+
— <div class='inline'>
|
2371
|
+
<p>First element to return in the collection.</p>
|
2372
|
+
</div>
|
2373
|
+
|
2374
|
+
</li>
|
2375
|
+
|
2376
|
+
<li>
|
2377
|
+
<span class="name">:limit</span>
|
2378
|
+
<span class="type">(<tt>String</tt>)</span>
|
2379
|
+
<span class="default">
|
2380
|
+
|
2381
|
+
</span>
|
2382
|
+
|
2383
|
+
— <div class='inline'>
|
2384
|
+
<p>Maximum number of elements to return.</p>
|
2385
|
+
</div>
|
2386
|
+
|
2387
|
+
</li>
|
2388
|
+
|
2389
|
+
<li>
|
2390
|
+
<span class="name">:select</span>
|
2391
|
+
<span class="type">(<tt>String</tt>)</span>
|
2392
|
+
<span class="default">
|
2393
|
+
|
2394
|
+
</span>
|
2395
|
+
|
2396
|
+
— <div class='inline'>
|
2397
|
+
<p>Select which fields to return (separated by comma).</p>
|
2398
|
+
</div>
|
2399
|
+
|
2400
|
+
</li>
|
2401
|
+
|
2402
|
+
<li>
|
2403
|
+
<span class="name">:sort</span>
|
2404
|
+
<span class="type">(<tt>String</tt>)</span>
|
2405
|
+
<span class="default">
|
2406
|
+
|
2407
|
+
</span>
|
2408
|
+
|
2409
|
+
— <div class='inline'>
|
2410
|
+
<p>Sorts the collection by a field or fields (separated by comma). Use +/- at
|
2411
|
+
the beginning to list in ascending or descending order.</p>
|
2412
|
+
</div>
|
2413
|
+
|
2414
|
+
</li>
|
2415
|
+
|
2416
|
+
<li>
|
2417
|
+
<span class="name">:search</span>
|
2418
|
+
<span class="type">(<tt>String</tt>)</span>
|
2419
|
+
<span class="default">
|
2420
|
+
|
2421
|
+
</span>
|
2422
|
+
|
2423
|
+
— <div class='inline'>
|
2424
|
+
<p>Looks for elements with the specified string.</p>
|
2425
|
+
</div>
|
2426
|
+
|
2427
|
+
</li>
|
2428
|
+
|
2429
|
+
<li>
|
2430
|
+
<span class="name">:status</span>
|
2431
|
+
<span class="type">(<tt>String</tt>)</span>
|
2432
|
+
<span class="default">
|
2433
|
+
|
2434
|
+
</span>
|
2435
|
+
|
2436
|
+
— <div class='inline'>
|
2437
|
+
<p>Filters by agent status. Use commas to enter multiple statuses. Allowed
|
2438
|
+
values: active, pending, neverconnected, disconnected</p>
|
2439
|
+
</div>
|
2440
|
+
|
2441
|
+
</li>
|
2442
|
+
|
2443
|
+
<li>
|
2444
|
+
<span class="name">:order_than</span>
|
2445
|
+
<span class="type">(<tt>String</tt>)</span>
|
2446
|
+
<span class="default">
|
2447
|
+
|
2448
|
+
</span>
|
2449
|
+
|
2450
|
+
— <div class='inline'>
|
2451
|
+
<p>Filters out disconnected agents for longer than specified. Time in seconds,
|
2452
|
+
‘[n_days]d’, ‘[n_hours]h’, ‘[n_minutes]m’ or ‘[n_seconds]s’. For never
|
2453
|
+
connected agents, uses the register date.</p>
|
2454
|
+
</div>
|
2455
|
+
|
2456
|
+
</li>
|
2457
|
+
|
2458
|
+
</ul>
|
2459
|
+
|
2460
|
+
|
2461
|
+
<p class="tag_title">Returns:</p>
|
2462
|
+
<ul class="return">
|
2463
|
+
|
2464
|
+
<li>
|
2465
|
+
|
2466
|
+
|
2467
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
2468
|
+
|
2469
|
+
|
2470
|
+
|
2471
|
+
—
|
2472
|
+
<div class='inline'>
|
2473
|
+
<p>Returns Array containing agents</p>
|
2474
|
+
</div>
|
2475
|
+
|
2476
|
+
</li>
|
2477
|
+
|
2478
|
+
</ul>
|
2479
|
+
|
2480
|
+
<p class="tag_title">See Also:</p>
|
2481
|
+
<ul class="see">
|
2482
|
+
|
2483
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents</a></li>
|
2484
|
+
|
2485
|
+
</ul>
|
2486
|
+
|
2487
|
+
</div><table class="source_code">
|
2488
|
+
<tr>
|
2489
|
+
<td>
|
2490
|
+
<pre class="lines">
|
2491
|
+
|
2492
|
+
|
2493
|
+
25
|
2494
|
+
26
|
2495
|
+
27
|
2496
|
+
28</pre>
|
2497
|
+
</td>
|
2498
|
+
<td>
|
2499
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 25</span>
|
2500
|
+
|
2501
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_all_agents'>all_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2502
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
2503
|
+
<span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_items'>items</span>
|
2504
|
+
<span class='kw'>end</span></pre>
|
2505
|
+
</td>
|
2506
|
+
</tr>
|
2507
|
+
</table>
|
2508
|
+
</div>
|
2509
|
+
|
2510
|
+
<div class="method_details ">
|
2511
|
+
<h3 class="signature " id="create_group-instance_method">
|
2512
|
+
|
2513
|
+
#<strong>create_group</strong>(group_id) ⇒ <tt>Object</tt>
|
2514
|
+
|
2515
|
+
|
2516
|
+
|
2517
|
+
|
2518
|
+
|
2519
|
+
</h3><div class="docstring">
|
2520
|
+
<div class="discussion">
|
2521
|
+
|
2522
|
+
<p>Create a group Creates a new group.</p>
|
2523
|
+
|
2524
|
+
|
2525
|
+
</div>
|
2526
|
+
</div>
|
2527
|
+
<div class="tags">
|
2528
|
+
<p class="tag_title">Parameters:</p>
|
2529
|
+
<ul class="param">
|
2530
|
+
|
2531
|
+
<li>
|
2532
|
+
|
2533
|
+
<span class='name'>group_id</span>
|
2534
|
+
|
2535
|
+
|
2536
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2537
|
+
|
2538
|
+
|
2539
|
+
|
2540
|
+
—
|
2541
|
+
<div class='inline'>
|
2542
|
+
<p>Group ID</p>
|
2543
|
+
</div>
|
2544
|
+
|
2545
|
+
</li>
|
2546
|
+
|
2547
|
+
</ul>
|
2548
|
+
|
2549
|
+
|
2550
|
+
<p class="tag_title">See Also:</p>
|
2551
|
+
<ul class="see">
|
2552
|
+
|
2553
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#create-a-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#create-a-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#create-a-group</a></li>
|
2554
|
+
|
2555
|
+
</ul>
|
2556
|
+
|
2557
|
+
</div><table class="source_code">
|
2558
|
+
<tr>
|
2559
|
+
<td>
|
2560
|
+
<pre class="lines">
|
2561
|
+
|
2562
|
+
|
2563
|
+
261
|
2564
|
+
262
|
2565
|
+
263</pre>
|
2566
|
+
</td>
|
2567
|
+
<td>
|
2568
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 261</span>
|
2569
|
+
|
2570
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_group'>create_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='rparen'>)</span>
|
2571
|
+
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
2572
|
+
<span class='kw'>end</span></pre>
|
2573
|
+
</td>
|
2574
|
+
</tr>
|
2575
|
+
</table>
|
2576
|
+
</div>
|
2577
|
+
|
2578
|
+
<div class="method_details ">
|
2579
|
+
<h3 class="signature " id="delete_agent-instance_method">
|
2580
|
+
|
2581
|
+
#<strong>delete_agent</strong>(agent_id, options = {}) ⇒ <tt>Object</tt>
|
2582
|
+
|
2583
|
+
|
2584
|
+
|
2585
|
+
|
2586
|
+
|
2587
|
+
</h3><div class="docstring">
|
2588
|
+
<div class="discussion">
|
2589
|
+
|
2590
|
+
<p>Delete an agent Removes an agent.</p>
|
2591
|
+
|
2592
|
+
|
2593
|
+
</div>
|
2594
|
+
</div>
|
2595
|
+
<div class="tags">
|
2596
|
+
<p class="tag_title">Parameters:</p>
|
2597
|
+
<ul class="param">
|
2598
|
+
|
2599
|
+
<li>
|
2600
|
+
|
2601
|
+
<span class='name'>agent_id</span>
|
2602
|
+
|
2603
|
+
|
2604
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2605
|
+
|
2606
|
+
|
2607
|
+
|
2608
|
+
</li>
|
2609
|
+
|
2610
|
+
<li>
|
2611
|
+
|
2612
|
+
<span class='name'>options</span>
|
2613
|
+
|
2614
|
+
|
2615
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2616
|
+
|
2617
|
+
|
2618
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2619
|
+
|
2620
|
+
|
2621
|
+
—
|
2622
|
+
<div class='inline'>
|
2623
|
+
<p>a customizable set of options</p>
|
2624
|
+
</div>
|
2625
|
+
|
2626
|
+
</li>
|
2627
|
+
|
2628
|
+
</ul>
|
2629
|
+
|
2630
|
+
|
2631
|
+
|
2632
|
+
|
2633
|
+
|
2634
|
+
|
2635
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2636
|
+
<ul class="option">
|
2637
|
+
|
2638
|
+
<li>
|
2639
|
+
<span class="name">purge</span>
|
2640
|
+
<span class="type">(<tt>Bool</tt>)</span>
|
2641
|
+
<span class="default">
|
2642
|
+
|
2643
|
+
</span>
|
2644
|
+
|
2645
|
+
— <div class='inline'>
|
2646
|
+
<p>Delete an agent from the key store. This parameter is only valid if purge
|
2647
|
+
is set to no in the manager’s ossec.conf.</p>
|
2648
|
+
</div>
|
2649
|
+
|
2650
|
+
</li>
|
2651
|
+
|
2652
|
+
</ul>
|
2653
|
+
|
2654
|
+
|
2655
|
+
|
2656
|
+
<p class="tag_title">See Also:</p>
|
2657
|
+
<ul class="see">
|
2658
|
+
|
2659
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#delete-an-agent" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#delete-an-agent">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#delete-an-agent</a></li>
|
2660
|
+
|
2661
|
+
</ul>
|
2662
|
+
|
2663
|
+
</div><table class="source_code">
|
2664
|
+
<tr>
|
2665
|
+
<td>
|
2666
|
+
<pre class="lines">
|
2667
|
+
|
2668
|
+
|
2669
|
+
158
|
2670
|
+
159
|
2671
|
+
160</pre>
|
2672
|
+
</td>
|
2673
|
+
<td>
|
2674
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 158</span>
|
2675
|
+
|
2676
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_delete_agent'>delete_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2677
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
2678
|
+
<span class='kw'>end</span></pre>
|
2679
|
+
</td>
|
2680
|
+
</tr>
|
2681
|
+
</table>
|
2682
|
+
</div>
|
2683
|
+
|
2684
|
+
<div class="method_details ">
|
2685
|
+
<h3 class="signature " id="delete_agent_by_group-instance_method">
|
2686
|
+
|
2687
|
+
#<strong>delete_agent_by_group</strong>(ids) ⇒ <tt>Object</tt>
|
2688
|
+
|
2689
|
+
|
2690
|
+
|
2691
|
+
|
2692
|
+
|
2693
|
+
</h3><div class="docstring">
|
2694
|
+
<div class="discussion">
|
2695
|
+
|
2696
|
+
<p>Delete a list of groups</p>
|
2697
|
+
|
2698
|
+
|
2699
|
+
</div>
|
2700
|
+
</div>
|
2701
|
+
<div class="tags">
|
2702
|
+
<p class="tag_title">Parameters:</p>
|
2703
|
+
<ul class="param">
|
2704
|
+
|
2705
|
+
<li>
|
2706
|
+
|
2707
|
+
<span class='name'>ids</span>
|
2708
|
+
|
2709
|
+
|
2710
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2711
|
+
|
2712
|
+
|
2713
|
+
|
2714
|
+
</li>
|
2715
|
+
|
2716
|
+
</ul>
|
2717
|
+
|
2718
|
+
|
2719
|
+
<p class="tag_title">See Also:</p>
|
2720
|
+
<ul class="see">
|
2721
|
+
|
2722
|
+
<li><a href="http://documentation.wazuh.com/3.11/user-manual/api/reference.html#delete-a-list-of-groups" target="_parent" title="http://documentation.wazuh.com/3.11/user-manual/api/reference.html#delete-a-list-of-groups">http://documentation.wazuh.com/3.11/user-manual/api/reference.html#delete-a-list-of-groups</a></li>
|
2723
|
+
|
2724
|
+
</ul>
|
2725
|
+
|
2726
|
+
</div><table class="source_code">
|
2727
|
+
<tr>
|
2728
|
+
<td>
|
2729
|
+
<pre class="lines">
|
2730
|
+
|
2731
|
+
|
2732
|
+
216
|
2733
|
+
217
|
2734
|
+
218</pre>
|
2735
|
+
</td>
|
2736
|
+
<td>
|
2737
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 216</span>
|
2738
|
+
|
2739
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_delete_agent_by_group'>delete_agent_by_group</span><span class='lparen'>(</span><span class='id identifier rubyid_ids'>ids</span><span class='rparen'>)</span>
|
2740
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/groups</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>ids:</span> <span class='id identifier rubyid_ids'>ids</span><span class='rbrace'>}</span>
|
2741
|
+
<span class='kw'>end</span></pre>
|
2742
|
+
</td>
|
2743
|
+
</tr>
|
2744
|
+
</table>
|
2745
|
+
</div>
|
2746
|
+
|
2747
|
+
<div class="method_details ">
|
2748
|
+
<h3 class="signature " id="delete_agents-instance_method">
|
2749
|
+
|
2750
|
+
#<strong>delete_agents</strong>(options = {}) ⇒ <tt>Object</tt>
|
2751
|
+
|
2752
|
+
|
2753
|
+
|
2754
|
+
|
2755
|
+
|
2756
|
+
</h3><div class="docstring">
|
2757
|
+
<div class="discussion">
|
2758
|
+
|
2759
|
+
<p>Delete agents Removes agents, using a list of them or a criterion based on
|
2760
|
+
the status or time of the last connection.</p>
|
2761
|
+
|
2762
|
+
|
2763
|
+
</div>
|
2764
|
+
</div>
|
2765
|
+
<div class="tags">
|
2766
|
+
<p class="tag_title">Parameters:</p>
|
2767
|
+
<ul class="param">
|
2768
|
+
|
2769
|
+
<li>
|
2770
|
+
|
2771
|
+
<span class='name'>options</span>
|
2772
|
+
|
2773
|
+
|
2774
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2775
|
+
|
2776
|
+
|
2777
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2778
|
+
|
2779
|
+
|
2780
|
+
—
|
2781
|
+
<div class='inline'>
|
2782
|
+
<p>a customizable set of options</p>
|
2783
|
+
</div>
|
2784
|
+
|
2785
|
+
</li>
|
2786
|
+
|
2787
|
+
</ul>
|
2788
|
+
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2793
|
+
<ul class="option">
|
2794
|
+
|
2795
|
+
<li>
|
2796
|
+
<span class="name">ids</span>
|
2797
|
+
<span class="type">(<tt>String</tt>)</span>
|
2798
|
+
<span class="default">
|
2799
|
+
|
2800
|
+
</span>
|
2801
|
+
|
2802
|
+
— <div class='inline'>
|
2803
|
+
<p>Agent IDs separated by commas.</p>
|
2804
|
+
</div>
|
2805
|
+
|
2806
|
+
</li>
|
2807
|
+
|
2808
|
+
<li>
|
2809
|
+
<span class="name">purge</span>
|
2810
|
+
<span class="type">(<tt>Bool</tt>)</span>
|
2811
|
+
<span class="default">
|
2812
|
+
|
2813
|
+
</span>
|
2814
|
+
|
2815
|
+
— <div class='inline'>
|
2816
|
+
<p>Delete an agent from the key store. This parameter is only valid if purge
|
2817
|
+
is set to no in the manager’s ossec.conf.</p>
|
2818
|
+
</div>
|
2819
|
+
|
2820
|
+
</li>
|
2821
|
+
|
2822
|
+
<li>
|
2823
|
+
<span class="name">status</span>
|
2824
|
+
<span class="type">(<tt>String</tt>)</span>
|
2825
|
+
<span class="default">
|
2826
|
+
|
2827
|
+
</span>
|
2828
|
+
|
2829
|
+
— <div class='inline'>
|
2830
|
+
<p>Filters by agent status. Use commas to enter multiple statuses. Allowed
|
2831
|
+
values: active, pending, neverconnected, disconnected</p>
|
2832
|
+
</div>
|
2833
|
+
|
2834
|
+
</li>
|
2835
|
+
|
2836
|
+
<li>
|
2837
|
+
<span class="name">older_than</span>
|
2838
|
+
<span class="type">(<tt>String</tt>)</span>
|
2839
|
+
<span class="default">
|
2840
|
+
|
2841
|
+
</span>
|
2842
|
+
|
2843
|
+
— <div class='inline'>
|
2844
|
+
<p>Filters out disconnected agents for longer than specified. Time in seconds,
|
2845
|
+
‘[n_days]d’, ‘[n_hours]h’, ‘[n_minutes]m’ or ‘[n_seconds]s’. For never
|
2846
|
+
connected agents, uses the register date. Default value: 7d.</p>
|
2847
|
+
</div>
|
2848
|
+
|
2849
|
+
</li>
|
2850
|
+
|
2851
|
+
</ul>
|
2852
|
+
|
2853
|
+
|
2854
|
+
|
2855
|
+
</div><table class="source_code">
|
2856
|
+
<tr>
|
2857
|
+
<td>
|
2858
|
+
<pre class="lines">
|
2859
|
+
|
2860
|
+
|
2861
|
+
172
|
2862
|
+
173
|
2863
|
+
174</pre>
|
2864
|
+
</td>
|
2865
|
+
<td>
|
2866
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 172</span>
|
2867
|
+
|
2868
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_delete_agents'>delete_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
2869
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
2870
|
+
<span class='kw'>end</span></pre>
|
2871
|
+
</td>
|
2872
|
+
</tr>
|
2873
|
+
</table>
|
2874
|
+
</div>
|
2875
|
+
|
2876
|
+
<div class="method_details ">
|
2877
|
+
<h3 class="signature " id="distinct_fields_in_agents-instance_method">
|
2878
|
+
|
2879
|
+
#<strong>distinct_fields_in_agents</strong>(options = {}) ⇒ <tt>Object</tt>
|
2880
|
+
|
2881
|
+
|
2882
|
+
|
2883
|
+
|
2884
|
+
|
2885
|
+
</h3><div class="docstring">
|
2886
|
+
<div class="discussion">
|
2887
|
+
|
2888
|
+
<p>Returns all the different combinations that agents have for the selected
|
2889
|
+
fields. It also indicates the total number of agents that have each
|
2890
|
+
combination.</p>
|
2891
|
+
|
2892
|
+
|
2893
|
+
</div>
|
2894
|
+
</div>
|
2895
|
+
<div class="tags">
|
2896
|
+
<p class="tag_title">Parameters:</p>
|
2897
|
+
<ul class="param">
|
2898
|
+
|
2899
|
+
<li>
|
2900
|
+
|
2901
|
+
<span class='name'>options</span>
|
2902
|
+
|
2903
|
+
|
2904
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
2905
|
+
|
2906
|
+
|
2907
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
2908
|
+
|
2909
|
+
|
2910
|
+
—
|
2911
|
+
<div class='inline'>
|
2912
|
+
<p>a customizable set of options</p>
|
2913
|
+
</div>
|
2914
|
+
|
2915
|
+
</li>
|
2916
|
+
|
2917
|
+
</ul>
|
2918
|
+
|
2919
|
+
|
2920
|
+
|
2921
|
+
|
2922
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
2923
|
+
<ul class="option">
|
2924
|
+
|
2925
|
+
<li>
|
2926
|
+
<span class="name">:offset</span>
|
2927
|
+
<span class="type">(<tt>offset</tt>)</span>
|
2928
|
+
<span class="default">
|
2929
|
+
|
2930
|
+
</span>
|
2931
|
+
|
2932
|
+
— <div class='inline'>
|
2933
|
+
<p>First element to return in the collection.</p>
|
2934
|
+
</div>
|
2935
|
+
|
2936
|
+
</li>
|
2937
|
+
|
2938
|
+
<li>
|
2939
|
+
<span class="name">:limit</span>
|
2940
|
+
<span class="type">(<tt>limit</tt>)</span>
|
2941
|
+
<span class="default">
|
2942
|
+
|
2943
|
+
</span>
|
2944
|
+
|
2945
|
+
— <div class='inline'>
|
2946
|
+
<p>Maximum number of elements to return.</p>
|
2947
|
+
</div>
|
2948
|
+
|
2949
|
+
</li>
|
2950
|
+
|
2951
|
+
<li>
|
2952
|
+
<span class="name">:sort</span>
|
2953
|
+
<span class="type">(<tt>sort</tt>)</span>
|
2954
|
+
<span class="default">
|
2955
|
+
|
2956
|
+
</span>
|
2957
|
+
|
2958
|
+
— <div class='inline'>
|
2959
|
+
<p>Sorts the collection by a field or fields (separated by comma). Use +/- at
|
2960
|
+
the beginning to list in ascending or descending order.</p>
|
2961
|
+
</div>
|
2962
|
+
|
2963
|
+
</li>
|
2964
|
+
|
2965
|
+
<li>
|
2966
|
+
<span class="name">:search</span>
|
2967
|
+
<span class="type">(<tt>search</tt>)</span>
|
2968
|
+
<span class="default">
|
2969
|
+
|
2970
|
+
</span>
|
2971
|
+
|
2972
|
+
— <div class='inline'>
|
2973
|
+
<p>Looks for elements with the specified string.</p>
|
2974
|
+
</div>
|
2975
|
+
|
2976
|
+
</li>
|
2977
|
+
|
2978
|
+
<li>
|
2979
|
+
<span class="name">:fileds</span>
|
2980
|
+
<span class="type">(<tt>fileds</tt>)</span>
|
2981
|
+
<span class="default">
|
2982
|
+
|
2983
|
+
</span>
|
2984
|
+
|
2985
|
+
— <div class='inline'>
|
2986
|
+
<p>List of fields affecting the operation.</p>
|
2987
|
+
</div>
|
2988
|
+
|
2989
|
+
</li>
|
2990
|
+
|
2991
|
+
<li>
|
2992
|
+
<span class="name">:select</span>
|
2993
|
+
<span class="type">(<tt>select</tt>)</span>
|
2994
|
+
<span class="default">
|
2995
|
+
|
2996
|
+
</span>
|
2997
|
+
|
2998
|
+
— <div class='inline'>
|
2999
|
+
<p>List of selected fields separated by commas.</p>
|
3000
|
+
</div>
|
3001
|
+
|
3002
|
+
</li>
|
3003
|
+
|
3004
|
+
<li>
|
3005
|
+
<span class="name">:q</span>
|
3006
|
+
<span class="type">(<tt>q</tt>)</span>
|
3007
|
+
<span class="default">
|
3008
|
+
|
3009
|
+
</span>
|
3010
|
+
|
3011
|
+
— <div class='inline'>
|
3012
|
+
<p>Query to filter result. For example q=”status=Active”</p>
|
3013
|
+
</div>
|
3014
|
+
|
3015
|
+
</li>
|
3016
|
+
|
3017
|
+
</ul>
|
3018
|
+
|
3019
|
+
|
3020
|
+
|
3021
|
+
<p class="tag_title">See Also:</p>
|
3022
|
+
<ul class="see">
|
3023
|
+
|
3024
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-distinct-fields-in-agents" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-distinct-fields-in-agents">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-distinct-fields-in-agents</a></li>
|
3025
|
+
|
3026
|
+
</ul>
|
3027
|
+
|
3028
|
+
</div><table class="source_code">
|
3029
|
+
<tr>
|
3030
|
+
<td>
|
3031
|
+
<pre class="lines">
|
3032
|
+
|
3033
|
+
|
3034
|
+
106
|
3035
|
+
107
|
3036
|
+
108</pre>
|
3037
|
+
</td>
|
3038
|
+
<td>
|
3039
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 106</span>
|
3040
|
+
|
3041
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_distinct_fields_in_agents'>distinct_fields_in_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3042
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/stats/distinct</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
3043
|
+
<span class='kw'>end</span></pre>
|
3044
|
+
</td>
|
3045
|
+
</tr>
|
3046
|
+
</table>
|
3047
|
+
</div>
|
3048
|
+
|
3049
|
+
<div class="method_details ">
|
3050
|
+
<h3 class="signature " id="get_file_in_group-instance_method">
|
3051
|
+
|
3052
|
+
#<strong>get_file_in_group</strong>(group_id, filename, options = {}) ⇒ <tt>Object</tt>
|
3053
|
+
|
3054
|
+
|
3055
|
+
|
3056
|
+
|
3057
|
+
|
3058
|
+
</h3><div class="docstring">
|
3059
|
+
<div class="discussion">
|
3060
|
+
|
3061
|
+
<p>Get a file in group Returns the specified file belonging to the group
|
3062
|
+
parsed to JSON.</p>
|
3063
|
+
|
3064
|
+
|
3065
|
+
</div>
|
3066
|
+
</div>
|
3067
|
+
<div class="tags">
|
3068
|
+
<p class="tag_title">Parameters:</p>
|
3069
|
+
<ul class="param">
|
661
3070
|
|
662
3071
|
<li>
|
663
3072
|
|
664
|
-
<span class='name'>
|
3073
|
+
<span class='name'>group_id</span>
|
665
3074
|
|
666
3075
|
|
667
3076
|
<span class='type'>(<tt>String</tt>)</span>
|
@@ -670,7 +3079,23 @@ seconds.</p>
|
|
670
3079
|
|
671
3080
|
—
|
672
3081
|
<div class='inline'>
|
673
|
-
<p>ID
|
3082
|
+
<p>Group ID</p>
|
3083
|
+
</div>
|
3084
|
+
|
3085
|
+
</li>
|
3086
|
+
|
3087
|
+
<li>
|
3088
|
+
|
3089
|
+
<span class='name'>filename</span>
|
3090
|
+
|
3091
|
+
|
3092
|
+
<span class='type'>(<tt>String</tt>)</span>
|
3093
|
+
|
3094
|
+
|
3095
|
+
|
3096
|
+
—
|
3097
|
+
<div class='inline'>
|
3098
|
+
<p>Filename</p>
|
674
3099
|
</div>
|
675
3100
|
|
676
3101
|
</li>
|
@@ -700,19 +3125,26 @@ seconds.</p>
|
|
700
3125
|
|
701
3126
|
|
702
3127
|
|
3128
|
+
|
3129
|
+
|
703
3130
|
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
704
3131
|
<ul class="option">
|
705
3132
|
|
706
3133
|
<li>
|
707
|
-
<span class="name"
|
708
|
-
<span class="type">(<tt>
|
3134
|
+
<span class="name">type</span>
|
3135
|
+
<span class="type">(<tt>String</tt>)</span>
|
709
3136
|
<span class="default">
|
710
3137
|
|
711
3138
|
</span>
|
712
3139
|
|
713
|
-
|
714
|
-
|
715
|
-
|
3140
|
+
</li>
|
3141
|
+
|
3142
|
+
<li>
|
3143
|
+
<span class="name">format</span>
|
3144
|
+
<span class="type">(<tt>String</tt>)</span>
|
3145
|
+
<span class="default">
|
3146
|
+
|
3147
|
+
</span>
|
716
3148
|
|
717
3149
|
</li>
|
718
3150
|
|
@@ -723,7 +3155,7 @@ seconds.</p>
|
|
723
3155
|
<p class="tag_title">See Also:</p>
|
724
3156
|
<ul class="see">
|
725
3157
|
|
726
|
-
<li><a href="https://documentation.wazuh.com/3.
|
3158
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#add-agent-group</a></li>
|
727
3159
|
|
728
3160
|
</ul>
|
729
3161
|
|
@@ -733,15 +3165,15 @@ seconds.</p>
|
|
733
3165
|
<pre class="lines">
|
734
3166
|
|
735
3167
|
|
736
|
-
|
737
|
-
|
738
|
-
|
3168
|
+
275
|
3169
|
+
276
|
3170
|
+
277</pre>
|
739
3171
|
</td>
|
740
3172
|
<td>
|
741
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
3173
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 275</span>
|
742
3174
|
|
743
|
-
<span class='kw'>def</span> <span class='id identifier
|
744
|
-
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'
|
3175
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get_file_in_group'>get_file_in_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3176
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/files/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filename'>filename</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
745
3177
|
<span class='kw'>end</span></pre>
|
746
3178
|
</td>
|
747
3179
|
</tr>
|
@@ -749,9 +3181,9 @@ seconds.</p>
|
|
749
3181
|
</div>
|
750
3182
|
|
751
3183
|
<div class="method_details ">
|
752
|
-
<h3 class="signature " id="
|
3184
|
+
<h3 class="signature " id="group_configuration-instance_method">
|
753
3185
|
|
754
|
-
#<strong>
|
3186
|
+
#<strong>group_configuration</strong>(group_id, options = {}) ⇒ <tt>Object</tt>
|
755
3187
|
|
756
3188
|
|
757
3189
|
|
@@ -760,7 +3192,7 @@ seconds.</p>
|
|
760
3192
|
</h3><div class="docstring">
|
761
3193
|
<div class="discussion">
|
762
3194
|
|
763
|
-
<p>
|
3195
|
+
<p>Get group configuration</p>
|
764
3196
|
|
765
3197
|
|
766
3198
|
</div>
|
@@ -771,17 +3203,122 @@ seconds.</p>
|
|
771
3203
|
|
772
3204
|
<li>
|
773
3205
|
|
774
|
-
<span class='name'>
|
3206
|
+
<span class='name'>group_id</span>
|
775
3207
|
|
776
3208
|
|
777
3209
|
<span class='type'>(<tt>String</tt>)</span>
|
778
3210
|
|
779
3211
|
|
780
3212
|
|
3213
|
+
</li>
|
3214
|
+
|
3215
|
+
<li>
|
3216
|
+
|
3217
|
+
<span class='name'>options</span>
|
3218
|
+
|
3219
|
+
|
3220
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
3221
|
+
|
3222
|
+
|
3223
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
3224
|
+
|
3225
|
+
|
781
3226
|
—
|
782
3227
|
<div class='inline'>
|
783
|
-
<p>
|
3228
|
+
<p>a customizable set of options</p>
|
3229
|
+
</div>
|
3230
|
+
|
3231
|
+
</li>
|
3232
|
+
|
3233
|
+
</ul>
|
3234
|
+
|
3235
|
+
|
3236
|
+
|
3237
|
+
|
3238
|
+
|
3239
|
+
|
3240
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
3241
|
+
<ul class="option">
|
3242
|
+
|
3243
|
+
<li>
|
3244
|
+
<span class="name">offset</span>
|
3245
|
+
<span class="type">(<tt>Number</tt>)</span>
|
3246
|
+
<span class="default">
|
3247
|
+
|
3248
|
+
</span>
|
3249
|
+
|
3250
|
+
</li>
|
3251
|
+
|
3252
|
+
<li>
|
3253
|
+
<span class="name">limit</span>
|
3254
|
+
<span class="type">(<tt>Number</tt>)</span>
|
3255
|
+
<span class="default">
|
3256
|
+
|
3257
|
+
</span>
|
3258
|
+
|
3259
|
+
</li>
|
3260
|
+
|
3261
|
+
</ul>
|
3262
|
+
|
3263
|
+
|
3264
|
+
|
3265
|
+
<p class="tag_title">See Also:</p>
|
3266
|
+
<ul class="see">
|
3267
|
+
|
3268
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-configuration" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-configuration">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-configuration</a></li>
|
3269
|
+
|
3270
|
+
</ul>
|
3271
|
+
|
3272
|
+
</div><table class="source_code">
|
3273
|
+
<tr>
|
3274
|
+
<td>
|
3275
|
+
<pre class="lines">
|
3276
|
+
|
3277
|
+
|
3278
|
+
317
|
3279
|
+
318
|
3280
|
+
319</pre>
|
3281
|
+
</td>
|
3282
|
+
<td>
|
3283
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 317</span>
|
3284
|
+
|
3285
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_group_configuration'>group_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3286
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/configuration</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
3287
|
+
<span class='kw'>end</span></pre>
|
3288
|
+
</td>
|
3289
|
+
</tr>
|
3290
|
+
</table>
|
3291
|
+
</div>
|
3292
|
+
|
3293
|
+
<div class="method_details ">
|
3294
|
+
<h3 class="signature " id="group_files-instance_method">
|
3295
|
+
|
3296
|
+
#<strong>group_files</strong>(group_id, options = {}) ⇒ <tt>Object</tt>
|
3297
|
+
|
3298
|
+
|
3299
|
+
|
3300
|
+
|
3301
|
+
|
3302
|
+
</h3><div class="docstring">
|
3303
|
+
<div class="discussion">
|
3304
|
+
|
3305
|
+
<p>Get group files Returns the files belonging to the group.</p>
|
3306
|
+
|
3307
|
+
|
3308
|
+
</div>
|
784
3309
|
</div>
|
3310
|
+
<div class="tags">
|
3311
|
+
<p class="tag_title">Parameters:</p>
|
3312
|
+
<ul class="param">
|
3313
|
+
|
3314
|
+
<li>
|
3315
|
+
|
3316
|
+
<span class='name'>group_id</span>
|
3317
|
+
|
3318
|
+
|
3319
|
+
<span class='type'>(<tt>String</tt>)</span>
|
3320
|
+
|
3321
|
+
|
785
3322
|
|
786
3323
|
</li>
|
787
3324
|
|
@@ -814,15 +3351,47 @@ seconds.</p>
|
|
814
3351
|
<ul class="option">
|
815
3352
|
|
816
3353
|
<li>
|
817
|
-
<span class="name"
|
818
|
-
<span class="type">(<tt>
|
3354
|
+
<span class="name">offset</span>
|
3355
|
+
<span class="type">(<tt>Number</tt>)</span>
|
819
3356
|
<span class="default">
|
820
3357
|
|
821
3358
|
</span>
|
822
3359
|
|
823
|
-
|
824
|
-
|
825
|
-
|
3360
|
+
</li>
|
3361
|
+
|
3362
|
+
<li>
|
3363
|
+
<span class="name">limit</span>
|
3364
|
+
<span class="type">(<tt>Number</tt>)</span>
|
3365
|
+
<span class="default">
|
3366
|
+
|
3367
|
+
</span>
|
3368
|
+
|
3369
|
+
</li>
|
3370
|
+
|
3371
|
+
<li>
|
3372
|
+
<span class="name">sort</span>
|
3373
|
+
<span class="type">(<tt>String</tt>)</span>
|
3374
|
+
<span class="default">
|
3375
|
+
|
3376
|
+
</span>
|
3377
|
+
|
3378
|
+
</li>
|
3379
|
+
|
3380
|
+
<li>
|
3381
|
+
<span class="name">search</span>
|
3382
|
+
<span class="type">(<tt>String</tt>)</span>
|
3383
|
+
<span class="default">
|
3384
|
+
|
3385
|
+
</span>
|
3386
|
+
|
3387
|
+
</li>
|
3388
|
+
|
3389
|
+
<li>
|
3390
|
+
<span class="name">hash</span>
|
3391
|
+
<span class="type">(<tt>String</tt>)</span>
|
3392
|
+
<span class="default">
|
3393
|
+
|
3394
|
+
</span>
|
826
3395
|
|
827
3396
|
</li>
|
828
3397
|
|
@@ -833,7 +3402,7 @@ seconds.</p>
|
|
833
3402
|
<p class="tag_title">See Also:</p>
|
834
3403
|
<ul class="see">
|
835
3404
|
|
836
|
-
<li><a href="https://documentation.wazuh.com/3.
|
3405
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-files" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-files">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#get-group-files</a></li>
|
837
3406
|
|
838
3407
|
</ul>
|
839
3408
|
|
@@ -843,15 +3412,15 @@ seconds.</p>
|
|
843
3412
|
<pre class="lines">
|
844
3413
|
|
845
3414
|
|
846
|
-
|
847
|
-
|
848
|
-
|
3415
|
+
331
|
3416
|
+
332
|
3417
|
+
333</pre>
|
849
3418
|
</td>
|
850
3419
|
<td>
|
851
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
3420
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 331</span>
|
852
3421
|
|
853
|
-
<span class='kw'>def</span> <span class='id identifier
|
854
|
-
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/
|
3422
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_group_files'>group_files</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3423
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/files</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
855
3424
|
<span class='kw'>end</span></pre>
|
856
3425
|
</td>
|
857
3426
|
</tr>
|
@@ -859,9 +3428,9 @@ seconds.</p>
|
|
859
3428
|
</div>
|
860
3429
|
|
861
3430
|
<div class="method_details ">
|
862
|
-
<h3 class="signature " id="
|
3431
|
+
<h3 class="signature " id="groups-instance_method">
|
863
3432
|
|
864
|
-
#<strong>
|
3433
|
+
#<strong>groups</strong>(options = {}) ⇒ <tt>Object</tt>
|
865
3434
|
|
866
3435
|
|
867
3436
|
|
@@ -870,7 +3439,7 @@ seconds.</p>
|
|
870
3439
|
</h3><div class="docstring">
|
871
3440
|
<div class="discussion">
|
872
3441
|
|
873
|
-
<p>Returns the
|
3442
|
+
<p>Get groups Returns the list of existing agent groups.</p>
|
874
3443
|
|
875
3444
|
|
876
3445
|
</div>
|
@@ -881,29 +3450,87 @@ seconds.</p>
|
|
881
3450
|
|
882
3451
|
<li>
|
883
3452
|
|
884
|
-
<span class='name'>
|
3453
|
+
<span class='name'>options</span>
|
885
3454
|
|
886
3455
|
|
887
|
-
<span class='type'>(<tt>
|
3456
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
888
3457
|
|
889
3458
|
|
3459
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
3460
|
+
|
890
3461
|
|
891
3462
|
—
|
892
3463
|
<div class='inline'>
|
893
|
-
<p>
|
3464
|
+
<p>a customizable set of options</p>
|
894
3465
|
</div>
|
895
3466
|
|
896
3467
|
</li>
|
897
3468
|
|
898
|
-
</ul>
|
899
|
-
|
3469
|
+
</ul>
|
3470
|
+
|
3471
|
+
|
3472
|
+
|
3473
|
+
|
3474
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
3475
|
+
<ul class="option">
|
3476
|
+
|
3477
|
+
<li>
|
3478
|
+
<span class="name">offset</span>
|
3479
|
+
<span class="type">(<tt>Number</tt>)</span>
|
3480
|
+
<span class="default">
|
3481
|
+
|
3482
|
+
</span>
|
3483
|
+
|
3484
|
+
</li>
|
3485
|
+
|
3486
|
+
<li>
|
3487
|
+
<span class="name">limit</span>
|
3488
|
+
<span class="type">(<tt>Number</tt>)</span>
|
3489
|
+
<span class="default">
|
3490
|
+
|
3491
|
+
</span>
|
3492
|
+
|
3493
|
+
</li>
|
3494
|
+
|
3495
|
+
<li>
|
3496
|
+
<span class="name">sort</span>
|
3497
|
+
<span class="type">(<tt>String</tt>)</span>
|
3498
|
+
<span class="default">
|
3499
|
+
|
3500
|
+
</span>
|
3501
|
+
|
3502
|
+
</li>
|
3503
|
+
|
3504
|
+
<li>
|
3505
|
+
<span class="name">search</span>
|
3506
|
+
<span class="type">(<tt>String</tt>)</span>
|
3507
|
+
<span class="default">
|
3508
|
+
|
3509
|
+
</span>
|
3510
|
+
|
3511
|
+
</li>
|
3512
|
+
|
3513
|
+
<li>
|
3514
|
+
<span class="name">hash</span>
|
3515
|
+
<span class="type">(<tt>String</tt>)</span>
|
3516
|
+
<span class="default">
|
3517
|
+
|
3518
|
+
</span>
|
3519
|
+
|
3520
|
+
</li>
|
3521
|
+
|
3522
|
+
<li>
|
3523
|
+
<span class="name">q</span>
|
3524
|
+
<span class="type">(<tt>String</tt>)</span>
|
3525
|
+
<span class="default">
|
3526
|
+
|
3527
|
+
</span>
|
3528
|
+
|
3529
|
+
</li>
|
3530
|
+
|
3531
|
+
</ul>
|
3532
|
+
|
900
3533
|
|
901
|
-
<p class="tag_title">See Also:</p>
|
902
|
-
<ul class="see">
|
903
|
-
|
904
|
-
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-agent-key</a></li>
|
905
|
-
|
906
|
-
</ul>
|
907
3534
|
|
908
3535
|
</div><table class="source_code">
|
909
3536
|
<tr>
|
@@ -911,15 +3538,15 @@ seconds.</p>
|
|
911
3538
|
<pre class="lines">
|
912
3539
|
|
913
3540
|
|
914
|
-
|
915
|
-
|
916
|
-
|
3541
|
+
344
|
3542
|
+
345
|
3543
|
+
346</pre>
|
917
3544
|
</td>
|
918
3545
|
<td>
|
919
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
3546
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 344</span>
|
920
3547
|
|
921
|
-
<span class='kw'>def</span> <span class='id identifier
|
922
|
-
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'
|
3548
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_groups'>groups</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3549
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/groups</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
923
3550
|
<span class='kw'>end</span></pre>
|
924
3551
|
</td>
|
925
3552
|
</tr>
|
@@ -927,9 +3554,9 @@ seconds.</p>
|
|
927
3554
|
</div>
|
928
3555
|
|
929
3556
|
<div class="method_details ">
|
930
|
-
<h3 class="signature " id="
|
3557
|
+
<h3 class="signature " id="insert_agent-instance_method">
|
931
3558
|
|
932
|
-
#<strong>
|
3559
|
+
#<strong>insert_agent</strong>(options = {}) ⇒ <tt>Object</tt>
|
933
3560
|
|
934
3561
|
|
935
3562
|
|
@@ -938,7 +3565,7 @@ seconds.</p>
|
|
938
3565
|
</h3><div class="docstring">
|
939
3566
|
<div class="discussion">
|
940
3567
|
|
941
|
-
<p>
|
3568
|
+
<p>Insert an agent with an existing id and key.</p>
|
942
3569
|
|
943
3570
|
|
944
3571
|
</div>
|
@@ -974,109 +3601,69 @@ seconds.</p>
|
|
974
3601
|
<ul class="option">
|
975
3602
|
|
976
3603
|
<li>
|
977
|
-
<span class="name">:
|
978
|
-
<span class="type">(<tt>
|
979
|
-
<span class="default">
|
980
|
-
|
981
|
-
</span>
|
982
|
-
|
983
|
-
— <div class='inline'>
|
984
|
-
<p>First element to return in the collection.</p>
|
985
|
-
</div>
|
986
|
-
|
987
|
-
</li>
|
988
|
-
|
989
|
-
<li>
|
990
|
-
<span class="name">:limit</span>
|
991
|
-
<span class="type">(<tt>limit</tt>)</span>
|
992
|
-
<span class="default">
|
993
|
-
|
994
|
-
</span>
|
995
|
-
|
996
|
-
— <div class='inline'>
|
997
|
-
<p>Maximum number of elements to return.</p>
|
998
|
-
</div>
|
999
|
-
|
1000
|
-
</li>
|
1001
|
-
|
1002
|
-
<li>
|
1003
|
-
<span class="name">:select</span>
|
1004
|
-
<span class="type">(<tt>select</tt>)</span>
|
1005
|
-
<span class="default">
|
1006
|
-
|
1007
|
-
</span>
|
1008
|
-
|
1009
|
-
— <div class='inline'>
|
1010
|
-
<p>Select which fields to return (separated by comma).</p>
|
1011
|
-
</div>
|
1012
|
-
|
1013
|
-
</li>
|
1014
|
-
|
1015
|
-
<li>
|
1016
|
-
<span class="name">:sort</span>
|
1017
|
-
<span class="type">(<tt>sort</tt>)</span>
|
3604
|
+
<span class="name">:name</span>
|
3605
|
+
<span class="type">(<tt>name</tt>)</span>
|
1018
3606
|
<span class="default">
|
1019
3607
|
|
1020
3608
|
</span>
|
1021
3609
|
|
1022
3610
|
— <div class='inline'>
|
1023
|
-
<p>
|
1024
|
-
the beginning to list in ascending or descending order.</p>
|
3611
|
+
<p>Name to agent</p>
|
1025
3612
|
</div>
|
1026
3613
|
|
1027
3614
|
</li>
|
1028
3615
|
|
1029
3616
|
<li>
|
1030
|
-
<span class="name">:
|
1031
|
-
<span class="type">(<tt>
|
3617
|
+
<span class="name">:ip</span>
|
3618
|
+
<span class="type">(<tt>ip</tt>)</span>
|
1032
3619
|
<span class="default">
|
1033
3620
|
|
1034
3621
|
</span>
|
1035
3622
|
|
1036
3623
|
— <div class='inline'>
|
1037
|
-
<p>
|
3624
|
+
<p>If this is not included, the API will get the IP automatically. If you are
|
3625
|
+
behind a proxy, you must set the option config.BehindProxyServer to yes at
|
3626
|
+
config.js. Allowed values: IP, IP/NET, ANY</p>
|
1038
3627
|
</div>
|
1039
3628
|
|
1040
3629
|
</li>
|
1041
3630
|
|
1042
3631
|
<li>
|
1043
|
-
<span class="name">:
|
1044
|
-
<span class="type">(<tt>
|
3632
|
+
<span class="name">:id</span>
|
3633
|
+
<span class="type">(<tt>id</tt>)</span>
|
1045
3634
|
<span class="default">
|
1046
3635
|
|
1047
3636
|
</span>
|
1048
3637
|
|
1049
3638
|
— <div class='inline'>
|
1050
|
-
<p>
|
1051
|
-
values: active, pending, neverconnected, disconnected</p>
|
3639
|
+
<p>ID to agent</p>
|
1052
3640
|
</div>
|
1053
3641
|
|
1054
3642
|
</li>
|
1055
3643
|
|
1056
3644
|
<li>
|
1057
|
-
<span class="name">:
|
1058
|
-
<span class="type">(<tt>
|
3645
|
+
<span class="name">:key</span>
|
3646
|
+
<span class="type">(<tt>key</tt>)</span>
|
1059
3647
|
<span class="default">
|
1060
3648
|
|
1061
3649
|
</span>
|
1062
3650
|
|
1063
3651
|
— <div class='inline'>
|
1064
|
-
<p>
|
3652
|
+
<p>Agent key. Minimum length: 64 characters. Allowed values: ^[a-zA-Z0-9]+$</p>
|
1065
3653
|
</div>
|
1066
3654
|
|
1067
3655
|
</li>
|
1068
3656
|
|
1069
3657
|
<li>
|
1070
|
-
<span class="name">:
|
1071
|
-
<span class="type">(<tt>
|
3658
|
+
<span class="name">:force</span>
|
3659
|
+
<span class="type">(<tt>force</tt>)</span>
|
1072
3660
|
<span class="default">
|
1073
3661
|
|
1074
3662
|
</span>
|
1075
3663
|
|
1076
3664
|
— <div class='inline'>
|
1077
|
-
<p>
|
1078
|
-
|
1079
|
-
connected agents, uses the register date.</p>
|
3665
|
+
<p>Remove the old agent the with same IP if disconnected since <force>
|
3666
|
+
seconds.</p>
|
1080
3667
|
</div>
|
1081
3668
|
|
1082
3669
|
</li>
|
@@ -1085,28 +3672,21 @@ connected agents, uses the register date.</p>
|
|
1085
3672
|
|
1086
3673
|
|
1087
3674
|
|
1088
|
-
<p class="tag_title">See Also:</p>
|
1089
|
-
<ul class="see">
|
1090
|
-
|
1091
|
-
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-all-agents</a></li>
|
1092
|
-
|
1093
|
-
</ul>
|
1094
|
-
|
1095
3675
|
</div><table class="source_code">
|
1096
3676
|
<tr>
|
1097
3677
|
<td>
|
1098
3678
|
<pre class="lines">
|
1099
3679
|
|
1100
3680
|
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
3681
|
+
198
|
3682
|
+
199
|
3683
|
+
200</pre>
|
1104
3684
|
</td>
|
1105
3685
|
<td>
|
1106
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
3686
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 198</span>
|
1107
3687
|
|
1108
|
-
<span class='kw'>def</span> <span class='id identifier
|
1109
|
-
<span class='id identifier
|
3688
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_insert_agent'>insert_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3689
|
+
<span class='id identifier rubyid_post'>post</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/insert</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
1110
3690
|
<span class='kw'>end</span></pre>
|
1111
3691
|
</td>
|
1112
3692
|
</tr>
|
@@ -1114,9 +3694,9 @@ connected agents, uses the register date.</p>
|
|
1114
3694
|
</div>
|
1115
3695
|
|
1116
3696
|
<div class="method_details ">
|
1117
|
-
<h3 class="signature " id="
|
3697
|
+
<h3 class="signature " id="outdated_agents-instance_method">
|
1118
3698
|
|
1119
|
-
#<strong>
|
3699
|
+
#<strong>outdated_agents</strong>(options = {}) ⇒ <tt>Object</tt>
|
1120
3700
|
|
1121
3701
|
|
1122
3702
|
|
@@ -1125,9 +3705,7 @@ connected agents, uses the register date.</p>
|
|
1125
3705
|
</h3><div class="docstring">
|
1126
3706
|
<div class="discussion">
|
1127
3707
|
|
1128
|
-
<p>Returns
|
1129
|
-
fields. It also indicates the total number of agents that have each
|
1130
|
-
combination.</p>
|
3708
|
+
<p>Returns the list of outdated agents.</p>
|
1131
3709
|
|
1132
3710
|
|
1133
3711
|
</div>
|
@@ -1203,65 +3781,176 @@ the beginning to list in ascending or descending order.</p>
|
|
1203
3781
|
</li>
|
1204
3782
|
|
1205
3783
|
<li>
|
1206
|
-
<span class="name">:
|
1207
|
-
<span class="type">(<tt>
|
3784
|
+
<span class="name">:q</span>
|
3785
|
+
<span class="type">(<tt>q</tt>)</span>
|
1208
3786
|
<span class="default">
|
1209
3787
|
|
1210
3788
|
</span>
|
1211
3789
|
|
1212
3790
|
— <div class='inline'>
|
1213
|
-
<p>
|
3791
|
+
<p>Query to filter result. For example q=”status=Active”</p>
|
1214
3792
|
</div>
|
1215
3793
|
|
1216
3794
|
</li>
|
1217
3795
|
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
3796
|
+
</ul>
|
3797
|
+
|
3798
|
+
|
3799
|
+
|
3800
|
+
<p class="tag_title">See Also:</p>
|
3801
|
+
<ul class="see">
|
3802
|
+
|
3803
|
+
<li><a href="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-outdated-agents" target="_parent" title="https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-outdated-agents">https://documentation.wazuh.com/3.10/user-manual/api/reference.html#get-outdated-agents</a></li>
|
3804
|
+
|
3805
|
+
</ul>
|
3806
|
+
|
3807
|
+
</div><table class="source_code">
|
3808
|
+
<tr>
|
3809
|
+
<td>
|
3810
|
+
<pre class="lines">
|
3811
|
+
|
3812
|
+
|
3813
|
+
121
|
3814
|
+
122
|
3815
|
+
123</pre>
|
3816
|
+
</td>
|
3817
|
+
<td>
|
3818
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 121</span>
|
3819
|
+
|
3820
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_outdated_agents'>outdated_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
3821
|
+
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/outdated</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
3822
|
+
<span class='kw'>end</span></pre>
|
3823
|
+
</td>
|
3824
|
+
</tr>
|
3825
|
+
</table>
|
1227
3826
|
</div>
|
1228
|
-
|
1229
|
-
|
3827
|
+
|
3828
|
+
<div class="method_details ">
|
3829
|
+
<h3 class="signature " id="remove_agent_of_group-instance_method">
|
3830
|
+
|
3831
|
+
#<strong>remove_agent_of_group</strong>(agent_id, group_id) ⇒ <tt>Object</tt>
|
3832
|
+
|
3833
|
+
|
3834
|
+
|
3835
|
+
|
3836
|
+
|
3837
|
+
</h3><div class="docstring">
|
3838
|
+
<div class="discussion">
|
3839
|
+
|
3840
|
+
<p>Remove a single group of an agent Remove the group of the agent but will
|
3841
|
+
leave the rest of its group if it belongs to a multigroup.</p>
|
3842
|
+
|
3843
|
+
|
3844
|
+
</div>
|
3845
|
+
</div>
|
3846
|
+
<div class="tags">
|
3847
|
+
<p class="tag_title">Parameters:</p>
|
3848
|
+
<ul class="param">
|
3849
|
+
|
3850
|
+
<li>
|
1230
3851
|
|
1231
|
-
<
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
3852
|
+
<span class='name'>agent_id</span>
|
3853
|
+
|
3854
|
+
|
3855
|
+
<span class='type'>(<tt>String</tt>)</span>
|
3856
|
+
|
3857
|
+
|
3858
|
+
|
3859
|
+
</li>
|
3860
|
+
|
3861
|
+
<li>
|
3862
|
+
|
3863
|
+
<span class='name'>group_id</span>
|
3864
|
+
|
3865
|
+
|
3866
|
+
<span class='type'>(<tt>String</tt>)</span>
|
3867
|
+
|
3868
|
+
|
3869
|
+
|
3870
|
+
</li>
|
3871
|
+
|
3872
|
+
</ul>
|
3873
|
+
|
3874
|
+
|
3875
|
+
<p class="tag_title">See Also:</p>
|
3876
|
+
<ul class="see">
|
3877
|
+
|
3878
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-an-agent" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-an-agent">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-an-agent</a></li>
|
3879
|
+
|
3880
|
+
</ul>
|
3881
|
+
|
3882
|
+
</div><table class="source_code">
|
3883
|
+
<tr>
|
3884
|
+
<td>
|
3885
|
+
<pre class="lines">
|
3886
|
+
|
3887
|
+
|
3888
|
+
366
|
3889
|
+
367
|
3890
|
+
368</pre>
|
3891
|
+
</td>
|
3892
|
+
<td>
|
3893
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 366</span>
|
3894
|
+
|
3895
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_agent_of_group'>remove_agent_of_group</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_group_id'>group_id</span><span class='rparen'>)</span>
|
3896
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/group/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
3897
|
+
<span class='kw'>end</span></pre>
|
3898
|
+
</td>
|
3899
|
+
</tr>
|
3900
|
+
</table>
|
1240
3901
|
</div>
|
1241
|
-
|
1242
|
-
|
3902
|
+
|
3903
|
+
<div class="method_details ">
|
3904
|
+
<h3 class="signature " id="remove_agents_of_group-instance_method">
|
3905
|
+
|
3906
|
+
#<strong>remove_agents_of_group</strong>(ids, groups) ⇒ <tt>Object</tt>
|
3907
|
+
|
3908
|
+
|
3909
|
+
|
3910
|
+
|
3911
|
+
|
3912
|
+
</h3><div class="docstring">
|
3913
|
+
<div class="discussion">
|
3914
|
+
|
3915
|
+
<p>Remove a single group of multiple agents Remove a list of agents of a
|
3916
|
+
group.</p>
|
3917
|
+
|
3918
|
+
|
3919
|
+
</div>
|
3920
|
+
</div>
|
3921
|
+
<div class="tags">
|
3922
|
+
<p class="tag_title">Parameters:</p>
|
3923
|
+
<ul class="param">
|
3924
|
+
|
3925
|
+
<li>
|
3926
|
+
|
3927
|
+
<span class='name'>ids</span>
|
3928
|
+
|
3929
|
+
|
3930
|
+
<span class='type'>(<tt>String</tt>)</span>
|
3931
|
+
|
3932
|
+
|
3933
|
+
|
3934
|
+
</li>
|
3935
|
+
|
3936
|
+
<li>
|
3937
|
+
|
3938
|
+
<span class='name'>group_id</span>
|
3939
|
+
|
1243
3940
|
|
1244
|
-
<
|
1245
|
-
<span class="name">:q</span>
|
1246
|
-
<span class="type">(<tt>q</tt>)</span>
|
1247
|
-
<span class="default">
|
1248
|
-
|
1249
|
-
</span>
|
1250
|
-
|
1251
|
-
— <div class='inline'>
|
1252
|
-
<p>Query to filter result. For example q=”status=Active”</p>
|
1253
|
-
</div>
|
1254
|
-
|
1255
|
-
</li>
|
3941
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1256
3942
|
|
1257
|
-
|
3943
|
+
|
3944
|
+
|
3945
|
+
</li>
|
1258
3946
|
|
3947
|
+
</ul>
|
1259
3948
|
|
1260
3949
|
|
1261
3950
|
<p class="tag_title">See Also:</p>
|
1262
3951
|
<ul class="see">
|
1263
3952
|
|
1264
|
-
<li><a href="https://documentation.wazuh.com/3.
|
3953
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-multiple-agents" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-multiple-agents">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-a-single-group-of-multiple-agents</a></li>
|
1265
3954
|
|
1266
3955
|
</ul>
|
1267
3956
|
|
@@ -1271,15 +3960,15 @@ the beginning to list in ascending or descending order.</p>
|
|
1271
3960
|
<pre class="lines">
|
1272
3961
|
|
1273
3962
|
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
3963
|
+
376
|
3964
|
+
377
|
3965
|
+
378</pre>
|
1277
3966
|
</td>
|
1278
3967
|
<td>
|
1279
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
3968
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 376</span>
|
1280
3969
|
|
1281
|
-
<span class='kw'>def</span> <span class='id identifier
|
1282
|
-
<span class='id identifier
|
3970
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_agents_of_group'>remove_agents_of_group</span><span class='lparen'>(</span><span class='id identifier rubyid_ids'>ids</span><span class='comma'>,</span> <span class='id identifier rubyid_groups'>groups</span><span class='rparen'>)</span>
|
3971
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/group/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>ids:</span> <span class='id identifier rubyid_ids'>ids</span><span class='rbrace'>}</span>
|
1283
3972
|
<span class='kw'>end</span></pre>
|
1284
3973
|
</td>
|
1285
3974
|
</tr>
|
@@ -1287,9 +3976,9 @@ the beginning to list in ascending or descending order.</p>
|
|
1287
3976
|
</div>
|
1288
3977
|
|
1289
3978
|
<div class="method_details ">
|
1290
|
-
<h3 class="signature " id="
|
3979
|
+
<h3 class="signature " id="remove_all_agent_of_group-instance_method">
|
1291
3980
|
|
1292
|
-
#<strong>
|
3981
|
+
#<strong>remove_all_agent_of_group</strong>(agent_id) ⇒ <tt>Object</tt>
|
1293
3982
|
|
1294
3983
|
|
1295
3984
|
|
@@ -1298,7 +3987,8 @@ the beginning to list in ascending or descending order.</p>
|
|
1298
3987
|
</h3><div class="docstring">
|
1299
3988
|
<div class="discussion">
|
1300
3989
|
|
1301
|
-
<p>
|
3990
|
+
<p>Remove all agent groups. Removes the group of the agent. The agent will
|
3991
|
+
automatically revert to the ‘default’ group.</p>
|
1302
3992
|
|
1303
3993
|
|
1304
3994
|
</div>
|
@@ -1309,101 +3999,24 @@ the beginning to list in ascending or descending order.</p>
|
|
1309
3999
|
|
1310
4000
|
<li>
|
1311
4001
|
|
1312
|
-
<span class='name'>
|
1313
|
-
|
1314
|
-
|
1315
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
4002
|
+
<span class='name'>agent_id</span>
|
1316
4003
|
|
1317
4004
|
|
1318
|
-
<
|
4005
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1319
4006
|
|
1320
4007
|
|
1321
|
-
—
|
1322
|
-
<div class='inline'>
|
1323
|
-
<p>a customizable set of options</p>
|
1324
|
-
</div>
|
1325
4008
|
|
1326
4009
|
</li>
|
1327
4010
|
|
1328
4011
|
</ul>
|
1329
4012
|
|
1330
|
-
|
4013
|
+
|
4014
|
+
<p class="tag_title">See Also:</p>
|
4015
|
+
<ul class="see">
|
1331
4016
|
|
4017
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-all-agent-groups" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-all-agent-groups">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-all-agent-groups</a></li>
|
1332
4018
|
|
1333
|
-
|
1334
|
-
<ul class="option">
|
1335
|
-
|
1336
|
-
<li>
|
1337
|
-
<span class="name">:name</span>
|
1338
|
-
<span class="type">(<tt>name</tt>)</span>
|
1339
|
-
<span class="default">
|
1340
|
-
|
1341
|
-
</span>
|
1342
|
-
|
1343
|
-
— <div class='inline'>
|
1344
|
-
<p>Name to agent</p>
|
1345
|
-
</div>
|
1346
|
-
|
1347
|
-
</li>
|
1348
|
-
|
1349
|
-
<li>
|
1350
|
-
<span class="name">:ip</span>
|
1351
|
-
<span class="type">(<tt>ip</tt>)</span>
|
1352
|
-
<span class="default">
|
1353
|
-
|
1354
|
-
</span>
|
1355
|
-
|
1356
|
-
— <div class='inline'>
|
1357
|
-
<p>If this is not included, the API will get the IP automatically. If you are
|
1358
|
-
behind a proxy, you must set the option config.BehindProxyServer to yes at
|
1359
|
-
config.js. Allowed values: IP, IP/NET, ANY</p>
|
1360
|
-
</div>
|
1361
|
-
|
1362
|
-
</li>
|
1363
|
-
|
1364
|
-
<li>
|
1365
|
-
<span class="name">:id</span>
|
1366
|
-
<span class="type">(<tt>id</tt>)</span>
|
1367
|
-
<span class="default">
|
1368
|
-
|
1369
|
-
</span>
|
1370
|
-
|
1371
|
-
— <div class='inline'>
|
1372
|
-
<p>ID to agent</p>
|
1373
|
-
</div>
|
1374
|
-
|
1375
|
-
</li>
|
1376
|
-
|
1377
|
-
<li>
|
1378
|
-
<span class="name">:key</span>
|
1379
|
-
<span class="type">(<tt>key</tt>)</span>
|
1380
|
-
<span class="default">
|
1381
|
-
|
1382
|
-
</span>
|
1383
|
-
|
1384
|
-
— <div class='inline'>
|
1385
|
-
<p>Agent key. Minimum length: 64 characters. Allowed values: ^[a-zA-Z0-9]+$</p>
|
1386
|
-
</div>
|
1387
|
-
|
1388
|
-
</li>
|
1389
|
-
|
1390
|
-
<li>
|
1391
|
-
<span class="name">:force</span>
|
1392
|
-
<span class="type">(<tt>force</tt>)</span>
|
1393
|
-
<span class="default">
|
1394
|
-
|
1395
|
-
</span>
|
1396
|
-
|
1397
|
-
— <div class='inline'>
|
1398
|
-
<p>Remove the old agent the with same IP if disconnected since <force>
|
1399
|
-
seconds.</p>
|
1400
|
-
</div>
|
1401
|
-
|
1402
|
-
</li>
|
1403
|
-
|
1404
|
-
</ul>
|
1405
|
-
|
1406
|
-
|
4019
|
+
</ul>
|
1407
4020
|
|
1408
4021
|
</div><table class="source_code">
|
1409
4022
|
<tr>
|
@@ -1411,15 +4024,15 @@ seconds.</p>
|
|
1411
4024
|
<pre class="lines">
|
1412
4025
|
|
1413
4026
|
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
4027
|
+
385
|
4028
|
+
386
|
4029
|
+
387</pre>
|
1417
4030
|
</td>
|
1418
4031
|
<td>
|
1419
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4032
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 385</span>
|
1420
4033
|
|
1421
|
-
<span class='kw'>def</span> <span class='id identifier
|
1422
|
-
<span class='id identifier
|
4034
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_all_agent_of_group'>remove_all_agent_of_group</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='rparen'>)</span>
|
4035
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/group</span><span class='tstring_end'>"</span></span>
|
1423
4036
|
<span class='kw'>end</span></pre>
|
1424
4037
|
</td>
|
1425
4038
|
</tr>
|
@@ -1427,9 +4040,9 @@ seconds.</p>
|
|
1427
4040
|
</div>
|
1428
4041
|
|
1429
4042
|
<div class="method_details ">
|
1430
|
-
<h3 class="signature " id="
|
4043
|
+
<h3 class="signature " id="remove_group-instance_method">
|
1431
4044
|
|
1432
|
-
#<strong>
|
4045
|
+
#<strong>remove_group</strong>(group_id) ⇒ <tt>Object</tt>
|
1433
4046
|
|
1434
4047
|
|
1435
4048
|
|
@@ -1438,7 +4051,8 @@ seconds.</p>
|
|
1438
4051
|
</h3><div class="docstring">
|
1439
4052
|
<div class="discussion">
|
1440
4053
|
|
1441
|
-
<p>
|
4054
|
+
<p>Remove group Removes the group. Agents that were assigned to the removed
|
4055
|
+
group will automatically revert to the ‘default’ group.</p>
|
1442
4056
|
|
1443
4057
|
|
1444
4058
|
</div>
|
@@ -1449,91 +4063,22 @@ seconds.</p>
|
|
1449
4063
|
|
1450
4064
|
<li>
|
1451
4065
|
|
1452
|
-
<span class='name'>
|
1453
|
-
|
1454
|
-
|
1455
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
4066
|
+
<span class='name'>group_id</span>
|
1456
4067
|
|
1457
4068
|
|
1458
|
-
<
|
4069
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1459
4070
|
|
1460
4071
|
|
1461
|
-
—
|
1462
|
-
<div class='inline'>
|
1463
|
-
<p>a customizable set of options</p>
|
1464
|
-
</div>
|
1465
4072
|
|
1466
4073
|
</li>
|
1467
4074
|
|
1468
4075
|
</ul>
|
1469
4076
|
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
1474
|
-
<ul class="option">
|
1475
|
-
|
1476
|
-
<li>
|
1477
|
-
<span class="name">:offset</span>
|
1478
|
-
<span class="type">(<tt>offset</tt>)</span>
|
1479
|
-
<span class="default">
|
1480
|
-
|
1481
|
-
</span>
|
1482
|
-
|
1483
|
-
— <div class='inline'>
|
1484
|
-
<p>First element to return in the collection.</p>
|
1485
|
-
</div>
|
1486
|
-
|
1487
|
-
</li>
|
1488
|
-
|
1489
|
-
<li>
|
1490
|
-
<span class="name">:limit</span>
|
1491
|
-
<span class="type">(<tt>limit</tt>)</span>
|
1492
|
-
<span class="default">
|
1493
|
-
|
1494
|
-
</span>
|
1495
|
-
|
1496
|
-
— <div class='inline'>
|
1497
|
-
<p>Maximum number of elements to return.</p>
|
1498
|
-
</div>
|
1499
|
-
|
1500
|
-
</li>
|
1501
|
-
|
1502
|
-
<li>
|
1503
|
-
<span class="name">:sort</span>
|
1504
|
-
<span class="type">(<tt>sort</tt>)</span>
|
1505
|
-
<span class="default">
|
1506
|
-
|
1507
|
-
</span>
|
1508
|
-
|
1509
|
-
— <div class='inline'>
|
1510
|
-
<p>Sorts the collection by a field or fields (separated by comma). Use +/- at
|
1511
|
-
the beginning to list in ascending or descending order.</p>
|
1512
|
-
</div>
|
1513
|
-
|
1514
|
-
</li>
|
1515
|
-
|
1516
|
-
<li>
|
1517
|
-
<span class="name">:q</span>
|
1518
|
-
<span class="type">(<tt>q</tt>)</span>
|
1519
|
-
<span class="default">
|
1520
|
-
|
1521
|
-
</span>
|
1522
|
-
|
1523
|
-
— <div class='inline'>
|
1524
|
-
<p>Query to filter result. For example q=”status=Active”</p>
|
1525
|
-
</div>
|
1526
|
-
|
1527
|
-
</li>
|
1528
|
-
|
1529
|
-
</ul>
|
1530
|
-
|
1531
|
-
|
1532
4077
|
|
1533
4078
|
<p class="tag_title">See Also:</p>
|
1534
4079
|
<ul class="see">
|
1535
4080
|
|
1536
|
-
<li><a href="https://documentation.wazuh.com/3.
|
4081
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#remove-group</a></li>
|
1537
4082
|
|
1538
4083
|
</ul>
|
1539
4084
|
|
@@ -1543,15 +4088,15 @@ the beginning to list in ascending or descending order.</p>
|
|
1543
4088
|
<pre class="lines">
|
1544
4089
|
|
1545
4090
|
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
4091
|
+
394
|
4092
|
+
395
|
4093
|
+
396</pre>
|
1549
4094
|
</td>
|
1550
4095
|
<td>
|
1551
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4096
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 394</span>
|
1552
4097
|
|
1553
|
-
<span class='kw'>def</span> <span class='id identifier
|
1554
|
-
<span class='id identifier
|
4098
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_group'>remove_group</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='rparen'>)</span>
|
4099
|
+
<span class='id identifier rubyid_delete'>delete</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/groups/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_group_id'>group_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1555
4100
|
<span class='kw'>end</span></pre>
|
1556
4101
|
</td>
|
1557
4102
|
</tr>
|
@@ -1635,12 +4180,12 @@ the beginning to list in ascending or descending order.</p>
|
|
1635
4180
|
<pre class="lines">
|
1636
4181
|
|
1637
4182
|
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
4183
|
+
70
|
4184
|
+
71
|
4185
|
+
72</pre>
|
1641
4186
|
</td>
|
1642
4187
|
<td>
|
1643
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4188
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 70</span>
|
1644
4189
|
|
1645
4190
|
<span class='kw'>def</span> <span class='id identifier rubyid_restart_agents'>restart_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1646
4191
|
<span class='id identifier rubyid_post'>post</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/restart</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
@@ -1676,12 +4221,12 @@ the beginning to list in ascending or descending order.</p>
|
|
1676
4221
|
<pre class="lines">
|
1677
4222
|
|
1678
4223
|
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
4224
|
+
76
|
4225
|
+
77
|
4226
|
+
78</pre>
|
1682
4227
|
</td>
|
1683
4228
|
<td>
|
1684
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4229
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 76</span>
|
1685
4230
|
|
1686
4231
|
<span class='kw'>def</span> <span class='id identifier rubyid_restart_all_agents'>restart_all_agents</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1687
4232
|
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/agents/restart</span><span class='tstring_end'>'</span></span>
|
@@ -1744,12 +4289,12 @@ the beginning to list in ascending or descending order.</p>
|
|
1744
4289
|
<pre class="lines">
|
1745
4290
|
|
1746
4291
|
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
4292
|
+
85
|
4293
|
+
86
|
4294
|
+
87</pre>
|
1750
4295
|
</td>
|
1751
4296
|
<td>
|
1752
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4297
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 85</span>
|
1753
4298
|
|
1754
4299
|
<span class='kw'>def</span> <span class='id identifier rubyid_restart_an_agents'>restart_an_agents</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1755
4300
|
<span class='id identifier rubyid_put'>put</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/restart</span><span class='tstring_end'>"</span></span>
|
@@ -1757,6 +4302,85 @@ the beginning to list in ascending or descending order.</p>
|
|
1757
4302
|
</td>
|
1758
4303
|
</tr>
|
1759
4304
|
</table>
|
4305
|
+
</div>
|
4306
|
+
|
4307
|
+
<div class="method_details ">
|
4308
|
+
<h3 class="signature " id="update_group_ossec_configuration-instance_method">
|
4309
|
+
|
4310
|
+
#<strong>update_group_ossec_configuration</strong>(group_id, config) ⇒ <tt>Object</tt>
|
4311
|
+
|
4312
|
+
|
4313
|
+
|
4314
|
+
|
4315
|
+
|
4316
|
+
</h3><div class="docstring">
|
4317
|
+
<div class="discussion">
|
4318
|
+
|
4319
|
+
<p>Put configuration file (agent.conf) into a group Upload the group
|
4320
|
+
configuration (agent.conf).</p>
|
4321
|
+
|
4322
|
+
|
4323
|
+
</div>
|
4324
|
+
</div>
|
4325
|
+
<div class="tags">
|
4326
|
+
<p class="tag_title">Parameters:</p>
|
4327
|
+
<ul class="param">
|
4328
|
+
|
4329
|
+
<li>
|
4330
|
+
|
4331
|
+
<span class='name'>group_id</span>
|
4332
|
+
|
4333
|
+
|
4334
|
+
<span class='type'>(<tt>String</tt>)</span>
|
4335
|
+
|
4336
|
+
|
4337
|
+
|
4338
|
+
</li>
|
4339
|
+
|
4340
|
+
<li>
|
4341
|
+
|
4342
|
+
<span class='name'>config</span>
|
4343
|
+
|
4344
|
+
|
4345
|
+
<span class='type'>(<tt>String</tt>)</span>
|
4346
|
+
|
4347
|
+
|
4348
|
+
|
4349
|
+
</li>
|
4350
|
+
|
4351
|
+
</ul>
|
4352
|
+
|
4353
|
+
|
4354
|
+
<p class="tag_title">See Also:</p>
|
4355
|
+
<ul class="see">
|
4356
|
+
|
4357
|
+
<li><a href="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#put-configuration-file-agent-conf-into-a-group" target="_parent" title="https://documentation.wazuh.com/3.11/user-manual/api/reference.html#put-configuration-file-agent-conf-into-a-group">https://documentation.wazuh.com/3.11/user-manual/api/reference.html#put-configuration-file-agent-conf-into-a-group</a></li>
|
4358
|
+
|
4359
|
+
</ul>
|
4360
|
+
|
4361
|
+
</div><table class="source_code">
|
4362
|
+
<tr>
|
4363
|
+
<td>
|
4364
|
+
<pre class="lines">
|
4365
|
+
|
4366
|
+
|
4367
|
+
354
|
4368
|
+
355
|
4369
|
+
356
|
4370
|
+
357
|
4371
|
+
358</pre>
|
4372
|
+
</td>
|
4373
|
+
<td>
|
4374
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 354</span>
|
4375
|
+
|
4376
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update_group_ossec_configuration'>update_group_ossec_configuration</span><span class='lparen'>(</span><span class='id identifier rubyid_group_id'>group_id</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
4377
|
+
<span class='comment'># post "/agents/groups/#{group_id}/configuration"
|
4378
|
+
</span> <span class='comment'># TODO : use Content-type: application/xml
|
4379
|
+
</span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>This method not yet implement</span><span class='tstring_end'>"</span></span>
|
4380
|
+
<span class='kw'>end</span></pre>
|
4381
|
+
</td>
|
4382
|
+
</tr>
|
4383
|
+
</table>
|
1760
4384
|
</div>
|
1761
4385
|
|
1762
4386
|
<div class="method_details ">
|
@@ -1847,12 +4471,12 @@ the beginning to list in ascending or descending order.</p>
|
|
1847
4471
|
<pre class="lines">
|
1848
4472
|
|
1849
4473
|
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
4474
|
+
131
|
4475
|
+
132
|
4476
|
+
133</pre>
|
1853
4477
|
</td>
|
1854
4478
|
<td>
|
1855
|
-
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line
|
4479
|
+
<pre class="code"><span class="info file"># File 'lib/wazuh/api/endpoints/agents.rb', line 131</span>
|
1856
4480
|
|
1857
4481
|
<span class='kw'>def</span> <span class='id identifier rubyid_upgrade_result_from_agent'>upgrade_result_from_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1858
4482
|
<span class='id identifier rubyid_get'>get</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/agents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_agent_id'>agent_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/upgrade_result</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
|
@@ -1867,7 +4491,7 @@ the beginning to list in ascending or descending order.</p>
|
|
1867
4491
|
</div>
|
1868
4492
|
|
1869
4493
|
<div id="footer">
|
1870
|
-
Generated on
|
4494
|
+
Generated on Tue Feb 18 20:12:28 2020 by
|
1871
4495
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1872
4496
|
0.9.16 (ruby-2.5.1).
|
1873
4497
|
</div>
|