Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The REST Web Service is called by using an HTTP client.
  • The following REST Web Service requests are supported:
  • Requirements
    • All REST Web Service requests should use an HTTP POST operation.
    • Should an idle timeout of 15 minutes between two web service requests be exceeded then the current session is invalidated and a login has to be performed.

...

Code Block
languagexml
titleHTTP Post Sample for status information
collapsetrue
POST /joc/api/jobscheduler/commandcommands HTTP/1.1
Host: localhost:4446
access_token: c96a8563-5910-4d76-bc2a-4bc969a88d05
Content-Type: application/xml
Cache-Control: no-cache
<jobscheduler_commands jobschedulerId='scheduler111'><show_state/></jobscheduler_commands>

...

  • The JobScheduler REST Web Service (and the JOC Cockpit) are operated on the localhost with port 4446.
  • The URL in use is http://localhost:4446/joc/api/jobscheduler/commandcommands
  • The value for the access_token has been retrieved from a previous authentication request.
  • Consider use of the Content-Type header application/xml.
  • The body contains the effective XML commands wrapped in a <jobscheduler_commands jobschedulerId="..."/> element where jobschedulerId is the JobScheduler ID of the respective JobScheduler Master.

...

Code Block
languagexml
titleHTTP Post Sample for adding an order to a job chain
collapsetrue
POST /joc/api/jobscheduler/commandcommands HTTP/1.1
Host: localhost:4446
access_token: ce31fb8f-9f5a-4e3e-805d-72c71d0547ce
Content-Type: application/xml
Cache-Control: no-cache
Postman-Token: 88bd687a-586d-fd93-d203-bcd7e71a6a85
<jobscheduler_commands jobschedulerId='scheduler111'><add_order job_chain="/some_folder/some_chain"><params><param name="first" value="1st"/><params name="second" value="2nd"/></params></add_order></jobscheduler_commands>

...

  • The JobScheduler REST Web Service (and the JOC Cockpit) are operated on the localhost with port 4446.
  • The URL in use is http://localhost:4446/joc/api/jobscheduler/commandcommands
  • The value for the access_token has been retrieved from a previous authentication request.
  • Consider use of the Content-Type header application/xml.
  • The body contains the effective XML commands wrapped in a <jobscheduler_commands jobschedulerId="..."/> element where jobschedulerId is the JobScheduler ID of the respective JobScheduler Master. The effective XML Command <add_order/> is used to to add a temporary order to a job chain and optionally to add parameters to the order.

...