Scope
- The JobScheduler REST Web Services replace the retired XML Interface.
- The REST Web Services are used by the JOC Cockpit and by external applications for interaction with a JobScheduler Master:
- The REST Web Services offer access to objects such as jobs, job chains and orders and their respective operations, e.g. to add an order to a job chain.
- Access to REST Web Services is restricted by permissions, see Authentication and Authorization - Permissions for the JobScheduler REST Web Services
Architecture
Usage
- The REST Web Services are called by using an HTTP client.
- The following REST web service requests are supported:
- URL
joc/api/security/login
- The first operation of a client should be call to this URL in order to authenticate and to retrieve an access token.
- A valid account and password have to be provided by the client for HTTP authentication The account and permissions for the command(s) to be executed are configured with the
shiro.ini
configuration file. See the Authentication and Authorization - Configuration article and the exampleapi_user
configuration for further information. - Use the
joc/api/security/joc_cockpit_permissions
URL to retrieve the permissions for the current user.
- URL
joc/api/jobscheduler/command
- Subsequent XML Commands can be sent by use of this URL.
- The XML command is added to the body of the web service request.
- The JobScheduler REST Web Services will return the respective XML Response.
- URL
joc/api/security/logout
- The last operation of a client should be a call to this URL in order to logout from the web service.
- URL
- 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.
Specification
The documentation is available from http://test.sos-berlin.com/JobScheduler/raml-doc/JobScheduler-REST-web-services/ and includes the RAML specification.
XML Commands
Find the list of XML Commands from the Reference Documentation.
The following table states the available XML commands for JobScheduler REST Web Services.
XML Command | Description |
---|---|
<show_state/> | Retrieves status information about a JobScheduler Master |
Shows parameters from ./config/ scheduler.xml | |
<terminate restart="yes"/> | Terminates and restarts a JobScheduler Master |
<modify_spooler cmd="abort_immediately_and_restart"/> | Aborts and restarts a JobScheduler Master |
<modify_spooler cmd="pause"/> | Pauses a JobScheduler Master |
<modify_spooler cmd="continue"/> | Continues operation of the JobScheduler Master after pausing |
<terminate/> | Terminates a JobScheduler Master |
<modify_spooler cmd="abort_immediately"/> | Aborts a JobScheduler Master |
<modify_spooler cmd="stop"/> | Stops any running tasks in a JobScheduler Master |
<scheduler_log.log_categories.set/> <scheduler_log.log_categories.reset/> | |
Terminates the active JobScheduler cluster member and activates a passive cluster member for fail-over | |
<terminate restart="yes" all_schedulers="yes"/> | Terminates and restarts all JobScheduler cluster members |
<terminate all_schedulers="yes"/> | Terminates all JobScheduler cluster members |
<show_history/> | Retrieve the JobScheduler history |
<show_order/> | Retrieve order status information |
<modify_order state="..." end_state="..."/> | Modifies the starting and ending states of an order |
<modify_order><run_time/></modify_order> | Modifies the run-time of a temporary ad hoc order |
<modify_order><params><param name="..." value="..."/></params></modify_order> | Modifies order parameters |
<modify_order><run_time/></modify_order> | |
<modify_order state="..."/> | Modifies an order's state |
<modify_order/> | Modifies any remaining order attributes not covered by other permissions |
modify_hot_folder><order/></modify_hot_folder > | ./config/live directory |
<modfiy_order at="now"/> | Causes an immediate start of the order |
<modify_order/> | Updates order attributes |
<modify_order suspended="yes"/> | Suspends an order |
<modify_order suspended="no"/> | Continues a previously suspended order |
<modify_order action="reset"/> | Resets an order |
<modify_order setback="no"/> | Removes a setback setting for an order |
<remove_order/> | Removes a temporary ad hoc order from the JobScheduler Master |
<show_state/> | Retrieves status information about a job chain |
<job_chain.modify state="stopped"/> | Stops a job chain |
<job_chain.modify state="running"/> | Continues a previously stopped job chain |
<add_order/> | Add a temporary ad hoc order to a job chain |
<job_chain_node.modify action="next_state"/> | Skips a job chain node |
<job_chain_node.modify action="process"/> | Continues processing of a job chain node that has previously been skipped or stopped |
<job_chain_node.modify action="stop"/> | Stops a job chain node |
modify_hot_folder><job_chain/></modify_hot_folder > | ./config/live directory |
<show_job/> | Retrieves status information about a job |
<modify_order><run_time/></modify_order> | |
modify_hot_folder><job/></modify_hot_folder > | ./config/live directory |
<start_job/> | Starts a job |
<modify_job cmd="stop"/> | Stops a job |
<modify_job cmd="unstop"/> | Unstops a previously stopped job |
<modify_job cmd="end"/> | Terminates a job |
<kill_task/> | Kills a task that is running for the job |
<kill_task immediately="yes" timeout="never"/> | Sends all running tasks for a job a SIGTERM signal |
<modify_job cmd="suspend"/> | Suspends all running tasks for a job |
<modify_job cmd="continue"/> | Continues all previously suspended tasks for a job |
<show_state/> | Retrieves status information about process classes |
<process_class/> | |
<process_class.remove/> | |
modify_hot_folder><process_class/></modify_hot_folder > | ./config/live directory |
<show_state/> | Retrieves status information about schedules |
modify_hot_folder><schedule substitute="..."/></modify_hot_folder > | |
<schedule.remove/> | |
modify_hot_folder><schedule/></modify_hot_folder > | ./config/live directory |
<show_state/> | Retrieves status information about locks |
<lock/> | |
<lock.remove/> |
Examples
References
Change Management References
Documentation
- Authentication and Authorization
- JobScheduler Reference Documentation:
- JobScheduler REST Web Services