Skip to main content
Skip table of contents

Close Incidents in Bulk

LAST UPDATED: SEPT 11, 2024

Closes incidents via their incident numbers.

Implementation

System

Command Category

System Utility

Tags

INCIDENT

Inputs

Parameter Name

Required/Optional

Description

Sample Data

Incident Numbers

Required

The array of incident numbers for the incidents that are to be closed.

CODE
[
  "20210127-198",
  "20210127-197"
]

Bypass Required Pending Tasks

Required

Whether to proceed with closing the incidents, even if they still have pending tasks of Required task status.

Yes

Bypass All Required Fields

Optional

Whether to proceed with closing the incidents, even if one or more of their required dynamic fields (Activity or Info Activity marked as Required on Close) have not received a value.

Yes

Username

Required

The username of the user who is closing the incidents. This parameter will be used only when the task is automatically executed.

admin user

Conclusion

Optional

The message to append to the Conclusion section of the incident.

The incident was closed in bulk.

Output

Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
Successful
Context Data

The response data from the utility command.

SAMPLE DATA

JSON
[
    {
        "Incident Number": "20210127-198",
        "Status": "Closed",
        "Close Date": "01/27/2021 06:08 AM PST",
        "Result": "Successful",
        "Closed By": "admin user"
    },
    {
        "Incident Number": "20210127-197",
        "Status": "Closed",
        "Close Date": "01/27/2021 06:08 AM PST",
        "Result": "Successful",
        "Closed By": "admin user"
    }
]

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

CODE
https:/{base_url}/{api_namespace}/api/Command/CloseIncidentInBulk

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

JSON
{
  "Username": <Username here>,
  "Site": <Site here>,
  "CommandParams": {
    "Incident Numbers": <Incident Numbers here>,
    "Bypass Required Pending Tasks": <Bypass Required Pending Tasks here>,
    "Bypass All Required Fields": <Bypass All Required Fields here>,
    "Username": <Username here>,
    "Conclusion": <Conclusion here>
  }
}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

string

Required

The username of your D3 SOAR account.

Site

string

Required

The D3 SOAR site to run the remote command.

Incident Numbers

array<string>

Required

The array of incident numbers for the incidents that are to be closed.

Bypass Required Pending Tasks

boolean

Required

Whether to proceed with closing the incidents, even if they still have pending tasks of Required task status.

Bypass All Required Fields

boolean

Optional

Whether to proceed with closing the incidents, even if one or more of their required dynamic fields (Activity or Info Activity marked as Required on Close) have not received a value.

Username

string

Required

The username of the user who is closing the incidents. This parameter will be used only when the task is automatically executed.

Conclusion

string

Optional

The message to append to the Conclusion section of the incident.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "Incident Numbers": [
      "20210127-198",
      "20210127-197"
    ],
    "Bypass Required Pending Tasks": "Yes",
    "Bypass All Required Fields": "Yes",
    "Username": "admin user",
    "Conclusion": "The incident was closed in bulk."
  }
}

Response

Response Fields

Field Name

Type

Description

error

string

The error message if the API request has failed.

returnData

string

The return data from the API request.

contextData

array<JSON Object>

The context data from the API request.

Sample Response

JSON
{
    "result": "<table class='cc-table'> <tr> <th>Incident Number</th> <th>Status</th> <th>Close Date</th> <th>Closed By</th> <th>Result</th> </tr> <tr> <td>20210127-198</td> <td>Closed</td> <td>Jan 27, 2021 06:08 AM PST</td> <td>admin user</td> <td>Successful</td> </tr> <tr> <td>20210127-197</td> <td>Closed</td> <td>Jan 27, 2021 06:08 AM PST</td> <td>admin user</td> <td>Successful</td> </tr> </table>"
    "error": "",
    "returnData": "Successful",
    "contextData": [
        {
            "Incident Number": "20210127-198",
            "Status": "Closed",
            "Close Date": "01/27/2021 06:08 AM PST",
            "Result": "Successful",
            "Closed By": "admin user"
        },
        {
            "Incident Number": "20210127-197",
            "Status": "Closed",
            "Close Date": "01/27/2021 06:08 AM PST",
            "Result": "Successful",
            "Closed By": "admin user"
        }
    ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.