| 1 |
.. _splunk.es.splunk_notes_info_module: |
| 2 |
|
| 3 |
|
| 4 |
*************************** |
| 5 |
splunk.es.splunk_notes_info |
| 6 |
*************************** |
| 7 |
|
| 8 |
**Gather information about notes in Splunk Enterprise Security** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 5.1.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- This module allows for querying information about notes in Splunk Enterprise Security. |
| 21 |
- Notes can be queried from findings, investigations, or response plan tasks. |
| 22 |
- Use ``target_type`` to specify where to query notes from. |
| 23 |
- Query by ``note_id`` to fetch a specific note. |
| 24 |
- Use ``limit`` to control the maximum number of notes returned. |
| 25 |
- This module is read-only and does not make any changes. |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
Parameters |
| 31 |
---------- |
| 32 |
|
| 33 |
.. raw:: html |
| 34 |
|
| 35 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 36 |
<tr> |
| 37 |
<th colspan="1">Parameter</th> |
| 38 |
<th>Choices/<font color="blue">Defaults</font></th> |
| 39 |
<th width="100%">Comments</th> |
| 40 |
</tr> |
| 41 |
<tr> |
| 42 |
<td colspan="1"> |
| 43 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 44 |
<b>api_app</b> |
| 45 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 46 |
<div style="font-size: small"> |
| 47 |
<span style="color: purple">string</span> |
| 48 |
</div> |
| 49 |
</td> |
| 50 |
<td> |
| 51 |
<b>Default:</b><br/><div style="color: blue">"missioncontrol"</div> |
| 52 |
</td> |
| 53 |
<td> |
| 54 |
<div>The app portion of the Splunk API path.</div> |
| 55 |
<div>Override this if your environment uses a different app name.</div> |
| 56 |
</td> |
| 57 |
</tr> |
| 58 |
<tr> |
| 59 |
<td colspan="1"> |
| 60 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 61 |
<b>api_namespace</b> |
| 62 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 63 |
<div style="font-size: small"> |
| 64 |
<span style="color: purple">string</span> |
| 65 |
</div> |
| 66 |
</td> |
| 67 |
<td> |
| 68 |
<b>Default:</b><br/><div style="color: blue">"servicesNS"</div> |
| 69 |
</td> |
| 70 |
<td> |
| 71 |
<div>The namespace portion of the Splunk API path.</div> |
| 72 |
<div>Override this if your environment uses a different namespace.</div> |
| 73 |
</td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td colspan="1"> |
| 77 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 78 |
<b>api_user</b> |
| 79 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 80 |
<div style="font-size: small"> |
| 81 |
<span style="color: purple">string</span> |
| 82 |
</div> |
| 83 |
</td> |
| 84 |
<td> |
| 85 |
<b>Default:</b><br/><div style="color: blue">"nobody"</div> |
| 86 |
</td> |
| 87 |
<td> |
| 88 |
<div>The user portion of the Splunk API path.</div> |
| 89 |
<div>Override this if your environment requires a different user context.</div> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
<tr> |
| 93 |
<td colspan="1"> |
| 94 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 95 |
<b>finding_ref_id</b> |
| 96 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 97 |
<div style="font-size: small"> |
| 98 |
<span style="color: purple">string</span> |
| 99 |
</div> |
| 100 |
</td> |
| 101 |
<td> |
| 102 |
</td> |
| 103 |
<td> |
| 104 |
<div>The reference ID of the finding to query notes from.</div> |
| 105 |
<div>Required when <code>target_type=finding</code>.</div> |
| 106 |
<div>Format is typically <code>uuid@@notable@@time{timestamp}</code>.</div> |
| 107 |
<div>The <code>notable_time</code> query parameter is automatically extracted from this ID.</div> |
| 108 |
</td> |
| 109 |
</tr> |
| 110 |
<tr> |
| 111 |
<td colspan="1"> |
| 112 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 113 |
<b>investigation_ref_id</b> |
| 114 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 115 |
<div style="font-size: small"> |
| 116 |
<span style="color: purple">string</span> |
| 117 |
</div> |
| 118 |
</td> |
| 119 |
<td> |
| 120 |
</td> |
| 121 |
<td> |
| 122 |
<div>The investigation UUID.</div> |
| 123 |
<div>Required when <code>target_type=investigation</code> or <code>target_type=response_plan_task</code>.</div> |
| 124 |
</td> |
| 125 |
</tr> |
| 126 |
<tr> |
| 127 |
<td colspan="1"> |
| 128 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 129 |
<b>limit</b> |
| 130 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 131 |
<div style="font-size: small"> |
| 132 |
<span style="color: purple">integer</span> |
| 133 |
</div> |
| 134 |
</td> |
| 135 |
<td> |
| 136 |
<b>Default:</b><br/><div style="color: blue">100</div> |
| 137 |
</td> |
| 138 |
<td> |
| 139 |
<div>Maximum number of notes to return.</div> |
| 140 |
<div>Defaults to 100 if not specified.</div> |
| 141 |
<div>Ignored when <code>note_id</code> is provided.</div> |
| 142 |
</td> |
| 143 |
</tr> |
| 144 |
<tr> |
| 145 |
<td colspan="1"> |
| 146 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 147 |
<b>note_id</b> |
| 148 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 149 |
<div style="font-size: small"> |
| 150 |
<span style="color: purple">string</span> |
| 151 |
</div> |
| 152 |
</td> |
| 153 |
<td> |
| 154 |
</td> |
| 155 |
<td> |
| 156 |
<div>The ID of a specific note to retrieve.</div> |
| 157 |
<div>If specified, returns only the note with this ID.</div> |
| 158 |
<div>For <code>response_plan_task</code>, this enables direct API lookup.</div> |
| 159 |
<div>For <code>finding</code> and <code>investigation</code>, notes are fetched and filtered by ID.</div> |
| 160 |
</td> |
| 161 |
</tr> |
| 162 |
<tr> |
| 163 |
<td colspan="1"> |
| 164 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 165 |
<b>phase_id</b> |
| 166 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 167 |
<div style="font-size: small"> |
| 168 |
<span style="color: purple">string</span> |
| 169 |
</div> |
| 170 |
</td> |
| 171 |
<td> |
| 172 |
</td> |
| 173 |
<td> |
| 174 |
<div>The ID of the phase containing the task.</div> |
| 175 |
<div>Required when <code>target_type=response_plan_task</code>.</div> |
| 176 |
</td> |
| 177 |
</tr> |
| 178 |
<tr> |
| 179 |
<td colspan="1"> |
| 180 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 181 |
<b>response_plan_id</b> |
| 182 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 183 |
<div style="font-size: small"> |
| 184 |
<span style="color: purple">string</span> |
| 185 |
</div> |
| 186 |
</td> |
| 187 |
<td> |
| 188 |
</td> |
| 189 |
<td> |
| 190 |
<div>The ID of the applied response plan.</div> |
| 191 |
<div>Required when <code>target_type=response_plan_task</code>.</div> |
| 192 |
</td> |
| 193 |
</tr> |
| 194 |
<tr> |
| 195 |
<td colspan="1"> |
| 196 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 197 |
<b>target_type</b> |
| 198 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 199 |
<div style="font-size: small"> |
| 200 |
<span style="color: purple">string</span> |
| 201 |
/ <span style="color: red">required</span> |
| 202 |
</div> |
| 203 |
</td> |
| 204 |
<td> |
| 205 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 206 |
<li>finding</li> |
| 207 |
<li>investigation</li> |
| 208 |
<li>response_plan_task</li> |
| 209 |
</ul> |
| 210 |
</td> |
| 211 |
<td> |
| 212 |
<div>The type of object to query notes from.</div> |
| 213 |
<div>Use <code>finding</code> to query notes from a security finding.</div> |
| 214 |
<div>Use <code>investigation</code> to query notes from an investigation.</div> |
| 215 |
<div>Use <code>response_plan_task</code> to query notes from a task within an applied response plan.</div> |
| 216 |
</td> |
| 217 |
</tr> |
| 218 |
<tr> |
| 219 |
<td colspan="1"> |
| 220 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 221 |
<b>task_id</b> |
| 222 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 223 |
<div style="font-size: small"> |
| 224 |
<span style="color: purple">string</span> |
| 225 |
</div> |
| 226 |
</td> |
| 227 |
<td> |
| 228 |
</td> |
| 229 |
<td> |
| 230 |
<div>The ID of the task to query notes from.</div> |
| 231 |
<div>Required when <code>target_type=response_plan_task</code>.</div> |
| 232 |
</td> |
| 233 |
</tr> |
| 234 |
</table> |
| 235 |
<br/> |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
Examples |
| 241 |
-------- |
| 242 |
|
| 243 |
.. code-block:: yaml |
| 244 |
|
| 245 |
# Query all notes from a finding |
| 246 |
- name: Get all notes from a finding |
| 247 |
splunk.es.splunk_notes_info: |
| 248 |
target_type: finding |
| 249 |
finding_ref_id: "2008e99d-af14-4fec-89da-b9b17a81820a@@notable@@time1768225865" |
| 250 |
register: finding_notes |
| 251 |
|
| 252 |
- name: Display finding notes |
| 253 |
debug: |
| 254 |
var: finding_notes.notes |
| 255 |
|
| 256 |
# Query all notes from an investigation |
| 257 |
- name: Get all notes from an investigation |
| 258 |
splunk.es.splunk_notes_info: |
| 259 |
target_type: investigation |
| 260 |
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" |
| 261 |
register: investigation_notes |
| 262 |
|
| 263 |
# Query all notes from a response plan task |
| 264 |
- name: Get all notes from a response plan task |
| 265 |
splunk.es.splunk_notes_info: |
| 266 |
target_type: response_plan_task |
| 267 |
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" |
| 268 |
response_plan_id: "b9ef7dce-6dcd-4900-b5d5-982fc194554a" |
| 269 |
phase_id: "phase-001" |
| 270 |
task_id: "task-001" |
| 271 |
register: task_notes |
| 272 |
|
| 273 |
# Query a specific note by ID from a finding |
| 274 |
- name: Get specific note from a finding |
| 275 |
splunk.es.splunk_notes_info: |
| 276 |
target_type: finding |
| 277 |
finding_ref_id: "2008e99d-af14-4fec-89da-b9b17a81820a@@notable@@time1768225865" |
| 278 |
note_id: "note-abc123" |
| 279 |
register: specific_note |
| 280 |
|
| 281 |
# Query a specific note by ID from a response plan task |
| 282 |
- name: Get specific note from a response plan task |
| 283 |
splunk.es.splunk_notes_info: |
| 284 |
target_type: response_plan_task |
| 285 |
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" |
| 286 |
response_plan_id: "b9ef7dce-6dcd-4900-b5d5-982fc194554a" |
| 287 |
phase_id: "phase-001" |
| 288 |
task_id: "task-001" |
| 289 |
note_id: "note-xyz789" |
| 290 |
register: specific_task_note |
| 291 |
|
| 292 |
# Query notes with a custom limit |
| 293 |
- name: Get latest 10 notes from an investigation |
| 294 |
splunk.es.splunk_notes_info: |
| 295 |
target_type: investigation |
| 296 |
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" |
| 297 |
limit: 10 |
| 298 |
register: limited_notes |
| 299 |
|
| 300 |
# Query notes with custom API configuration |
| 301 |
- name: Get notes with custom API path |
| 302 |
splunk.es.splunk_notes_info: |
| 303 |
target_type: investigation |
| 304 |
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" |
| 305 |
api_namespace: "{{ es_namespace | default('servicesNS') }}" |
| 306 |
api_user: "{{ es_user | default('nobody') }}" |
| 307 |
api_app: "{{ es_app | default('missioncontrol') }}" |
| 308 |
register: custom_notes |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
Return Values |
| 313 |
------------- |
| 314 |
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: |
| 315 |
|
| 316 |
.. raw:: html |
| 317 |
|
| 318 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 319 |
<tr> |
| 320 |
<th colspan="2">Key</th> |
| 321 |
<th>Returned</th> |
| 322 |
<th width="100%">Description</th> |
| 323 |
</tr> |
| 324 |
<tr> |
| 325 |
<td colspan="2"> |
| 326 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 327 |
<b>changed</b> |
| 328 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 329 |
<div style="font-size: small"> |
| 330 |
<span style="color: purple">boolean</span> |
| 331 |
</div> |
| 332 |
</td> |
| 333 |
<td>always</td> |
| 334 |
<td> |
| 335 |
<div>Whether any changes were made. Always false for info modules.</div> |
| 336 |
<br/> |
| 337 |
</td> |
| 338 |
</tr> |
| 339 |
<tr> |
| 340 |
<td colspan="2"> |
| 341 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 342 |
<b>notes</b> |
| 343 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 344 |
<div style="font-size: small"> |
| 345 |
<span style="color: purple">list</span> |
| 346 |
/ <span style="color: purple">elements=dictionary</span> |
| 347 |
</div> |
| 348 |
</td> |
| 349 |
<td>always</td> |
| 350 |
<td> |
| 351 |
<div>List of notes matching the query.</div> |
| 352 |
<br/> |
| 353 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 354 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{'note_id': 'note-abc123', 'content': 'Initial investigation shows suspicious activity from external IP.'}, {'note_id': 'note-def456', 'content': 'Escalating to security team for further analysis.'}]</div> |
| 355 |
</td> |
| 356 |
</tr> |
| 357 |
<tr> |
| 358 |
<td class="elbow-placeholder"> </td> |
| 359 |
<td colspan="1"> |
| 360 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 361 |
<b>content</b> |
| 362 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 363 |
<div style="font-size: small"> |
| 364 |
<span style="color: purple">string</span> |
| 365 |
</div> |
| 366 |
</td> |
| 367 |
<td></td> |
| 368 |
<td> |
| 369 |
<div>The content/body of the note.</div> |
| 370 |
<br/> |
| 371 |
</td> |
| 372 |
</tr> |
| 373 |
<tr> |
| 374 |
<td class="elbow-placeholder"> </td> |
| 375 |
<td colspan="1"> |
| 376 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 377 |
<b>note_id</b> |
| 378 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 379 |
<div style="font-size: small"> |
| 380 |
<span style="color: purple">string</span> |
| 381 |
</div> |
| 382 |
</td> |
| 383 |
<td></td> |
| 384 |
<td> |
| 385 |
<div>The unique identifier of the note.</div> |
| 386 |
<br/> |
| 387 |
</td> |
| 388 |
</tr> |
| 389 |
|
| 390 |
</table> |
| 391 |
<br/><br/> |
| 392 |
|
| 393 |
|
| 394 |
Status |
| 395 |
------ |
| 396 |
|
| 397 |
|
| 398 |
Authors |
| 399 |
~~~~~~~ |
| 400 |
|
| 401 |
- Ron Gershburg (@rgershbu) |