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
|
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
|
Output
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
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
{
"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 |
| Required | The username of your D3 SOAR account. |
Site |
| Required | The D3 SOAR site to run the remote command. |
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. |
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. |
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. |
Sample Request
SAMPLE DATA
{
"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 |
| The error message if the API request has failed. |
returnData |
| The return data from the API request. |
Sample Response
{
"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": []
}
]
}
}