Versions Compared

Key

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

...

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

Explanations

  • 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/command
  • 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_command 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/command 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_commandcommands 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_command>commands>

Explanations

  • 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/command
  • 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_command 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.

...