{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle-fusion/json-schema/oracle-fusion-request-submission-body-schema.json",
  "title": "RequestSubmissionBody",
  "description": "This object specifies information used to create a request for a jobDefinition or jobSet. Note that only\none of schedule and scheduleId should be specified.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-fusion-common-features-openapi.json#/components/schemas/RequestSubmissionBody",
  "allOf": [
    {
      "$ref": "#/$defs/RequestSystemProperties"
    },
    {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "An optional search tag for the request.\n"
        },
        "requestExecutionContext": {
          "$ref": "#/$defs/RequestExecutionContextIn"
        },
        "jobDefinitionId": {
          "type": "string",
          "description": "metadata object ID for the job definition or job set"
        },
        "requestParameters": {
          "type": "array",
          "description": "the request submission parameters",
          "items": {
            "$ref": "#/$defs/RequestParameter"
          }
        },
        "schedule": {
          "$ref": "#/$defs/ScheduleBase"
        },
        "scheduleId": {
          "type": "string",
          "description": "ID for a schedule that is already created as a seperate resource. Only one of scheduleId and schedule\nshould be specified.\n"
        },
        "startTime": {
          "type": "string",
          "description": "The requested start time for the request in ISO 8601 date time format. The request will not run prior to\nthis time. If not specified, the current time will be used. If a schedule has been specified or the\nrequest is meant to begin immediately, a start time should not be specified.\n"
        },
        "endTime": {
          "type": "string",
          "description": "The time past which this request or its child requests will not be dispatched for execution.\n"
        },
        "application": {
          "type": "string",
          "description": "Property that specifies the application name."
        },
        "callbackSubscription": {
          "$ref": "#/$defs/CallbackSubscriptionRequest"
        }
      }
    }
  ],
  "$defs": {
    "CallbackSubscriptionRequest": {
      "required": [
        "callbackUrlPrefix",
        "callbackResourcePath"
      ],
      "type": "object",
      "properties": {
        "securityScheme": {
          "type": "string",
          "description": "One among \"OWSM_GPA\", \"OWSM_LPA\", \"DIRECT_OAUTH\". \nIf 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\".\nFor \"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\".\nFor \"clientId\" and \"clientSecret\" properties of \"DIRECT_OAUTH security\" scheme, the subscribers need to ensure the clientId and secret is configured in IDCS. \n",
          "enum": [
            "OWSM_GPA",
            "OWSM_LPA",
            "DIRECT_OAUTH"
          ]
        },
        "callbackUrlPrefix": {
          "type": "string",
          "description": "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.\n"
        },
        "callbackResourcePath": {
          "type": "string",
          "description": "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.\n"
        },
        "accessTokenUri": {
          "type": "string",
          "description": "URL to obtain access tokens from the Identity store. This property is usually required for DIRECT_OAUTH security scheme.\n"
        },
        "ouath2ClientCsfKey": {
          "type": "string",
          "description": "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.\n"
        },
        "clientId": {
          "type": "string",
          "description": "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.\n"
        },
        "clientSecret": {
          "type": "string",
          "description": "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.\n"
        }
      },
      "description": "The typical set of properties that are required to invoke the callback rest endpoint. These properties need to be specified as per the securityScheme.\n"
    },
    "Recurrence": {
      "required": [
        "icalString"
      ],
      "type": "object",
      "properties": {
        "icalString": {
          "type": "string",
          "description": "Defines a recurrence pattern for use by a schedule. The string must conform to RFC 5445 RRULE.\nRestrictions include\n  UNTIL, COUNT, BYSETPOS and WKST are not supported.\n  \n  BY* clauses (Rotors) in the RRULE can have minimun value of -1. i.e. for eg, BYDAY=-2MO(second to last monday)\n  is not supported.\n  \n  BYMONTH and BYWEEKNO can't be present in one RECUR expression.\n  \n  BYDAY, BYMONTHDAY and BYYEARDAY can't be present in one RECUR expression.\n"
        },
        "startDate": {
          "type": "string",
          "description": "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."
        },
        "endDate": {
          "type": "string",
          "description": "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."
        }
      }
    },
    "RequestExecutionContextIn": {
      "required": [
        "requestHandle",
        "requestId"
      ],
      "type": "object",
      "properties": {
        "requestId": {
          "type": "integer",
          "description": "It is the identifier of the request that is invoking this operation.\nIt can be retrieved from the information supplied to the job\nrequest when execution commenced.\n",
          "format": "int64"
        },
        "requestHandle": {
          "type": "string",
          "description": "The request handle associated with the executing request represents\nan opaque identifer for the executing instance of the request. The\nvalue can be retrieved from information supplied to the job request\nwhen execution commenced.\n"
        }
      },
      "description": "The request execution context of the current job request. This\nidentifier is only used when creating sub-requests.\n"
    },
    "RequestParameter": {
      "required": [
        "name",
        "paramType"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The parameter name."
        },
        "value": {
          "type": "string"
        },
        "paramType": {
          "type": "string",
          "enum": [
            "BOOLEAN",
            "LONG",
            "INTEGER",
            "DATETIME",
            "STRING"
          ]
        },
        "scope": {
          "type": "string"
        }
      },
      "description": "A request parameter."
    },
    "RequestSystemProperties": {
      "type": "object",
      "properties": {
        "product": {
          "type": "string",
          "description": "Property that specifies the product within the application that submitted the request.\n"
        },
        "requestCategory": {
          "type": "string",
          "description": "Property that specifies a label for a request. The label allows grouping of\njob requests for resource optimization.\n"
        },
        "priority": {
          "type": "integer",
          "description": "Property that specifies the request processing priority.\nThe priority interval is [0..9] with 0 as the lowest priority\nand 9 as the highest.\nIf this property is not specified, the system default value used is 4.\n"
        },
        "retries": {
          "type": "integer",
          "description": "Property that specifies the retry limit for a failed request.\nIf request execution fails, the request will retried up to the\nnumber of times specified by this property until the request succeeds.\nIf retry limit is zero (0), a failed request will not be retried.\nIf this property is not specified, the system default used is 0.\n"
        },
        "executePast": {
          "type": "boolean",
          "description": "Property that specifies whether instances of a repeating request\nwith an execution time in the past should be generated.  Instances\nwill never be generated before the requested start time nor\nafter the requested end time.\n\nNote that a null requested start time defaults to the current time.\nTo cause past instances to be generated, you must set this property\nto true and specify the requested start time as the initial\ntime from which instances should be generated.\n\nValid values for this property are:\n\ntrue -- All instances specified by a schedule that are\nwithin the range specified by requested start time to requested\nend time will be generated regardless of the time of generation.\n\nfalse Instances with a scheduled execution time in the\npast (that is, before the time of generation) will not be generated.\n\nIf this property is not specified, system default used is true.\n"
        },
        "requestTimeout": {
          "type": "integer",
          "description": "Property that specifies the time, in minutes, that the processor will\nwait for an asynchronous after it has begun execution. After the\ntime elapses, the request will be marked as timed out. There is no\nother direct effect on the state of the request.\n\nIf this property is not specified, the system default is to never timeout.\n",
          "format": "int64"
        },
        "requestLogLevel": {
          "type": "string",
          "description": "Property that specifies the log level for request logging.\n\nThe value of this property is not used internally by the scheduler,\nbut is available to be passed to the job for its use.\n"
        }
      }
    },
    "ScheduleBase": {
      "type": "object",
      "properties": {
        "recurrences": {
          "type": "array",
          "description": "A set of recurrences. The resulting occurrences for the schedule would be the union of\noccurrences generated by the individual recurrences.\n",
          "items": {
            "$ref": "#/$defs/Recurrence"
          }
        },
        "timezone": {
          "type": "string",
          "description": "Timezone in Olson database format."
        },
        "inclusions": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Explicit inclusion date in ISO 8601 format."
          }
        },
        "exclusions": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Explicit exclusion date in ISO 8601 format."
          }
        }
      }
    }
  }
}