| Configure the Server from the Command Line |
85
4.
If you schedule validation at a file size threshold, set the threshold.
# asconfigurator -x
"set_user_data;user_name,
username
;validation_threshold_kb,
size
"
5.
Configure multi-threaded validation.
By default, inline validation is set to use 5 threads.
If the number of validation threads is not set to
1
, then multiple threads may perform different types
of validations for different (or the same) files at the same time. In such a situation, the response of
a
validation_file_stop
at the end of a file download might come before the response of a
validation_threshold
for the same file.
To set the number of validation threads, run the following command:
# asconfigurator -x
"set_user_data;user_name,
username
;validation_threads,
number
"
For more information about the configuration parameters, see
aspera.conf - Transfer Configuration
on page 42
(defining values in
aspera.conf
)
For more information on the output of your inline validation, see
Inline File Validation with URI
on page 85 or
Inline File Validation with Lua Script
on page 87.
Inline File Validation with URI
Inline file validation with URI can be customized to filter which files are validated.
Validation Requests and Returned Responses
During the inline validation process,
ascp
automatically generates a JSON-based request. The call is made with the
URL defined in
aspera.conf
. For example:
POST
URL
/validation/files HTTP/1.1
Content-type: application/json
The system then generates a JSON accepted or error response (
OK
or
Bad Request
). If a file validation fails, it
terminates the session with an error message from the URI.
•
Sample JSON accepted response:
The
"file_encryption"
field is only returned if server-side EAR is
present.
HTTP 200 OK
{
"id" : "1111-2222-333",
"file_encryption" : {
"passphrase" : "supersecret"
}
"aspera_response_object_name" : {
"startstop" : "start"
"xfer_id" : "AAAA-BBBB",
. . .
"file_csum" : "a1000abf882",
"file_csum_type" : "sha2-256"
}
}
•
Sample JSON error response:
HTTP 400 Bad Request