Submit a new job request

post

ess/rest/scheduler/v1/requests

Creates a new job request using an existing job definition to run according to the specified schedule.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
This object specifies information used to create a request for a jobDefinition or jobSet. Note that only one of schedule and scheduleId should be specified.
Match All
Show Source
Nested Schema : RequestSystemProperties
Type: object
Show Source
  • 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.
  • 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.
  • Property that specifies the product within the application that submitted the request.
  • Property that specifies a label for a request. The label allows grouping of job requests for resource optimization.
  • 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.
  • 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.
  • 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.
Nested Schema : type
Type: object
Show Source
Nested Schema : CallbackSubscriptionRequest
Type: object
The typical set of properties that are required to invoke the callback rest endpoint. These properties need to be specified as per the securityScheme.
Show Source
  • URL to obtain access tokens from the Identity store. This property is usually required for DIRECT_OAUTH security scheme.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
Nested Schema : RequestExecutionContextIn
Type: object
The request execution context of the current job request. This identifier is only used when creating sub-requests.
Show Source
  • 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.
  • 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.
Nested Schema : requestParameters
Type: array
the request submission parameters
Show Source
Nested Schema : ScheduleBase
Type: object
Show Source
Nested Schema : RequestParameter
Type: object
A request parameter.
Show Source
Nested Schema : exclusions
Type: array
Show Source
Nested Schema : inclusions
Type: array
Show Source
Nested Schema : recurrences
Type: array
A set of recurrences. The resulting occurrences for the schedule would be the union of occurrences generated by the individual recurrences.
Show Source
Nested Schema : Recurrence
Type: object
Show Source
  • 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.
  • 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.
  • 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.
Request Body - application/vnd.oracle.resource+json ()
Root Schema : schema
This object specifies information used to create a request for a jobDefinition or jobSet. Note that only one of schedule and scheduleId should be specified.
Match All
Show Source
Nested Schema : RequestSystemProperties
Type: object
Show Source
  • 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.
  • 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.
  • Property that specifies the product within the application that submitted the request.
  • Property that specifies a label for a request. The label allows grouping of job requests for resource optimization.
  • 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.
  • 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.
  • 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.
Nested Schema : type
Type: object
Show Source
Nested Schema : CallbackSubscriptionRequest
Type: object
The typical set of properties that are required to invoke the callback rest endpoint. These properties need to be specified as per the securityScheme.
Show Source
  • URL to obtain access tokens from the Identity store. This property is usually required for DIRECT_OAUTH security scheme.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
Nested Schema : RequestExecutionContextIn
Type: object
The request execution context of the current job request. This identifier is only used when creating sub-requests.
Show Source
  • 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.
  • 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.
Nested Schema : requestParameters
Type: array
the request submission parameters
Show Source
Nested Schema : ScheduleBase
Type: object
Show Source
Nested Schema : RequestParameter
Type: object
A request parameter.
Show Source
Nested Schema : exclusions
Type: array
Show Source
Nested Schema : inclusions
Type: array
Show Source
Nested Schema : recurrences
Type: array
A set of recurrences. The resulting occurrences for the schedule would be the union of occurrences generated by the individual recurrences.
Show Source
Nested Schema : Recurrence
Type: object
Show Source
  • 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.
  • 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.
  • 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.
Back to Top

Response

Supported Media Types

201 Response

OK
Headers
Body ()
Root Schema : CreateRequestResponse
Type: object
Show Source

400 Response

Invalid input
Body ()
Root Schema : SimpleExceptionDetail
Type: object
Show Source

403 Response

Not allowed for this operation
Body ()
Root Schema : SimpleExceptionDetail
Type: object
Show Source

404 Response

Not found
Body ()
Root Schema : SimpleExceptionDetail
Type: object
Show Source

409 Response

Conflict
Body ()
Root Schema : SimpleExceptionDetail
Type: object
Show Source

500 Response

Scheduling sub-system error
Body ()
Root Schema : SimpleExceptionDetail
Type: object
Show Source
Back to Top

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;"
      }
    ]
  }
}
Back to Top