JSON

Prev Next

The JSON adapter is able to import .json files with information about devices, users, or installed software.



The adapter parameters are as same as the CSV adapter parameters. Although the JSON adapter parameter list does not include the File contains installed software information field, the adapter is capable of importing installed software data, but since it has a dynamic structure (unlike CSV), it is not required to declare that.

The functionality of this adapter is as same as the CSV adapter.

In addition, the following connection parameters are available specifically for the JSON adapter:

  • File format is JSONL - Select this option to upload a file in JSONL format (JSON Lines). When you select this option, if you are uploading more than one files from an S3 directory, all files must have the same format (either JSON or JSONL).
  • JSON Path to fetched entities (Empty for top level) - Select this option to fetch assets that are not on the top level from the JSON file. Add the JSON path to the list of assets, for example: point1/point2/elements

JSON connection parameters

Example JSON File

Given the following JSON file with a single device:

[
    {
        "id": "device_example_id",
        "name": "asset_name_example",
        "hostname": "hostname_example",
        "list_example_field": [
            {
                "field1": "value1",
                "field2": "value2"
            }
        ],
        "installed_software": [
            {"swname": "softwar_example_123", "swversion": "v1.2.3.4.5.6.7.8.9.10"}
        ],
        "custom field example": "custom json example value",
        "custom numeric example field": 123
    }
]

The following JSON asset entity will be created:
image.png

image.png

Advanced Settings

Note:

Advanced settings can either apply for all connections for this adapter, or you can set different advanced settings and/or different scheduling for a specific connection. Refer to ​Advanced Configuration for Adapters.

  1. Use fetch time for Last Seen - Select this option to set that all entities (devices and users) fetched by this adapter have their Last Seen set to the time the entity was fetched (fetch_time).
  2. Do not add filename to entity IDs - By default Axonius adds the filename to the ID of the entities created by the CSV file (device ID etc). Select this option to not add the filename to the entity ID.
  3. Parse entity fields dynamically - This setting is enabled by default so that the adapter dynamically parses all of the fields of the entity fetched. Unselect to disable this setting.
  4. Custom Parsing - see below.

Custom Parsing

Enable this option to define how to parse specific fields from the raw data fetched. You can choose to parse the data into an already existing field, or create a new one. This can be set separately for each type of asset fetched by the adapter: devices or users.

JSONcustomparsing

Expand each asset type's Custom Parsing section to add fields. For each field, specify the following:

  • Field Title - Select a column title from the list. Note that you can also select nested fields of complex fields, for example: Network Interfaces:Ips.
  • Raw Path - The path to the field in the raw data, for example: my_path|my_sub_path
  • Type - Select a field type from the list: string, boolean, etc. Will be ignored for common fields.
  • Field Structure - Specify whether the filed is a single value or a list field. Will be ignored for common fields.
    Click + Add Field to add as many fields as you like, or x to delete the row.

AddField