IBM Support

How to get basic job information through RESTful web service

How To


Summary

By default, gets basic information for all jobs in all states submitted by the logged in user

Steps

1. Set the request method to GET

2.Set the request header, to get the basic job information, you need add the token string in the header, for example, if the token string is "lsfadmin"2018-07-10T13:52:40Z"/EdNI/j7QDVy6GZE9JYxZOG/Z1hbBf1sCyeSDJe/vf3WD/fypopLMATHG+q/j5W2FJ+9nHx13394zoGR5CEYdGrnAJ1kIsR6/x7L9xgNfRmvkL7/6jd2aFAMTUih36vD"N0M/HkU76mS1NIVFdp/xaA=="

You should set the request header like below.

=====

Accept:application/xml,application/json

platform_token:lsfadmin"2018-07-10T13:52:40Z"/EdNI/j7QDVy6GZE9JYxZOG/Z1hbBf1sCyeSDJe/vf3WD/fypopLMATHG+q/j5W2FJ+9nHx13394zoGR5CEYdGrnAJ1kIsR6/x7L9xgNfRmvkL7/6jd2aFAMTUih36vD"N0M/HkU76mS1NIVFdp/xaA==

====

3. To get all jobs, you can set the request URI like

scheme://domain:port/platform/ws/jobs

4. If successful, returns basic information about jobs.

=========

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pseudoJobs total="3">
  <pseudoJob>
    <submitTime>2018-07-10T19:52:30+0800</submitTime>
    <startTime>2018-07-10T19:52:31+0800</startTime>
    <command>sleep 10</command>
    <exHosts>pac102</exHosts>
    <fromHost>pac102</fromHost>
    <jobId>515</jobId>
    <jobName>sleep 10</jobName>
    <jobStatus>RUNNING</jobStatus>
    <queue>normal</queue>
    <user>lsfadmin</user>
  </pseudoJob>
  <pseudoJob>
    <submitTime>2018-07-10T19:52:32+0800</submitTime>
    <startTime>2018-07-10T19:52:32+0800</startTime>
    <command>sleep 20</command>
    <exHosts>pac102</exHosts>
    <fromHost>pac102</fromHost>
    <jobId>516</jobId>
    <jobName>sleep 20</jobName>
    <jobStatus>RUNNING</jobStatus>
    <queue>normal</queue>
    <user>lsfadmin</user>
  </pseudoJob>
  <pseudoJob>
    <submitTime>2018-07-10T19:52:34+0800</submitTime>
    <startTime>2018-07-10T19:52:34+0800</startTime>
    <command>sleep 30</command>
    <exHosts>pac102</exHosts>
    <fromHost>pac102</fromHost>
    <jobId>517</jobId>
    <jobName>sleep 30</jobName>
    <jobStatus>RUNNING</jobStatus>
    <queue>normal</queue>
    <user>lsfadmin</user>
  </pseudoJob>
</pseudoJobs>

=========

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZRJV","label":"IBM Spectrum LSF Application Center"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
11 July 2018

UID

ibm10716851