Skip to main content
Skip table of contents

Set Playbook Command Data

This command can only be executed within an event/incident playbook. It allows for the update of any fields during playbook runtime using JSONPath.

Reader Note

Please note that this command is only applicable within an event Playbook.

Implementation

System

Command Category

System Utility

Tags

PLAYBOOK

Inputs

Parameter Name

Required/Optional

Description

Sample Data

Destination Field

Optional

The destination field of a playbook command to set the data

Return Data

Destination JSON Path

Optional

The JSON Path to an inner field in the selected destination field

$

Data

Optional

The data to be set to the destination field of a playbook command

CODE
{
    "artifactType": "internalIP",
    "artifactValue": "192.168.1.1"
}

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
true

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/SetPlaybookData

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": {
    "Destination Field": <Destination Field here>,
    "Destination JSON Path": <Destination JSON Path here>,
    "Data": <Data here>
  }
}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

Text

Optional

The username of your D3 SOAR account.

Site

Text

Optional

The name of the site in which the cases are

Destination Field

Text

Optional

The destination field of a playbook command to set the data

Destination JSON Path

Text

Optional

The JSON Path to an inner field in the selected destination field

Data

Unknown

Optional

The data to be set to the destination field of a playbook command

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "Destination Field": "Return Data",
    "Destination JSON Path": "$",
    "Data": {
      "artifactType": "internalIP",
      "artifactValue": "192.168.1.1"
    }
  }
}

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.

Sample Response

JSON
{
    "error":"",
    "returnData": "true"
}
JavaScript errors detected

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

If this problem persists, please contact our support.