Skip to main content
Skip table of contents

Get Internal or External IP Addresses

Extracts a list of internal or external IP addresses from the input IP addresses

Implementation

System

Command Category

Cyber Utility

Tags

ARTIFACT IP

Inputs

Parameter Name

Required/Optional

Description

Sample Data

IP Addresses

Optional

The input list of IP addresses to extract from

CODE
[
    "10.10.1.1",
    "192.168.12.58",
    "172.17.12.58",
    "173.254.152.251",
    "45.32.76.84",
    "121.64.92.26"
]

IP Type

Optional

The type of IP addresses to get from the input list of IP addresses

Internal

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
[
    "10.10.1.1",
    "192.168.12.58",
    "172.17.12.58"
]

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

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": {
    "IP Addresses": <The input list of IP addresses to extract from>,
    "IP Type": <The type of IP addresses to get from the input list of IP addresses>
  }
}

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.

IP Addresses

Text Array

Optional

The input list of IP addresses to extract from

IP Type

Text

Optional

The type of IP addresses to get from the input list of IP addresses

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "IP Addresses": [
      "10.10.1.1",
      "192.168.12.58",
      "172.17.12.58",
      "173.254.152.251",
      "45.32.76.84",
      "121.64.92.26"
    ],
    "IP Type": "Internal"
  }
}

Response

Response Fields

Field Name

Type

Description

error

Text

The error message if the API request has failed.

returnData

Text Array

The return data from the API request.

Sample Response

JSON
{
    "error": "",
    "keyFields": "",
    "returnData": [
    "10.10.1.1",
    "192.168.12.58",
    "172.17.12.58"
  ]
}
JavaScript errors detected

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

If this problem persists, please contact our support.