Upload files(Deprecated)

Purpose

Deprecated since version 9.1.5. Use this API instead: Upload files (POST).

Uploads data for a job to the job directory on the web server or the remote directory on a specific host. By default, if a job ID is specified but no directory is specified, files are uploaded to the job directory on the web server.

The job can be in any status.

Request


HTTP Request Field Field format/value Notes®
HTTP Method POST  
URL

http://<hostname>:<port>/platform/webservice/pacclient/upfile/<job_ID>

  • <dir_name>: Optional. Uploads files to the specified directory on the web server. The directory can be an absolute path on the web server or a relative path to the job directory on the web server. If not specified, the job directory on the web server is used.
  • <job_ID>: Only used to upload files to the job directory on the web server. The ID of the job for which to upload files. The ID must be a positive integer and must match an LSF® job ID.
  • <file_name>: Files to upload. To specify multiple files, separate with a space. If no path is specified for the file, the job directory on the web server is used as the location of the file. If no file is specified, all files in the directory are uploaded.
  • <host_name><dir_name>: Uploads files to the specified job directory on the specified host. The directory must be an absolute path to the remote job directory on the host. The host can be any LSF server host.
Content-Type multipart/mixed;boundary=XXX  
Accept text/plain  
Cookie platform_token=<token> <token>: returned from logon
Body
[--boundary <Directory Name>]
--boundary <File Attachment>
--boundary <File Attachment>
--boundary ...
Boundary can be any random unique string. For details, see additional tables.

<Directory Name>


Field Name Field format/value Notes
Content-Disposition Form-data;name="DirName"  
Content-ID DirName  
Content <Dir_Name> <Dir_Name>: The directory on the web server. If the whole area is missing, the job directory on the web server.

Example
-----------------------------------
Content-Disposition: form-data; name=DirName
Content-ID: <DirName>
"\r\n"
/shareDisk/jobRepo/lsfadmin/workspace_dept_00001B
-----------------------------------

<File Attachment>


Field Name Field format/value Notes
Content-Disposition Form-data;name="fl"  
Content-Type application/octet-stream  
Content-ID <Filename>  
Content-Transfer-Encoding UTF-8  
Content <File content in bytes>  

Example
-----------------------------------
Content-Disposition: form-data; name='f1'
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <examplefile.jou>
"\r\n"
PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
-----------------------------------

Response


HTTP Response Field format/value Notes
Response code "200" - connection ok; otherwise connection failed  
Success Message Files successfully uploaded.  
Failure Message Failed to upload files. Error details are in the log file.

Example: upload file DATA_SAMPLE_1.txt to the job directory on the web server for job 1508

URL: http://pac91:8080/platform/webservice/pacclient/upfile/1508

HTML HEADER:

Cookie:platform_token=user1#quote#2013-01-18T04:51:39Z#quote#J5exDToJhwqFMDgRr+ngVBXPyma37zproA9VdEKNeYBUGbeQ1f/
oIoaQCTRC+LDR7L5/p0JFldlhi/RJ9A/wr+tPAGK0G3pORtYQi0blq5DD2g78MBJeFb7VeAiXSIQN#quote#ZUQCAyMsUlJF5i87vk9gBg==
Content-Length:492
Content-Type:multipart/mixed; boundary=4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Accept:text/plain;

HTML BODY:

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DirName"
Content-ID: <DirName>

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DATA_SAMPLE_1.txt"; filename="DATA_SAMPLE_1.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_1.txt>

SAMPLE FILE 1
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m-

Example: upload file DATA_SAMPLE_1.txt and DATA_SAMPLE_2.txt to the job directory on the web server for job 1508

URL: http://pac91:8080/platform/webservice/pacclient/upfile/1508

HTML HEADER:

Cookie:platform_token=user1#quote#2013-01-18T04:51:39Z#quote#J5exDToJhwqFMDgRr+ngVBXPyma37zproA9VdEKNeYBUGbeQ1f/
oIoaQCTRC+LDR7L5/p0JFldlhi/RJ9A/wr+tPAGK0G3pORtYQi0blq5DD2g78MBJeFb7VeAiXSIQN#quote#ZUQCAyMsUlJF5i87vk9gBg==
Content-Length:825
Content-Type:multipart/mixed; boundary=4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Accept:text/plain;

HTML BODY:

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DirName"
Content-ID: <DirName>

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DATA_SAMPLE_1.txt"; filename="DATA_SAMPLE_1.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_1.txt>

SAMPLE FILE 1
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m-
Content-Disposition: form-data; name="DATA_SAMPLE_2.txt"; filename="DATA_SAMPLE_2.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_2.txt>

SAMPLE FILE 2
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m--

Example: upload file DATA_SAMPLE_1.txt to the /tmp directory on host ib05b01

URL: http://pac91:8080/platform/webservice/pacclient/upfile/0

HTML HEADER:

Cookie:platform_token=user1#quote#2013-01-18T04:51:39Z#quote#J5exDToJhwqFMDgRr+ngVBXPyma37zproA9VdEKNeYBUGbeQ1f/
oIoaQCTRC+LDR7L5/p0JFldlhi/RJ9A/wr+tPAGK0G3pORtYQi0blq5DD2g78MBJeFb7VeAiXSIQN#quote#ZUQCAyMsUlJF5i87vk9gBg==
Content-Length:504
Content-Type:multipart/mixed; boundary=4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Accept:text/plain;

HTML BODY:

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DirName"
Content-ID: <DirName>

ib05b01:/tmp
--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DATA_SAMPLE_1.txt"; filename="DATA_SAMPLE_1.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_1.txt>

SAMPLE FILE 1
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m-

Example: upload file DATA_SAMPLE_1.txt and DATA_SAMPLE_2.txt to the /tmp directory on host ib05b01

URL: hhttp://pac91:8080/platform/webservice/pacclient/upfile/0

HTML HEADER:

Cookie:platform_token=user1#quote#2013-01-18T04:51:39Z#quote#J5exDToJhwqFMDgRr+ngVBXPyma37zproA9VdEKNeYBUGbeQ1f/
oIoaQCTRC+LDR7L5/p0JFldlhi/RJ9A/wr+tPAGK0G3pORtYQi0blq5DD2g78MBJeFb7VeAiXSIQN#quote#ZUQCAyMsUlJF5i87vk9gBg==
Content-Length:837
Content-Type:multipart/mixed; boundary=4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Accept:text/plain;

HTML BODY:

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DirName"
Content-ID: <DirName>

ib05b01:/tmp
--4k89ogja023oh1-gkdfk903jf9wngmujfs95m
Content-Disposition: form-data; name="DATA_SAMPLE_1.txt"; filename="DATA_SAMPLE_1.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_1.txt>

SAMPLE FILE 1
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m-
Content-Disposition: form-data; name="DATA_SAMPLE_2.txt"; filename="DATA_SAMPLE_2.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <DATA_SAMPLE_2.txt>

SAMPLE FILE 2
THIS IS THE DATA SAMPLE FOR TESTING UPLOAD
IBM PLATFORM COMPUTING
Jan 31, 2013

--4k89ogja023oh1-gkdfk903jf9wngmujfs95m--