Context path:

Path Parameters Return values Description
/login String: usrID (NA for error) A folder named by usrID
/upload/{usrID} file: file (provided by file uploader) String: Success or Fail Upload file to the user folder
/download/{usrID}/{fileName} APPLICATION_OCTET_STREAM Download the file from user folder
/plot/{usrID} String plotName, String color String: plotName (or NA for error). Generate an example plot with two parameters

API Tests

Server setup:

The server folder path is /home/glassfish/user-data Inside the folder, there is a test folder (or usrID): internal_test_usrdir

Test procedures

  1. Login to create the usrID: # now we assume internal_test_usrdir is the returned value
  2. Upload a file to the use folder (need to use a File Upload form in order to submit both usrID and file)
    Test here showing how to supply path ( and file component
  3. Call R PlotTestImage function:
  4. Download the image file: