Download files (POST)

Description

URL

scheme://domain:port/platform/ws/jobfiles/download/{id}

Description

Downloads job data for a job from the specified directory.

Note: For security reasons, you are not able to view or download hidden files.

HTTP Method

POST

Parameters

Name Description
 

id

Mandatory.

The ID of the job for which to download files. The ID must be a positive integer and must match an LSF® job ID.

The job ID cannot be 0.

To get a list of jobs and their ID, use: /platform/ws/jobs or platform/ws/jobs/getbasicinfo

 

dir

Mandatory.

The file path. If you use a relative path, it is relative to the job directory.

For example, to download a single file with a full path:

dir=/shareDisk/jobRepo/lsfadmin/myJob_22111/myfile1

To download a single file from the job directory

dir=/myfile1

To download multiple files from the job directory, separate them with a comma(,):

dir=myfile1,myfile2

You can also compress files before downloading by specifying a compression command. Format to compress files before downloading:

dir=filename[,filename...] | compression_command

For example, to compress and download the file myfile1 with gzip:

dir=/shareDisk/jobRepo/lsfadmin/myJob_22111/myfile1| gzip

To download matching files:

dir=myfile*, test*

To download all files from a specific directory:

dir=/shareDisk/jobRepo/lsfadmin/myJob_22111/*

When you use a compression command, files are compressed, then downloaded to the client. The client must decompress the files after download. The compression program must be installed on the Platform Application Center server and must be in the system path.

.

Request

Request-Method

POST

Request-URI

/platform/ws/jobfiles/download/{id}

Request-Header

Name

Value

Accept

multipart/mixed, application/xml, or application/json

Message-body

dir=%s

Response

Response-Code

  • 200 Successful: Request was successful.
  • 400 Bad Request: The ID or directory is empty or not valid.
  • 403 Forbidden: Access restricted by role-based access control permissions.
  • 404 Not Found: No files that match the specified criteria were found.
  • 500 Internal Server Error: Exception occurred.

Response-Header

Name

Value

Content-Type

multipart/mixed, application/xml, or application/json

Message-body

Success Message

Returns multipart/mixed data.

Failure Message

If not successful, returns an error message.

For additional information, refer to the schema file ./schemas/jobs/error.xsd.

<error>
  <message>
     %s
  </message>
</error>