Submit a new job request
ess/rest/scheduler/v1/requests
Request
There are no request parameters for this operation.
- application/json
- application/vnd.oracle.resource+json
object
- executePast: boolean Property that specifies whether instances of a repeating request with an execution time in the past should be generated. Instances will never be generated before the requested start time nor after the requested end time. Note that a null requested start time defaults to the current time. To cause past instances to be generated, you must set this property to true and specify the requested start time as the initial time from which instances should be generated. Valid values for this property are: true -- All instances specified by a schedule that are within the range specified by requested start time to requested end time will be generated regardless of the time of generation. false Instances with a scheduled execution time in the past (that is, before the time of generation) will not be generated. If this property is not specified, system default used is true.
- priority: integer Property that specifies the request processing priority. The priority interval is [0..9] with 0 as the lowest priority and 9 as the highest. If this property is not specified, the system default value used is 4.
- product: string Property that specifies the product within the application that submitted the request.
- requestCategory: string Property that specifies a label for a request. The label allows grouping of job requests for resource optimization.
- requestLogLevel: string Property that specifies the log level for request logging. The value of this property is not used internally by the scheduler, but is available to be passed to the job for its use.
- requestTimeout: integer (int64) Property that specifies the time, in minutes, that the processor will wait for an asynchronous after it has begun execution. After the time elapses, the request will be marked as timed out. There is no other direct effect on the state of the request. If this property is not specified, the system default is to never timeout.
- retries: integer Property that specifies the retry limit for a failed request. If request execution fails, the request will retried up to the number of times specified by this property until the request succeeds. If retry limit is zero (0), a failed request will not be retried. If this property is not specified, the system default used is 0.
object
- application: string Property that specifies the application name.
- callbackSubscription: object CallbackSubscriptionRequest The typical set of properties that are required to invoke the callback rest endpoint. These properties need to be specified as per the securityScheme.
- description: string An optional search tag for the request.
- endTime: string The time past which this request or its child requests will not be dispatched for execution.
- jobDefinitionId: string metadata object ID for the job definition or job set
- requestExecutionContext: object RequestExecutionContextIn The request execution context of the current job request. This identifier is only used when creating sub-requests.
- requestParameters: array requestParameters the request submission parameters
- schedule: object ScheduleBase
- scheduleId: string ID for a schedule that is already created as a seperate resource. Only one of scheduleId and schedule should be specified.
- startTime: string The requested start time for the request in ISO 8601 date time format. The request will not run prior to this time. If not specified, the current time will be used. If a schedule has been specified or the request is meant to begin immediately, a start time should not be specified.
object
- accessTokenUri: string URL to obtain access tokens from the Identity store. This property is usually required for DIRECT_OAUTH security scheme.
- callbackResourcePath(required): string Property that specifies the relative Path for REST Resource. The base Resource URL is given by callbackUrlPrefix property. This property is required for all the security schemes.
- callbackUrlPrefix(required): string Property that specifies the base URL of a REST Resource that can be used in conjunction with callbackResourcePath property to provide a full URL for the resource. This property is required for all the security schemes.
- clientId: string The clientId issued by OAuth server during client registration that should be added to credential store and provided as a policy parameter before making a call. This property is usually required for OWSM_LPA and DIRECT_OAUTH security schemes.
- clientSecret: string The client secret issued by OAuth server during client registration that should be added to credential store and provided as a policy parameter before making a call. This property is usually required for OWSM_LPA and DIRECT_OAUTH security schemes.
- ouath2ClientCsfKey: string Property to set the client's CSF key. Eg: "idcs.client.credentials". This will be specified in OWSM's ConfigOverride.CO_OAUTH2_CLIENT_CSF_KEY while creating PolicySetFeature. This property is usually required for OWSM_LPA security scheme.
- securityScheme: string Allowed Values:
[ "OWSM_GPA", "OWSM_LPA", "DIRECT_OAUTH" ]
One among "OWSM_GPA", "OWSM_LPA", "DIRECT_OAUTH". If unspecified, the default will be assumed as OWSM_GPA. For OWSM_LPA, the default policy attached from client will be "oracle/http_oauth2_token_client_policy". For "ouath2ClientCsfKey" property of "OWSM_LAP" security scheme, the subscribers need to ensure the password credential is configured in CSF under the csf map "oracle.wsm.security". For "clientId" and "clientSecret" properties of "DIRECT_OAUTH security" scheme, the subscribers need to ensure the clientId and secret is configured in IDCS.
object
- requestHandle(required): string The request handle associated with the executing request represents an opaque identifer for the executing instance of the request. The value can be retrieved from information supplied to the job request when execution commenced.
- requestId(required): integer (int64) It is the identifier of the request that is invoking this operation. It can be retrieved from the information supplied to the job request when execution commenced.
array
- Array of: object RequestParameter A request parameter.
object
- exclusions: array exclusions
- inclusions: array inclusions
- recurrences: array recurrences A set of recurrences. The resulting occurrences for the schedule would be the union of occurrences generated by the individual recurrences.
- timezone: string Timezone in Olson database format.
object
- name(required): string The parameter name.
- paramType(required): string Allowed Values:
[ "BOOLEAN", "LONG", "INTEGER", "DATETIME", "STRING" ]
- scope: string
- value: string
array
- Array of: string Explicit exclusion date in ISO 8601 format.
array
- Array of: string Explicit inclusion date in ISO 8601 format.
array
object
- endDate: string Sets the end date/time for this Recurrence object. The object only extracts the time up to the seconds. Milliseconds precision is not supported. The value is a string in ISO 8601 format.
- icalString(required): string Defines a recurrence pattern for use by a schedule. The string must conform to RFC 5445 RRULE. Restrictions include UNTIL, COUNT, BYSETPOS and WKST are not supported. BY* clauses (Rotors) in the RRULE can have minimun value of -1. i.e. for eg, BYDAY=-2MO(second to last monday) is not supported. BYMONTH and BYWEEKNO can't be present in one RECUR expression. BYDAY, BYMONTHDAY and BYYEARDAY can't be present in one RECUR expression.
- startDate: string Sets the start date/time for this Recurrence object. The object only extracts the time up to the seconds. Milliseconds precision is not supported. The value is a string in ISO 8601 format.
object
- executePast: boolean Property that specifies whether instances of a repeating request with an execution time in the past should be generated. Instances will never be generated before the requested start time nor after the requested end time. Note that a null requested start time defaults to the current time. To cause past instances to be generated, you must set this property to true and specify the requested start time as the initial time from which instances should be generated. Valid values for this property are: true -- All instances specified by a schedule that are within the range specified by requested start time to requested end time will be generated regardless of the time of generation. false Instances with a scheduled execution time in the past (that is, before the time of generation) will not be generated. If this property is not specified, system default used is true.
- priority: integer Property that specifies the request processing priority. The priority interval is [0..9] with 0 as the lowest priority and 9 as the highest. If this property is not specified, the system default value used is 4.
- product: string Property that specifies the product within the application that submitted the request.
- requestCategory: string Property that specifies a label for a request. The label allows grouping of job requests for resource optimization.
- requestLogLevel: string Property that specifies the log level for request logging. The value of this property is not used internally by the scheduler, but is available to be passed to the job for its use.
- requestTimeout: integer (int64) Property that specifies the time, in minutes, that the processor will wait for an asynchronous after it has begun execution. After the time elapses, the request will be marked as timed out. There is no other direct effect on the state of the request. If this property is not specified, the system default is to never timeout.
- retries: integer Property that specifies the retry limit for a failed request. If request execution fails, the request will retried up to the number of times specified by this property until the request succeeds. If retry limit is zero (0), a failed request will not be retried. If this property is not specified, the system default used is 0.
object
- application: string Property that specifies the application name.
- callbackSubscription: object CallbackSubscriptionRequest The typical set of properties that are required to invoke the callback rest endpoint. These properties need to be specified as per the securityScheme.
- description: string An optional search tag for the request.
- endTime: string The time past which this request or its child requests will not be dispatched for execution.
- jobDefinitionId: string metadata object ID for the job definition or job set
- requestExecutionContext: object RequestExecutionContextIn The request execution context of the current job request. This identifier is only used when creating sub-requests.
- requestParameters: array requestParameters the request submission parameters
- schedule: object ScheduleBase
- scheduleId: string ID for a schedule that is already created as a seperate resource. Only one of scheduleId and schedule should be specified.
- startTime: string The requested start time for the request in ISO 8601 date time format. The request will not run prior to this time. If not specified, the current time will be used. If a schedule has been specified or the request is meant to begin immediately, a start time should not be specified.
object
- accessTokenUri: string URL to obtain access tokens from the Identity store. This property is usually required for DIRECT_OAUTH security scheme.
- callbackResourcePath(required): string Property that specifies the relative Path for REST Resource. The base Resource URL is given by callbackUrlPrefix property. This property is required for all the security schemes.
- callbackUrlPrefix(required): string Property that specifies the base URL of a REST Resource that can be used in conjunction with callbackResourcePath property to provide a full URL for the resource. This property is required for all the security schemes.
- clientId: string The clientId issued by OAuth server during client registration that should be added to credential store and provided as a policy parameter before making a call. This property is usually required for OWSM_LPA and DIRECT_OAUTH security schemes.
- clientSecret: string The client secret issued by OAuth server during client registration that should be added to credential store and provided as a policy parameter before making a call. This property is usually required for OWSM_LPA and DIRECT_OAUTH security schemes.
- ouath2ClientCsfKey: string Property to set the client's CSF key. Eg: "idcs.client.credentials". This will be specified in OWSM's ConfigOverride.CO_OAUTH2_CLIENT_CSF_KEY while creating PolicySetFeature. This property is usually required for OWSM_LPA security scheme.
- securityScheme: string Allowed Values:
[ "OWSM_GPA", "OWSM_LPA", "DIRECT_OAUTH" ]
One among "OWSM_GPA", "OWSM_LPA", "DIRECT_OAUTH". If unspecified, the default will be assumed as OWSM_GPA. For OWSM_LPA, the default policy attached from client will be "oracle/http_oauth2_token_client_policy". For "ouath2ClientCsfKey" property of "OWSM_LAP" security scheme, the subscribers need to ensure the password credential is configured in CSF under the csf map "oracle.wsm.security". For "clientId" and "clientSecret" properties of "DIRECT_OAUTH security" scheme, the subscribers need to ensure the clientId and secret is configured in IDCS.
object
- requestHandle(required): string The request handle associated with the executing request represents an opaque identifer for the executing instance of the request. The value can be retrieved from information supplied to the job request when execution commenced.
- requestId(required): integer (int64) It is the identifier of the request that is invoking this operation. It can be retrieved from the information supplied to the job request when execution commenced.
array
- Array of: object RequestParameter A request parameter.
object
- exclusions: array exclusions
- inclusions: array inclusions
- recurrences: array recurrences A set of recurrences. The resulting occurrences for the schedule would be the union of occurrences generated by the individual recurrences.
- timezone: string Timezone in Olson database format.
object
- name(required): string The parameter name.
- paramType(required): string Allowed Values:
[ "BOOLEAN", "LONG", "INTEGER", "DATETIME", "STRING" ]
- scope: string
- value: string
array
- Array of: string Explicit exclusion date in ISO 8601 format.
array
- Array of: string Explicit inclusion date in ISO 8601 format.
array
object
- endDate: string Sets the end date/time for this Recurrence object. The object only extracts the time up to the seconds. Milliseconds precision is not supported. The value is a string in ISO 8601 format.
- icalString(required): string Defines a recurrence pattern for use by a schedule. The string must conform to RFC 5445 RRULE. Restrictions include UNTIL, COUNT, BYSETPOS and WKST are not supported. BY* clauses (Rotors) in the RRULE can have minimun value of -1. i.e. for eg, BYDAY=-2MO(second to last monday) is not supported. BYMONTH and BYWEEKNO can't be present in one RECUR expression. BYDAY, BYMONTHDAY and BYYEARDAY can't be present in one RECUR expression.
- startDate: string Sets the start date/time for this Recurrence object. The object only extracts the time up to the seconds. Milliseconds precision is not supported. The value is a string in ISO 8601 format.
Response
- application/json
- application/vnd.oracle.resource+json
201 Response
- Location: URL of new resource
object
- href(required): string
- rel(required): string Allowed Values:
[ "self", "parentRequest", "cancel", "forceCancel", "hold", "release", "subscribe", "permissions", "executionStatus", "absParentRequest", "instanceParent" ]
400 Response
object
- detail: string Detailed error message
- errorCode: string ESS-specific error code. For example ESS-00500.
- status: integer HTTP status code
- title(required): string Summary error message
- type(required): string URI. It will be beneficial if teams can provide application specific problem types. If not, at least we should link to HTTP error code page.
403 Response
object
- detail: string Detailed error message
- errorCode: string ESS-specific error code. For example ESS-00500.
- status: integer HTTP status code
- title(required): string Summary error message
- type(required): string URI. It will be beneficial if teams can provide application specific problem types. If not, at least we should link to HTTP error code page.
404 Response
object
- detail: string Detailed error message
- errorCode: string ESS-specific error code. For example ESS-00500.
- status: integer HTTP status code
- title(required): string Summary error message
- type(required): string URI. It will be beneficial if teams can provide application specific problem types. If not, at least we should link to HTTP error code page.
409 Response
object
- detail: string Detailed error message
- errorCode: string ESS-specific error code. For example ESS-00500.
- status: integer HTTP status code
- title(required): string Summary error message
- type(required): string URI. It will be beneficial if teams can provide application specific problem types. If not, at least we should link to HTTP error code page.
500 Response
object
- detail: string Detailed error message
- errorCode: string ESS-specific error code. For example ESS-00500.
- status: integer HTTP status code
- title(required): string Summary error message
- type(required): string URI. It will be beneficial if teams can provide application specific problem types. If not, at least we should link to HTTP error code page.
Examples
The following example shows how to create a new job request by submitting a POST request on the REST resource using cURL.
curl -i -u "<username>:<password>" -X POST http://servername.fa.us2.oraclecloud.com/ess/rest/scheduler/ess/rest/scheduler/v1/requests
Example of Response Header
The following shows an example of the response header.
Status: HTTP/1.1 200 OK Content-Type : application/json
Example of Response Body
The following example shows the contents of the response body in JSON format for Submit requests with callback notification enabled:
{ "description": "Test request1", "jobDefinitionId": "JobDefinition://oracle/as/ess/test/FUNC_TEST_PROD/MyJavaSucJobDef", "application": "ESS_FUNCTIONAL_TESTS_LOGICAL_NAME", "product": "GENERAL-LEDGER", "requestParameters": [ { "name": "Test_param", "paramType": "STRING", "value": "param1" } ], "callbackSubscription": { "callbackUrlPrefix": "http://servername.fa.us2.oraclecloud.com", "callbackResourcePath": "/nr/receiver/v1/receive" } }
Example of Response Body
The following example shows the contents of the response body in JSON format for Submit requests without callback notification enabled:
{ "description": "subrequest1", "jobDefinitionId": "JobDefinition://oracle/as/ess/test/FUNC_TEST_PROD/MyJavaSucJobDef", "application": "EssDemoApp", "product": "GENERAL-LEDGER", "requestExecutionContext": { "requestHandle": "9b2272f2_08fc_4c59_9d92_29fa123f71a7", "requestId": 2241 }, "requestParameters": [ { "name": "Test_param", "paramType": "STRING", "value": "param1" } ] }
Example of Response Body
The following example shows the contents of the response body in JSON format for Submit recurrent requests with callback notification enabled (recurrent parentId will be returned in response):
{ "description": "Test request1", "jobDefinitionId": "JobDefinition://oracle/as/ess/test/FUNC_TEST_PROD/MyJavaSucJobDef", "application": "ESS_FUNCTIONAL_TESTS_LOGICAL_NAME", "product": "GENERAL-LEDGER", "requestParameters": [ { "name": "Test_param", "paramType": "STRING", "value": "param1" } ], "callbackSubscription": { "callbackUrlPrefix": "http://servername.fa.us2.oraclecloud.com", "callbackResourcePath": "/nr/receiver/v1/receive" }, "schedule": { "recurrences": [ { "icalString": "FREQ=MINUTELY;INTERVAL=1;" } ] } }