Skip to content

Latest commit

 

History

History
1669 lines (1076 loc) · 18.2 KB

operations-for-external-job-scheduling-service-cbeb209.md

File metadata and controls

1669 lines (1076 loc) · 18.2 KB

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 Parameters

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobHeaderSet(JobName='JobName',JobRunCount='JobCount')?$expand=JobStepSet/JobStepLogInfoSet/JobLogMessageSet

Read Application Job Templates

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobTemplateSet

Schedule an Application Job

POST

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobSchedule?JobTemplateName='TemplateName'&JobText='Test'&JobUser='BusinessUser'&TestModeInd=false&JobParameterValues=''

Read Application Job Status

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobStatusGet?JobName='JobName'&JobRunCount='JobCount'

Abort a Running Application Job

POST

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobAbort?JobName='JobName'&JobRunCount='JobCount'

Cancel an Application Job

POST

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobCancel?JobName='JobName'&JobRunCount='JobCount'

Read Detailed Job and Step Information

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobinfoGet?JobName='JobName'&JobRunCount='JobCount'

Read Application Job Status Texts

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobStatusInfoSet

Restart a Failed Application Job

POST

<host>/sap/opu/odata/sap/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobRestart?JobName='JobName'&JobRunCount='JobCount'&JobRestartMode='E'

Check Parameters for Scheduling a Job

POST

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobScheduleCheck? JobTemplateName='TemplateName'&JobParameterValues='ParameterValueString'

Retrieve Application Job Parameters

GET

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobParamValuesGet?JobName='JobName'&JobCount='JobCount'

and

<host>/sap/opu/odata/SAP/BC_EXT_APPJOB_MANAGEMENT;v=0002/JobParamValuesStructGet?JobName='JobName'&JobCount='JobCount'

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:

<code>APJ_RT/003</code><message xml:lang="en">Job doesn't exist.</message>

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 error.

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 report &2. Report on BC-SRV-APS-APJ.

025

future_schedules_restricted

Job &1 was restricted to 1000 scheduled runs.

026

job_completed_wo_info

Job completed without errors

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 incident 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

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 already 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 error from enqueue server

060

job_must_not_periodic

Job &1 must not be periodic. Report incident on component BC-SRV-APS-APJ.

061

job_wrong_periodic_value

Value &1 for recurrence pattern is invalid 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 internal 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 recurrence pattern.

071

INVALID_SCHEDULING_START_TS

Job must start before the end date.

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

VALUES_OF_READ_ONLY_PARAM_REM

Parameter &1 has been removed because it is read-only

075

USER_NO_AUTH_TO_SCHEDULE_JOB

Parameter &1 has been removed because 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 schedule the job.

078

PARAM_CHANGE_BEFORE_SCHEDULE

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.