Download the Output File

A REST request is made to the GMUS to download the output file. The fileSubDir parameter is optional; include it if you want to specify a subdirectory for the file. The deleteFile parameter is also optional; set it to ‘true’ if you want the file deleted after it is downloaded.

Note: Use this specific URL and Payload when GMUS is used with the G-Repository Client. If you are only using GMUS, please refer to the article: 
GMUS API - Download the Output file.


URL: http://<ipAddressOrHost>:<port>/rest/repoDownloadFile


Method Type: POST


Parameters (with example values)

You can manually enter the file path (shown below), or you can use the Resource Variable as your file path (next example).


Note: For Windows machines, the filePath should have two slashes: C:\\Users\\jDoe\\Downloads\\output.


{
     "clientAppId": "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX",
     "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX"",
     "username": ""jane.doe@gmail.com",
     "repoName": "<REPO_NAME>",
     "filePath": "/home/jDoe/Downloads/output",
     "fileSubDir": "output1",
     "fileName": "<FILE NAME>",
     "deleteFile": false
 }


If you choose to provide the Resource Variable as a file path, you must also include the profileId parameter. You can obtain the Profile ID from the "My Organization" page within the GenRocket Web Platform.

{
     "clientAppId": "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX",
     "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX"",
     "username": ""jane.doe@gmail.com",
     "repoName": "<REPO_NAME>",
     "profileId":"<PROFILE_ID>",
     "filePath": "#{resource.output.directory}",
     "fileSubDir": "output1",
     "fileName": "<FILE NAME>",
     "deleteFile": false
 }