Working with Tags

Tags in Aspera products are JSON (JavaScript Object Notation) strings. Console uses tags to identify transfers and to label Console-initiated transfers. You can find a specific transfer's tags by navigating to a transfer's Session Details page and selecting the Session ID link under the Session State column.

Tags are used in the following tasks:

The JSON Match Comparison Operator

Console includes a JSON match operator in the Custom Fields and Advanced Rulesets features, which provide a simple syntax for matching JSON formatted tags included in Aspera transfers. Below are examples of transfer tags in Console and Faspex transfers and instructions for matching them using the JSON match operator.

Console Transfers

A Console transfer is defined as any transfer initiated by Console using simple or smart transfers. Tags can be specified in both simple and smart transfers. A Console transfer tag is formatted in the following way:

{"aspera": 
  {"console": 
    {"user_specified" 
       {"key1":"val1", … , "key3":"val3"}
    }
  }
}
An example of a corresponding JSON match value is shown below:
[aspera][console][user_specified][key1]val1

Faspex Transfer

A Faspex Transfer is any transfer initiated by Faspex. A Faspex transfer tag is formatted in the following way:
{"aspera": 
  {"faspex": 
    { "key1":"val1", … , "key3":"val3"}
  }
}
The corresponding JSON match value is shown below:
[aspera][faspex][key1]val1
Note: It is recommended to use the Faspex Metadata filter for Faspex transfers instead. See Basic Report Example: Faspex Metadata for more information on Faspex Metadata.

Regular Expressions in JSON Matches

You can also use regular expressions in a JSON match. Define the regular expression using forward slashes ( / ) like in the example below:
[aspera][console][user_specified]/+./
Important: Aspera advises against using regular expressions in keys, because the result will be the first value that matches the regular expression. In the example below, Console will return the first Faspex transfer it hits without backtracking to check for other transfers that meet the requirements.
[aspera][faspex][/+./]/.+/