Submit a job (POST)
Description
URL |
scheme://domain:port/platform/ws/jobs/submit |
|
Description |
Submits a job to IBM Spectrum LSF Application Center.
|
|
HTTP Method |
POST |
|
Parameters |
None |
Request
Request-Method |
POST |
|
Request-URI |
/platform/ws/jobs/submit |
|
Request-Header |
Name |
Value |
Accept |
application/xml or application/json |
|
Content-Type |
multipart/mixed;boundary=YYYYY |
|
Message-body |
Boundary can be any random unique string. For details, see additional tables. --boundary<Application Name Area (table 1)> --boundary<Parameters Area (table 2)> --boundary<File Attachment (table 3)> |
Field Name | Field format/value | Notes® |
---|---|---|
Content-Disposition | Form-data;name="AppName" | |
Content-ID | AppName | |
Content | <App_Type[:App_Instance]> | Specify App_Type only if there is no App_Instance |
Example: Application Name Area Boundary
-----------------------------------
Content-Disposition: form-data; name=AppName
Content-ID: <AppName>
"\r\n"
FLUENT:FLUENT_WEB
-----------------------------------
Field Name | Field format/value | Notes |
---|---|---|
Content-Disposition | Form-data;name="data" | |
Content-Type | multipart/mixed;boundary=XXXX | |
Content-ID | <Data> | |
Content | --boundaryContent-Disposition: form-data; name=”c1”Content-Type:
application/xml; charset=US-ASCIIContent-Transfer-Encoding:
8bit“\r\n” Content-Disposition:
form-data; name=”c1”Content-Type: application/xml;
charset=US-ASCIIContent-Transfer-Encoding: 8bit“\r\n”<AppParam>
<id>%s</id>
<value>%s</value> <type>%s</type>
</AppParam>--boundary…--boundary-- |
<id>%s</id> defines the parameter name on the application form <value>%s</value> defines the value of the parameter. The value format for a file:
Upload: upload file from local. File must be attached in attached area of this request. Copy: copy file to job directory Link: link file to job directory. <type>%s</type> defines the parameter type. The possible values are: “file” or empty. “file” indicates the current parameter is a file . |
Example: Parameters Area Boundary
-----------------------------------
Content-Disposition: form-data; name='data'
Content-Type: multipart/mixed; boundary=_Part_1_701508.1145579811786
Content-ID: <data>
“\r\n”
--_Part_1_701508.1145579811786
Content-Disposition: form-data; name='c1'
Content-Type: application/xml; charset=US-ASCII
Content-Transfer-Encoding: 8bit
“\r\n”
<AppParam> <id>JOB_NAME</id> <value>From_webS</value><type></type> </AppParam>
--_Part_1_701508.1145579811786
Content-Disposition: form-data; name='c3'
Content-Type: application/xml; charset=US-ASCII
Content-Transfer-Encoding: 8bit
“\r\n”
<AppParam> <id>FLUENT_JOURNAL</id> <value> fluent-test.jou,upload </value> <type> file</type> </AppParam>
--_Part_1_701508.1145579811786--
----------------------------------
Field Name | Field format/value | Notes |
---|---|---|
Content-Disposition | Form-data;name="f1" | |
Content-Type | application/octet-stream | |
Content-ID | <Filename> | |
Content-Transfer-Encoding | UTF-8 | |
Content | <File content in bytes> |
Example: File Attachment Boundary
-----------------------------------
Content-Disposition: form-data; name='f1'
Content-Type: application/octet-stream
Content-Transfer-Encoding: UTF-8
Content-ID: <fluent-test.jou>
“\r\n”
PGh0bWw+CiAgPGhlYWQ+CiAgPC9oZWFkPgogIDxib2R5PgogICAgPHA+VGhpcyBpcyB0aGUg
-----------------------------------
Response
Response-Code |
|
|
Response-Header |
Name |
Value |
Content-Type |
application/xml or application/json |
|
Message-body |
Sucess Message | Returns the ID of the submitted job when job submission is successful. |
Failure Message |
If not successful, returns an error message. For additional information, refer to the schema file ./schemas/jobs/error.xsd.
|
Example: Submit a job
# Request
POST /platform/ws/jobs/submit HTTP/1.1
Host: www.example.org
Content-Type:multipart/mixed;boundary= bqJky99mlBWa-ZuqjC53mG6EzbmlxB
--bqJky99mlBWa-ZuqjC53mG6EzbmlxB
Content-Disposition: form-data; name="AppName"
generic
--bqJky99mlBWa-ZuqjC53mG6EzbmlxB
Content-Disposition: form-data; name="data"
Content-Type: multipart/mixed; boundary=aaaaaaaaaaaaa-aaaaaaaaaaaaa
--aaaaaaaaaaaaa-aaaaaaaaaaaaa
Content-Disposition: form-data; name="COMMAND"
Content-Type: application/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Accept-Language: en
<AppParam><id>COMMANDTORUN</id><value>sleep 100</value><type>text</type></AppParam>
--aaaaaaaaaaaaa-aaaaaaaaaaaaa--
--bqJky99mlBWa-ZuqjC53mG6EzbmlxB--
# Response
200 Successful
Content-Type: application/xml;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Job><id>883</id></Job>