Command Line Upload

As an alternative to the drag-and-drop web interface, it is possible to upload data from the command line. This guide shows how.

Example

For the impatient, here is an example that uses the Windows cmd command line to upload a zip file and processes it as Winston Lutz. Replace the green underlined portions with the appropriate values:

C:\Windows\System32\curl.exe --user MyUserId:MyPassword --form uploadFile=@Myfile.zip;type=application/zip https://automatedqualityassurance.org/run/WinstonLutz_8?Run=Run^AutoUpload=true

cURL

cURL is an open source command line program for uploading and downloading files. It comes pre-installed on Windows 10, Windows 11, Apple, and many Linux distributions. It may also be downloaded from its website.

Alternatives

HTTP operations can be done programmatically. Most programming languages (Python, C#, Java, C) have libraries for uploading files. There are other command line programs for uploading as well. Consult the relevant documentation for details.

Technical

The upload operation is an HTTP POST done as multipart/form data. Multiple files are handled by putting them into a zip file.

The following describe the parameters used.

  1. C:\Windows\System32\curl.exe : Explicitly specifies the full path of curl. On most systems curl is already on the PATH, so it's sufficient to just use curl.
  2. --user MyUserId:MyPassword : Specifies the AQA user name and password. Escape characters or quotes may be required if these contain special characters.
  3. --form : is curl's way of indicating that this is a POST operation in multipart/form format. POST is HTTT's way of indicating an upload, as opposed to the usual GET operation.
  4. uploadFile=@Myfile.zip;type=application/zip : Tells curl to read input from Myfile.zip and that the media type is zip.
  5. automatedqualityassurance.org : The base URL. Other installations of AQA will have a different URL.
  6. WinstonLutz_8 : Tells AQA to process this as a Winston Lutz data set. See table below for Phase2 and other types of processing.
  7. ?Run=Run : Tells AQA to do the equivalent of clicking the 'Run' button.
  8. ^&AutoUpload=true : Tells AQA that this is a programmatic upload verses being done via drag-and-drop in a web browser. The browser interface will show analysis progress and then results when finished, but that is not appropriate for programmatic uploads.
    Note that the carat ^ is the cmd escape character which tells cmd to interpret the & as a literal ampersand.

List of Procedures

Procedure Name Procedure Reference
Flood Field FloodField_11
Focal Spot FocalSpot_9
Gap Skew GapSkewRun_7
LOC LOC_2
LOC baseline LOCBaseline_1
Machine Log MachineLog_5
PSM PSM_10
Phase2 Phase2_4
Phase3 Phase3_6
Winston Lutz WinstonLutz_8

Processing

When a zip file is uploaded, AQA will do some quick checks to validate the data. These depend on which test is invoked, and may include checks such as:

After the upload completes, the curl command will return, and AQA will start processing the data. At this point another curl command can be run. When multiple data sets are received, AQA will queue them up and process them one at a time.

After the upload completes, the curl command will return and AQA will start processing the data.

The AQA platform is configured to operate within the confines of its resources. For that reason, it is recommended that uploads be done in succession one at a time. For example, if hundreds of uploads are to be done, a convenient approach is to put the commands into a single file, and as it is running go have lunch.