Update Global List
LAST UPDATED: AUG 08, 2024
Updates an object in the specified global list via a key-value pair.
READER NOTE
Only the key and value of a top-level property within a second-level JSON object are valid.
If an incorrect key or value is provided (data type or literal value), users will still receive a response – one that includes identical old and new lists in the context data.
CAUTION
When multiple properties are present within a single JSON object, specifying the key and value for one property will cause the entire object to be replaced upon command execution.
Implementation | System |
Command Category | System Utility |
Tags | GLOBAL LIST |
Inputs
Parameter Name | Required/Optional | Description | Sample Data |
---|---|---|---|
Global List Name | Required | The name of the global list. | demoGlobalList |
Key | Required | The key of a JSON object property. Used in conjunction with the Value to determine matching object(s). | ipAddress |
Value | Required | The value associated with the selected key. Used in conjunction with the Key to determine matching object(s). | 192.168.1.01 |
Object | Required | The new object that replaces all matching second-level objects in the global list. |
CODE
|
Output
Remote Command API
The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.
Request
POST
https:/{base_url}/{api_namespace}/api/Command/UpdateGlobalList
Headers
Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.
Request Body
{
"Username": "<Username here>",
"Site": "<Site here>",
"CommandParams": {
"Global List Name": "<Global List Name here>",
"Key": "<Key here>",
"Value": "<Value here>",
"Object": "<Object here>"
}
}
Body Parameters
Parameter Name | Type | Required/Optional | Description |
---|---|---|---|
Username |
| Required | The username of your D3 SOAR account. |
Site |
| Required | The D3 SOAR site to run the remote command. |
Global List Name |
| Required | The name of the global list. |
Key |
| Required | The key to match in existing global list content. |
Value |
| Required | The value to match in existing global list content. |
Object |
| Required | The object used to replace the matched objects in the global list content. |
Sample Request
SAMPLE DATA
{
"Username": "Admin",
"Site": "Security Operations",
"CommandParams": {
"Global List Name": "demoGlobalList",
"Key": "ipAddress",
"Value": "192.168.1.01",
"Object": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
}
Response
Response Fields
Field Name | Type | Description |
---|---|---|
result |
| The HTML table representation of the adjusted global list. |
error |
| The error message if the API request has failed. |
returnData |
| The return data from the API request. |
contextData |
| The context data from the API request. |
Sample Response
{
"result": "<table class='cc-table'><tr><th>ipAddress</th><th>key1</th><th>key2</th><th>key3</th></tr><tr><td>192.168.1.02</td><td> </td><td> </td><td> </td></tr><tr><td> </td><td>value1</td><td>value2</td><td>value3</td></tr></table>",
"error": "",
"returnData": "Succeed",
"contextData": {
"OldList": [
{
"ipAddress": "192.168.1.01"
},
{
"ipAddress": "192.168.1.02"
}
],
"NewList": [
{
"ipAddress": "192.168.1.02"
},
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
]
}
}