---
title: "Custom Asset Upload"
slug: "custom-asset-csv"
tags: ["assets"]
updated: 2021-05-31T15:58:46Z
published: 2021-05-31T15:58:46Z
canonical: "help.nucleussec.com/custom-asset-csv"
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.nucleussec.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Asset Upload

Nucleus supports the ability to upload files containing asset data through the manual file upload utility (Import Scans > From File) or via the API. Uploading an asset file allows you to import results from other systems and to populate group information or other asset metadata which the vulnerability scanning tools don't support.

Please check out our asset inventory connectors for a more automated process of syncing asset data to your Nucleus console!

## File Type Support

We support the following file types:

1. CSV ([sample CSV file](https://www.nucleussec.com/wp-content/uploads/2020/04/nucleus_asset_csv_sample.csv))
2. JSON
3. XML

## Upload the Scan

To upload a custom scan, you need to follow these steps:

1. Navigate to Scans > Import via File.
2. Drag and Drop your asset csv file into the file import popup.

Your file will be uploaded and ingested as if it were a scan type from any tool.

## Asset File Requirements

We require the following column headers in the Asset CSV upload in order to be created/updated in Nucleus.

### Important fields:

| Field | Info |
| --- | --- |
| nucleus_import_version | This needs to be set to '1' without the quotation marks |
| host_name or ip_address | This will determine the asset name in Nucleus. It can be an application name or a server or web site. |
| scan_type | This value needs to be set to "Host" for network based assets and "Application" when populating data for applications |
| scan_tool | This value needs to be set to "Asset" for all asset-only uploads |

### All Fields

| Name | Description | Accepted Values/Format | Required? |
| --- | --- | --- | --- |
| nucleus_import_version | The version of the import api to use. | 1 (There is only 1 version of the api at this time) | Yes |
| scan_tool | Scan tool used when displaying the tool in the application. This should be consistent across scan imports. | NA | Yes |
| scan_type | For scan type on asset uploads, enter the type of asset being uploaded. | Host/Application/Container Image/Container/Database | Yes |
| asset_name | Name of the host or base URL that was scanned. | String | Either this or ip_address must be included for each host |
| ip_address | IP address for the host or web service scanned. | x.x.x.x | Either this or asset_name must be included for each host |
| **asset_info*** (used for additional metadata) | The custom metadata as an array of key: value pairs which Nucleus maps to [custom asset fields](/v1/docs/custom-asset-metadata) for the asset | Depends on the file type of upload. For JSON: `{ "customfield": "customfield_value", "customfield2": customfield_value" }` For CSV, use a semicolon separated list of key:value pairs in the cell for asset_info: `customfield:value;customfield2:value2` | No |
| host_users | Asset owners | List of strings. For csv, denote with ";" as the separator (eg "user1;user2" | No |
| host_fqdn | FQDN for scanned host. | String | No |
| mac_address | MAC address for scanned host. | String | No |
| operating_system_name | OS Name for scanned host. | String | No |
| operating_system_version | OS Version for scanned host. | String | No |
| asset_notes | Notes for scanned host. | String field | No |
| asset_criticality | Critcality for scanned host. | String field with options: "Critical", "High", "Moderate", "Low" | No |
| asset_location | Asset location for scanned host. | String | No |
| asset_groups | This is a list of all the groups that this asset is in | For CSV, use a semicolon separated string (user1;user2). All groups should start with a double tilde "~~" or forward slash "/". Use double tildes or slashes to denote nesting. `Pro Tip: don't put spaces between the end of a parent group and the beginning of the nested group`. For JSON, use an array of JSON object | No |

## Sample File Types

Nucleus recommends the csv file type, but also supports json or XML asset uploads

Below is an example of these files.

### Example CSV file format

```
nucleus_import_version,host_name,ip_address,host_fqdn,scan_type,scan_tool,asset_groups,host_location,host_criticality,host_notes,operating_system_version,operating_system_name,mac_address,host_users,asset_info
1,hostname1,192.168.1.1,,Host,Asset,,,,,,,customfield:value;customfield2:value
1,hostname2,192.168.1.2,,Host,Asset,/parentGroup1;/parentGroup2/subGroup,,,,,,
```

### Example JSON

```
{
 "nucleus_import_version": "1",
 "scan_date": "2018-10-10 11:12:13",
 "scan_type": "Host",
 "scan_tool": "Asset",
 "assets": [
  {
   "host_name": "hostname1",
   "ip_address": "192.168.1.1",
   "asset_fqdn": "hostname1.domain.com",
   "asset_info": {
        "DemoKey1": "DemoValue1",
        "DemoKey2": "DemoValue2"
   },
   "host_users": ["user1", "user2"],
   "asset_groups": [
       "/ParentGroup1",
       "/ParentGroup2/subGroup1"
       ]
   }
 ]
}
```
