Skip to main content
Skip table of contents

Get Current Artifact Types and Relationships

LAST UPDATED: AUG 07, 2024

This utility command is designed to return a JSON representation of all current artifact types within the D3 system, along with any existing relationships between these artifacts. This command is particularly useful for obtaining a comprehensive overview of the platform's data structure, including details about artifact types, their associated data model fields, and any defined relationships. The three parameters work as filters, and an AND relationship applies to them if more than one parameter is provided.

READER NOTE

This utility command is for 16.8+, if you are in a lower version, you may encounter limitations in accessing this command. Kindly reach out to D3 for assistance in obtaining access if such a situation arises.

Implementation

Python

Command Category

System Utility

Tags

ARITIFACT

Inputs

Parameter Name

Required/Optional

Description

Sample Data

Artifact Category

Optional

This parameter specifies the artifact category to filter the desired artifact category: user-defined, system, or empty for all types. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

System

Artifact Type ID

Optional

This parameter specifies the artifact type IDs to filter the desired artifact types. If left empty, all types of artifact will be retrieved by default. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

CODE
[15,16]

Artifact Type Name

Optional

This parameter specifies the artifact type names to filter the desired artifact types. If left empty, all types of artifact will be retrieved by default. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

CODE
["Username","Filename"]

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": [
        {
            "AFTypeId": *****,
            "AFTypeName": "Username",
            "Type": "System",
            "IdentityFields": {
                "General": [
                    {
                        "DataModelField": "Username",
                        "Role": "Username"
                    }
                ],
                "SourceSpecific": []
            },
            "AdditionalFields": [],
            "Relationships": []
        },
        {
            "AFTypeId": *****,
            "AFTypeName": "Filename",
            "Type": "System",
            "IdentityFields": {
                "General": [
                    {
                        "DataModelField": "Filename",
                        "Role": "Filename"
                    }
                ],
                "SourceSpecific": []
            },
            "AdditionalFields": [],
            "Relationships": []
        }
    ]
}

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

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": {
    "Artifact Category": <Artifact Category here>,
    "Artifact Type ID": <Artifact Type ID here>,
    "Artifact Type Name": <Artifact Type 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.

Artifact Category

string

Optional

This parameter specifies the artifact category to filter the desired artifact category: user-defined, system, or empty for all types. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

Artifact Type ID

array<integer>

Optional

This parameter specifies the artifact type IDs to filter the desired artifact types. If left empty, all types of artifact will be retrieved by default. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

Artifact Type Name

array<string>

Optional

This parameter specifies the artifact type names to filter the desired artifact types. If left empty, all types of artifact will be retrieved by default. This parameter works as a filter, and an AND relationship applies to "Artifact Category", "Artifact Type ID", and "Artifact Type Name" if they are provided.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "Artifact Category": "System Defined",
    "Artifact Type ID": [
      15,
      16
    ],
    "Artifact Type Name": [
      "Username",
      "Filename"
    ]
  }
}

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": [
            {
                "AFTypeId": 15,
                "AFTypeName": "Username",
                "Type": "System",
                "IdentityFields": {
                    "General": [
                        {
                            "DataModelField": "Username",
                            "Role": "Username"
                        }
                    ],
                    "SourceSpecific": []
                },
                "AdditionalFields": [],
                "Relationships": []
            },
            {
                "AFTypeId": 16,
                "AFTypeName": "Filename",
                "Type": "System",
                "IdentityFields": {
                    "General": [
                        {
                            "DataModelField": "Filename",
                            "Role": "Filename"
                        }
                    ],
                    "SourceSpecific": []
                },
                "AdditionalFields": [],
                "Relationships": []
            }
        ]
    }
}
JavaScript errors detected

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

If this problem persists, please contact our support.