Skip to main content
Skip table of contents

Get Playbook Tasks Metadata

LAST UPDATED: AUG 12, 2024

Retrieves the metadata for all tasks within the most recently submitted (live) version of a playbook.

READER NOTE

This utility command is intended for version 16.8 and above. If you are using a lower version, you may experience limitations in accessing this command. Reach out to D3 to gain access.

Implementation

Python

Command Category

System Utility

Tags

N/A

Inputs

Parameter Name

Required/Optional

Description

Sample Data

Playbook Type

Required

The playbook type. The options are:

  • Event Playbook

  • Incident Playbook

  • Integration Codeless Playbook

  • Utility Codeless Playbook

Incident Playbook

Playbook Name

Required

The name of the playbook from which the task metadata will be retrieved.

demoPlaybook

Integration Name

Option

Required if the codeless playbook is an Integration Codeless Playbook.

AbuseIPDB

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
{
    "Status": "Successful",
    "Data": [
        {
            "TaskId": 80190,
            "TaskName": "demoCommandTask",
            "TaskType": "CommandTask",
            "IsActive": true,
            "IsNestedPlaybookTask": false,
            "Setting": {
                "Command": "",
                "CommandId": -1,
                "InputParameters": [],
                "Active": true,
                "AutoRun": false,
                "Required": false,
                "LongRun": false,
                "AssignedTo": "Investigator",
                "DueTime": "1 Hour(s)",
                "RunMode": "Wait for Any, Run Always",
                "Description": "",
                "StopOnError": false,
                "ErrorTrigger": true
            }
        },
        {
            "TaskId": 80191,
            "TaskName": "demoCommandTask2",
            "TaskType": "CommandTask",
            "IsActive": true,
            "IsNestedPlaybookTask": false,
            "Setting": {
                "Command": "",
                "CommandId": -1,
                "InputParameters": [],
                "Active": true,
                "AutoRun": false,
                "Required": false,
                "LongRun": false,
                "AssignedTo": "Investigator",
                "DueTime": "1 Hour(s)",
                "RunMode": "Wait for Any, Run Always",
                "Description": "",
                "StopOnError": false,
                "ErrorTrigger": true
            }
        },
        {
            "TaskId": 80192,
            "TaskName": "demoCommandTask3",
            "TaskType": "CommandTask",
            "IsActive": true,
            "IsNestedPlaybookTask": false,
            "Setting": {
                "Command": "",
                "CommandId": -1,
                "InputParameters": [],
                "Active": true,
                "AutoRun": false,
                "Required": false,
                "LongRun": false,
                "AssignedTo": "Investigator",
                "DueTime": "1 Hour(s)",
                "RunMode": "Wait for Any, Run Always",
                "Description": "",
                "StopOnError": false,
                "ErrorTrigger": 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/GetPlaybookTasksMetadata

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": {
    "Playbook Type": <Playbook Type here>,
    "Playbook Name": <Playbook Name here>,
    "Integration Name": <Integration Name 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.

Playbook Type

string

Required

The playbook type. The options are:

  • Event Playbook

  • Incident Playbook

  • Integration Codeless Playbook

  • Utility Codeless Playbook

Playbook Name

string

Required

The name of the playbook from which the task metadata will be retrieved.

Integration Name

string

Optional

Required if the codeless playbook is an Integration Codeless Playbook.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "Playbook Type": "Incident Playbook",
    "Playbook Name": "PlaybookName"
  }
}

Response

Response Fields

Field Name

Type

Description

error

string

The error message if the API request has failed.

returnData

JSON Object

The return data from the API request.

Sample Response

JSON
{
    "error": "",
    "returnData": {
        "Status": "Successful",
        "Data": [
            {
                "TaskId": 80190,
                "TaskName": "demoCommandTask",
                "TaskType": "CommandTask",
                "IsActive": true,
                "IsNestedPlaybookTask": false,
                "Setting": {
                    "Command": "",
                    "CommandId": -1,
                    "InputParameters": [],
                    "Active": true,
                    "AutoRun": false,
                    "Required": false,
                    "LongRun": false,
                    "AssignedTo": "Investigator",
                    "DueTime": "1 Hour(s)",
                    "RunMode": "Wait for Any, Run Always",
                    "Description": "",
                    "StopOnError": false,
                    "ErrorTrigger": true
                }
            },
            {
                "TaskId": 80191,
                "TaskName": "demoCommandTask2",
                "TaskType": "CommandTask",
                "IsActive": true,
                "IsNestedPlaybookTask": false,
                "Setting": {
                    "Command": "",
                    "CommandId": -1,
                    "InputParameters": [],
                    "Active": true,
                    "AutoRun": false,
                    "Required": false,
                    "LongRun": false,
                    "AssignedTo": "Investigator",
                    "DueTime": "1 Hour(s)",
                    "RunMode": "Wait for Any, Run Always",
                    "Description": "",
                    "StopOnError": false,
                    "ErrorTrigger": true
                }
            },
            {
                "TaskId": 80192,
                "TaskName": "demoCommandTask3",
                "TaskType": "CommandTask",
                "IsActive": true,
                "IsNestedPlaybookTask": false,
                "Setting": {
                    "Command": "",
                    "CommandId": -1,
                    "InputParameters": [],
                    "Active": true,
                    "AutoRun": false,
                    "Required": false,
                    "LongRun": false,
                    "AssignedTo": "Investigator",
                    "DueTime": "1 Hour(s)",
                    "RunMode": "Wait for Any, Run Always",
                    "Description": "",
                    "StopOnError": false,
                    "ErrorTrigger": true
                }
            }
        ]
    }
}
JavaScript errors detected

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

If this problem persists, please contact our support.