Reference: Built-In Fields for Custom Field Rules
Built-In Fields Available for Creating Custom Field Rules (for Transfer-Level Fields)
Transfer Field | Description |
---|---|
Client Address | IP address of transfer initiator. |
Client User | Client-side username. Null for all transfers, except for transfers initiated by the Console. |
Contact | Contact assigned by Console. This can be a Console user name, a Faspex Server user name, SSH account, or customized value obtained from a transfer cookie. Examples: "admin console", "aspera ssh", "aspera faspex". |
Cookie | Custom identifying text attached to a transfer session. This text is used by the Console to identify and name transfers. |
Destination Address | IP address of transfer destination (use for general purpose). |
Destination Path | The file path on the destination machine. |
Destination User | If upload, dest_user is the server user. If download, dest_user is client user (NULL, unless initiated from Console). For everyday purposes, recommend using contact field instead. |
Direction | The direction of the transfer from the perspective of the client. "Upload" if the transfer is a push; "Download" if the transfer is a pull. |
Meta-tags | JSON hash used to tag transfers with additional data. |
Faspex Metadata | Information provided by Faspex, encoded in the transfer cookie. See Basic Report Example: Faspex Metadata. |
Server Address | IP address of the server. |
Server User | SSH account specified when the transfer starts (should always be displayed). |
Source Address | IP address of transfer source. |
Source Paths | File paths on the source machine. |
Source User | If upload, source_user is the client user. If download, source_user is server user. |
Started Via | The name of the application (Aspera or custom) that is responsible for initiating the transfer (for example, aspera.scp, aspera.sync, etc.). |
Token | Security token used for the transfer (note that this depends on whether or not the application that started the transfer is configured to use tokens). |
Transfer Name | Human-readable name assigned to a transfer. This name may have been keyed in by the user or automatically set by an application. |
Built-In Fields Available for Creating Custom Field Rules (for File-Level Fields)
File Field Name | Description |
---|---|
File Bytes Transferred | Total bytes successfully received over the network. |
File Error Desc | Error message for the file, if any. |
File Extension | Portion of the filename after the last period (.) |
File Full Destination Path | File's full path from the destination's point-of-view. |
File Full Source Path | File's full path from the source's point-of-view. |
File Name | Name of the file, without its path (for example, "my_file.txt" rather than /tmp/my_file.txt) |
File Size | Size of the file in bytes. |
File Status | Status of transfer or file (for example, "running," "completed," "canceled" or "error"). |
Using Matchers in Custom Rules
You can use regular expression (Regex) and JSON matchers (except in fields that expect a number) to trigger a rule based on a particular phrase.
For example, you can use a Regex matcher to set a custom field named "engagement_id" to text the ID from an URL in a cookie:
- Built-in field: Cookie
- Operator: matching regular expression
- Expression: .*engagement\/(?<text>.+?)\/transferid
- "engagement_id" custom field value: <text>.
In other words, if the cookie matches the regular expression, then set the custom field value to the value of <text>. So, if the cookie has the URL: https://example.com/customer_engagement/1234/transferid, the "engagement_id" custom field value is 1234.
- Built-in field: Faspex Metadata
- Operator: JSON match
- Expression: \{.*"Event":"(?<event>.+?)".*\)
- "faspex_event" custom field value: <event>.
In other words, if the Faspex Metadata JSON matches the expression, then set the custom field value to the value of <event>. So, if the Faspex metadata is {"Event":"Summer","_pkg_uuid":"abde20e28db24bfdb513c0a3de3bb8ff", "pkg_name":"test"...}, the "faspex_event" custom field's value is Summer.
Expression | Interpretation | Characters matched in the example |
---|---|---|
\{ | Finds a left curly bracket character | { |
.* | Followed by 0 or more characters until the next piece of the expression ("Event":") | |
"Event":" | Followed by the first match of the exact text "Event":" | "EVENT":" |
(?<event>.+?) | Followed by at least 1 character" (save these characters and call them <event>) | Summer |
" | Followed by a quotation mark | " |
.* | Followed by 0 or more characters until the next piece of the expression (\{) | ,"_pkg_uuid":"abde20e28db24bfdb513c0a3de3bb8ff", "pkg_name":"test"... |
\} | Followed by a right curly bracket character | } |