## 6.3.2.4.9.1  Operations for External Job Scheduling Service
The external job scheduling service API offers the following operations:
| Operation                                                | HTTP Method   | Sample URL                                                                                                                                                                                   |
|----------------------------------------------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Read an Application Job Without Pa- rameters [page 3015] | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobHeaderSet(Job- Name='JobName',JobRunCount='Job- Count')?$expand=JobStepSet/JobSte- pLogInfoSet/JobLogMessageSet               |
| Read Application Job Templates [page 3016]               | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobTemplateSet                                                                                                                   |
| Schedule an Application Job [page 3017]                  | POST          | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobSchedule?JobTem- plateName='TemplateName'&Job- Text='Test'&JobUser='BusinessU- ser'&TestModeInd=false&JobParame- terValues='' |
| Read Application Job Status [page 3018]                  | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobStatusGet?Job- Name='JobName'&JobRunCount='Job- Count'                                                                        |
| Abort a Running Application Job [page 3019]              | POST          | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobAbort?Job- Name='JobName'&JobRunCount='Job- Count'                                                                            |
| Cancel an Application Job [page 3020]                    | POST          | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobCancel?Job- Name='JobName'&JobRunCount='Job- Count'                                                                           |
| Read Detailed Job and Step Information [page 3021]       | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobinfoGet?Job- Name='JobName'&JobRunCount='Job- Count'                                                                          |
| Read Application Job Status Texts [page 3022]            | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobStatusInfoSet                                                                                                                 |
| Restart a Failed Application Job [page 3023]             | POST          | <host>/sap/opu/odata/sap/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobRestart?Job- Name='JobName'&JobRunCount='Job- Count'&JobRestartMode='E'                                                       |
| Operation                                                  | HTTP Method   | Sample URL                                                                                                                                                                                                                                                |
|------------------------------------------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Check Parameters for Scheduling a Job [page 3024]          | POST          | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobScheduleCheck? JobTemplateName='TemplateNa- me'&JobParameterValues='Parameter- ValueString'                                                                                                |
| Retrieve Application Job Parameters [page 3025]            | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobParamValues- Get?JobName='JobName'&Job- Count='JobCount' and <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/JobParamValues- StructGet?JobName='JobName'&Job- Count='JobCount' |
| Retrieve Application Job Template Pa- rameters [page 3027] | GET           | <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/TemplateValues- Get?JobTemplateName='TemplateNa- me' and <host>/sap/opu/odata/SAP/ BC_EXT_APPJOB_MANAGE- MENT;v=0002/TempalteValuesStruct- Get?JobTemplateName='TemplateNa-                   |
For more information on these operations, see 3383044 .
## Working with $Batch
The OData implementation can optionally support running multiple operations sent in a single HTTP request through the use of batching. This is especially useful when scheduling application jobs with a large amount of application job parameters, as these parameters are added to the request URL and may exceed the maximum number of allowed characters. For details, see the chapter Batch on page 17 of 3383044 .
## Error Handling
In case of an error, the external job scheduling service API sets the http status code to 400 and returns a message of an SAP message class. In the http response, you'll see the message class, the message number, and the message text. One example:
##  Sample Code
&lt;code&gt;APJ\_RT/003&lt;/code&gt;&lt;message xml:lang="en"&gt;Job doesn't exist.&lt;/message&gt;
In this example, the message with number 003 of message class APJ\_RT and the text "Job doesn't exist" was returned.
In most cases, a message of the message class APJ\_RT is used. The following table lists the message numbers and the corresponding texts:
|   Message code | Message constant             | Text                                                                      |
|----------------|------------------------------|---------------------------------------------------------------------------|
|            001 | TECHNICAL_ERROR              | Job was aborted due to a technical er- ror.                               |
|            002 | no_appl_log_found            | No application log found                                                  |
|            003 | no_job_exists                | Job doesn't exist.                                                        |
|            004 | cancel_job_failed            | Job &1 couldn't be canceled.                                              |
|            005 | no_cancel_privilege          | User &1 has no authorization to cancel job &2.                            |
|            006 | delete_job_failed            | Job &1 couldn't be deleted.                                               |
|            007 | no_job_delete_privilege      | User &1 has no authorization to delete job &2.                            |
|            008 | job_cancel_internal_error    | Job &1 couldn't be canceled due to an internal error.                     |
|            009 | job_cancellation_succesful   | Job &1 has been canceled.                                                 |
|            010 | job_deletion_succesful       | Job &1 has been deleted.                                                  |
|            011 | job_wrong_state_for_deletion | You can't delete job &1 due to its status.                                |
|            012 | no_runs_for_job_found        | Job &1 has no runs.                                                       |
|            013 | job_schedule_successfully    | Job &1 has been scheduled.                                                |
|            014 | job_catalog_entry_not_found  | Job catalog entry &1 doesn't exist.                                       |
|            015 | job_template_entry_not_found | Job template &1 doesn't exist.                                            |
|            016 | report_for_job_not_found     | Job &1 couldn't be created.                                               |
|            017 | job_creation_failed          | Report for job &1 couldn't be found.                                      |
|            018 | job_metadata_inconsistent    | Job &1 metadata are inconsistent.                                         |
|            019 | read_job_log_failed          | Log for job &1 couldn't be read.                                          |
|            020 | job_start_immediate_failed   | Job &1 couldn't start immediately                                         |
|            021 | job_invalid_startdate        | Job &1 has an invalid start date.                                         |
|            022 | job_close_failed             | Job &1 couldn't be scheduled.                                             |
|            023 | job_list_internal_error      | Internal error occurred during job list processing.                       |
|            024 | user_no_auth_report          | User &1 not authorized to schedule re- port &2. Report on BC-SRV-APS-APJ. |
|            025 | future_schedules_restricted  | Job &1 was restricted to 1000 sched- uled runs.                           |
|            026 | job_completed_wo_info        | Job completed without errors                                              |
|   Message code | Message constant           | Text                                                                  |
|----------------|----------------------------|-----------------------------------------------------------------------|
|            027 | no_auth_appl_log           | User &1 is not authorized to read the log.                            |
|            028 | no_auth_job_details        | User &1 is not authorized to read the job details.                    |
|            029 | no_auth_job_log            | User &1 is not authorized to read the job log.                        |
|            030 | no_auth_job_delete         | User &1 is not authorized to delete the job.                          |
|            031 | no_auth_job_cancel         | User &1 is not authorized to cancel the job.                          |
|            032 | job_schduling_failed       | Job couldn't be scheduled.                                            |
|            033 | job_no_end_date            | No end date supplied for job &1.                                      |
|            034 | job_start_before_end_date  | Job &1 must start before the end date.                                |
|            035 | job_no_max_iterations      | Enter a number of iterations for the job &1.                          |
|            036 | job_end_cond_ignored       | End date of job &1 will be ignored due to missing recurrence pattern. |
|            037 | job_aborted                | An error occurred. Please create an in- cident on component &1.       |
|            038 | job_cancel_checking_failed | Job &1 couldn't be canceled: Check of job failed                      |
|            039 | job_cancel_not_exist       | Job couldn't be canceled: Job does not exist.                         |
|            040 | JOB_CANCEL_NOT_RUNNING     | Job couldn't be canceled: Job is not running.                         |
|            041 | job_delete_event_failed    | Job &1 couldn't be deleted: Event scheduling can't be deleted         |
|            042 | job_delete_steps_failed    | Job &1 couldn't be deleted: Job steps couldn't be deleted             |
|            043 | job_delete_time_failed     | Job &1 couldn't be deleted: Deadline scheduling can't be deleted      |
|            044 | job_delete_derelease       | Job &1 couldn't be deleted: Previous job can't be modified            |
|            045 | job_delete_enq_pre         | Job &1 couldn't be deleted: Succeeding job can't be locked            |
|            046 | job_delete_enq_suc         | Job &1 couldn't be deleted: Previous job can't be locked              |
|            047 | job_delete_enq_tbtco       | Job &1 couldn't be deleted: Job can't be locked                       |
|            048 | job_delete_update_pre      | Job &1 couldn't be deleted: Previous job can't be modified            |
|   Message code | Message constant            | Text                                                                        |
|----------------|-----------------------------|-----------------------------------------------------------------------------|
|            049 | job_delete_update_suc       | Job &1 couldn't be deleted: Succeeding job can't be modified                |
|            050 | job_delete_commit_failed    | Job &1 couldn't be deleted: A technical error occurred.                     |
|            051 | job_delete_already_run      | Job &1 couldn't be deleted: Job has al- ready been published.               |
|            052 | illegal_report_or_variant   | Report name or variant name contains invalid characters.                    |
|            053 | illegal_variantname         | Variant couldn't be created: Its name is empty, or contains '&' or '%'.     |
|            054 | no_auth_variant_create      | User &1 is not authorized to create a variant.                              |
|            055 | variant_not_executed        | Variant couldn't be created: Variant can't be executed.                     |
|            056 | variant_no_report_exists    | Variant couldn't be created: Report doesn't exist.                          |
|            057 | variant_no_report_supplied  | Variant couldn't be created: Report is not of type 1.                       |
|            058 | variant_locked              | Variant couldn't be created: Variant is locked.                             |
|            059 | variant_lock_enqueue_error  | Variant couldn't be created: Internal er- ror from enqueue server           |
|            060 | job_must_not_periodic       | Job &1 must not be periodic. Report in- cident on component BC-SRV-APS-APJ. |
|            061 | job_wrong_periodic_value    | Value &1 for recurrence pattern is inva- lid for job &2.                    |
|            062 | invalid_factory_calendar    | Job &1 is not scheduled due to invalid calendar.                            |
|            063 | invalid_restriction_code    | Job &1 is not scheduled due to invalid restriction code                     |
|            064 | job_list_filter_failed      | Filter for job list couldn't be applied.                                    |
|            065 | job_delete_internal_error   | Job couldn't be deleted due to an inter- nal error.                         |
|            066 | INVALID_MONTH_SHIFT_DIR     | Invalid shift direction for days of month                                   |
|            067 | WEEKDAY_WRONG_STARTDATE     | Start date and day of recurrence must be the same weekday.                  |
|            068 | INVALID_TIMEZONE            | Time zone &1 is invalid.                                                    |
|            069 | INVALID_FC_ID               | Calendar &1 is invalid.                                                     |
|            070 | SCHEDULING_DATE_ADJUSTED    | Start date was adjusted to fit the recur- rence pattern.                    |
|            071 | INVALID_SCHEDULING_START_TS | Job must start before the end date.                                         |
|   Message code | Message constant                | Text                                                                    |
|----------------|---------------------------------|-------------------------------------------------------------------------|
|            072 | SELECT_AT_LEAST_ONE_WEEKDAY     | For weekly recurrence, select at least one weekday.                     |
|            073 | CREATE_JOB_VARIANT_FAILED       | Job variant couldn't be created.                                        |
|            074 | VAL- UES_OF_READ_ONLY_PARAM_REM | Parameter &1 has been removed be- cause it is read-only                 |
|            075 | USER_NO_AUTH_TO_SCHEDULE_JOB    | Parameter &1 has been removed be- cause it's read-only                  |
|            076 | JOB_CANCELED_BY_USER            | Job was canceled by user &1.                                            |
|            077 | NO_AUTH_SCHEDULE_FOR_USER       | User &1 has no authorization to sched- ule the job.                     |
|            078 | PARAM_CHANGE_BEFORE_SCHED- ULE  | Invalid change of parameter when scheduling. Please open a ticket on &1 |
|            079 | INVALID_JOB_RUN_STATUS          | Invalid job run status.                                                 |
|            080 | JOBCATALOG_IS_NOT_BASIC         | Job catalog is not basic.                                               |
|            081 | JOB_RESTART_INCORRECT_STATUS    | Can't restart the job due to the status                                 |
|            082 | JOB_RESTART_INCORRECT_MODE      | Can't restart the job after the last step                               |
|            083 | INVALID_USER                    | User &1 doesn't exist or is invalid.                                    |