Scope
- The JobScheduler REST Web Services can be used by any client program or job that has to access JobScheduler objects for operations such as adding an order to a job chain.
- The REST Web Services are a replacement for the XML Interface. and require authentication and authorization.
Usage
- The REST Web Services are called by using an HTTP client.
- The first operation of a client should be call to the
joc/api/security/login
URL.- A valid Username / Password has to be provided by the client. The Username & Password and permissions for the command(s) to be executed have to be configured in the
shiro.ini
and other authorization resources, if used. See the Authentication and Authorization - Configuration article and the exampleapi_user
configuration for further information.
- A valid Username / Password has to be provided by the client. The Username & Password and permissions for the command(s) to be executed have to be configured in the
- Subsequent commands can be sent by use of the
joc/api
/jobscheduler/command
URL. - The last operation of a client should be a call to the all to the
joc/api/security/logout
URL.
The following diagram shows the full permissions hierarchy that can be specified for an API user to allow them to address the JobScheduler Web Services API.
A system administrator would then integrate the permissions necessary to carry out the operations required in the authorization system used by the Web Services API. More information about how this can be done is available in the Authentication and Authorization - Configuration article.
Complete List of Permissions
The following table shows all the permissions that can be set to allow an API user to address the JobScheduler Web Services API.
Note that while this list is similar to the JOC Cockpit user permissions there are significant differences between the two permission sets.
Permission | Reference to XML Interface | Description |
---|---|---|
sos:products:commands:jobscheduler_master:view:status | <show_state/> | Retrieves status information about a JobScheduler Master |
sos:products:commands:jobscheduler_master:view:parameter | Shows parameters from ./config/ scheduler.xml | |
sos:products:commands:jobscheduler_master:execute:restart:terminate | <terminate restart="yes"/> | Terminates and restarts a JobScheduler Master |
sos:products:commands:jobscheduler_master:execute:restart:abort | <modify_spooler cmd="abort_immediately_and_restart"/> | Aborts and restarts a JobScheduler Master |
sos:products:commands:jobscheduler_master:execute:pause | <modify_spooler cmd="pause"/> | Pauses a JobScheduler Master |
sos:products:commands:jobscheduler_master:execute:continue | <modify_spooler cmd="continue"/> | Continues operation of the JobScheduler Master after pausing |
sos:products:commands:jobscheduler_master:execute:terminate | <terminate/> | Terminates a JobScheduler Master |
sos:products:commands:jobscheduler_master:execute:abort | <modify_spooler cmd="abort_immediately"/> | Aborts a JobScheduler Master |
sos:products:commands:jobscheduler_master:execute:stop | <modify_spooler cmd="stop"/> | Stops any running tasks in a JobScheduler Master |
sos:products:commands:jobscheduler_master:manage_categories | <scheduler_log.log_categories.set/> <scheduler_log.log_categories.reset/> | Activates, retrieves and resets log categories |
sos:products:commands:jobscheduler_master_cluster:execute:terminate_fail_safe | Terminates the active JobScheduler cluster member and activates a passive cluster member for fail-over | |
sos:products:commands:jobscheduler_master_cluster:execute:restart | <terminate restart="yes" all_schedulers="yes"/> | Terminates and restarts all JobScheduler cluster members |
sos:products:commands:jobscheduler_master_cluster:execute:terminate | <terminate all_schedulers="yes"/> | Terminates all JobScheduler cluster members |
sos:products:commands:history:view | <show_history/> | Retrieve the JobScheduler history |
sos:products:commands:order:view:status | <show_order/> | Retrieve order status information |
sos:products:commands:order:change:start_and_end_node | <modify_order state="..." end_state="..."/> | Modifies the starting and ending states of an order |
sos:products:commands:order:change:time_for_adhoc_orders | <modify_order><run_time/></modify_order> | Modifies the run-time of a temporary ad hoc order |
sos:products:commands:order:change:parameter | <modify_order><params><param name="..." value="..."/></params></modify_order> | Modifies order parameters |
sos:products:commands:order:change:run_time | <modify_order><run_time/></modify_order> | Modifies the run-time of a permanent order |
sos:products:commands:order:change:state | <modify_order state="..."/> | Modifies an order's state |
sos:products:commands:order:change:other | <modify_order/> | Modifies any remaining order attributes not covered by other permissions |
sos:products:commands:order:change:hot_folder | <modify_hot_folder > | Updates an order in the JobScheduler Master ./config/live directory |
sos:products:commands:order:execute:start | <modfiy_order at="now"/> | Causes an immediate start of the order |
sos:products:commands:order:execute:update | <modify_order/> | Updates order attributes |
sos:products:commands:order:execute:suspend | <modify_order suspended="yes"/> | Suspends an order |
sos:products:commands:order:execute:resume | <modify_order suspended="no"/> | Continues a previously suspended order |
sos:products:commands:order:execute:reset | <modify_order action="reset"/> | Resets an order |
sos:products:commands:order:execute:remove_setback | <modify_order setback="no"/> | Removes a setback setting for an order |
sos:products:commands:order:delete | <remove_order> | Removes a temporary ad hoc order from the JobScheduler Master |
sos:products:commands:job_chain:view:status | <show_state/> | Retrieves status information about a job chain |
sos:products:commands:job_chain:execute:stop | <job_chain.modify state="stopped"/> | Stops a job chain |
sos:products:commands:job_chain:execute:unstop | <job_chain.modify state="running"/> | Continues a previously stopped job chain |
sos:products:commands:job_chain:execute:add_order | <add_order/> | Add a temporary ad hoc order to a job chain |
sos:products:commands:job_chain:execute:skip_jobchain_node | <job_chain_node.modify action="next_state"/> | Skips a job chain node |
sos:products:commands:job_chain:execute:process_jobchain_node | <job_chain_node.modify action="process"/> | Continues processing of a job chain node that has previously been skipped or stopped |
sos:products:commands:job_chain:execute:stop_jobchain_node | <job_chain_node.modify action="stop"/> | Stops a job chain node |
sos:products:commands:job_chain:change:hot_folder | <modify_hot_folder > | Updates a job chain in the JobScheduler Master ./config/live directory |
sos:products:commands:job:view:status | <show_job/> | Retrieves status information about a job |
sos:products:commands:job:change:run_time | ||
sos:products:commands:job:change:hot_folder | ||
sos:products:commands:job:execute:start | ||
sos:products:commands:job:execute:stop | ||
sos:products:commands:job:execute:unstop | ||
sos:products:commands:job:execute:terminate | ||
sos:products:commands:job:execute:unstop | ||
sos:products:commands:job:execute:kill | ||
sos:products:commands:job:execute:end_all_tasks | ||
sos:products:commands:job:execute:suspend_all_tasks | ||
sos:products:commands:job:execute:continue_all_tasks | ||
sos:products:commands:process_class:view:status | <show_state/> | |
sos:products:commands:process_class:edit:change | ||
sos:products:commands:process_class:edit:remove | ||
sos:products:commands:process_class:modify_hot_folder | ||
sos:products:commands:schedule:view:status | <show_state/> | |
sos:products:commands:schedule:add_substitute | ||
sos:products:commands:schedule:modify_hot_folder | ||
sos:products:commands:lock:view:status | <show_state/> |
JSON Answer with the permissions of an user
The answer of http://localhost:8080/rest/security/joc_cockpit_permissions is this JSON object.
The valueOf(right)
will be evaluated to the true/false
.
To get the value true the user must have a role x that contains the right specified in the brackets.
References