Create Job

post

https://EM_HOST:EM_CONSOLE_HTTPS_PORT/em/api/jobs

Creates Job of given type. Library Job template can be used. For OSCommand jobs, use parameter `command` with value `%job_default_shell%` and parameter `args` with the actual command text provided by the user. The `command` parameter value must be exactly `%job_default_shell%`; never concatenate the user command into it, for example never send `%job_default_shell% ls -al` as `command`. For example, if the user asks to run `hostname -f`, send `command=%job_default_shell%` and `args=hostname -f`. For SQLScript jobs on an `oracle_database` target, pass the host credential with `usage=defaultHostCred`, `targetName` set to the database target name, and `targetType=oracle_database`. Do not use `targetType=host` for that credential entry. Also pass the database credential with exact usage `defaultDBCred`; do not use `defaultDbCred`.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Create job operation request body
Show Source
  • credentials
    List of credentials. Credential `usage`, `targetName`, and `targetType` are matched literally. For SQLScript jobs on an `oracle_database` target, the host credential entry should use: `name=`, `owner=`, `usage=defaultHostCred`, `targetName=`, `targetType=oracle_database`. The database credential entry should use exact usage `defaultDBCred`, not `defaultDbCred`.
  • Job description
  • If set alone, without `libraryName`, then it is treated as action to save the job into library. If set together with `libraryName` (and optional `libraryOwner`), it submits a job from library.
  • Used when submitting job from the library. If set to true the parameters used in library job will be replaced with the one provided with payload
  • Used when submitting job from the library. If set to true the targets used in library job will be replaced with the one provided with payload
  • If set together with `isLibrary=true` and optional `libraryOwner`, then it submits library job with that name
  • If set it will match the library job owner to be submitted
  • Job name
  • parameters
    List of job parameters. For OSCommand jobs, use two SCALAR parameters: `command` with value `%job_default_shell%`, and `args` with the actual command text provided by the user. The `command` value must be exactly `%job_default_shell%`; do not append the user command to it.
  • user as which job should be run
  • runtimeProperties
    Optional runtime properties for job submission. This is a generic runtime property collection; supported property names and values depend on runtime support.
  • Schedule
    Defining time schedule
  • Default set to 0. 0 - User job. 1 - System job with no retries. 2 - System job with retries. 3 - System job associated with http session.
  • targets
    list of targets
  • Job type
Nested Schema : credentials
Type: array
List of credentials. Credential `usage`, `targetName`, and `targetType` are matched literally. For SQLScript jobs on an `oracle_database` target, the host credential entry should use: `name=`, `owner=`, `usage=defaultHostCred`, `targetName=`, `targetType=oracle_database`. The database credential entry should use exact usage `defaultDBCred`, not `defaultDbCred`.
Show Source
Nested Schema : parameters
Type: array
List of job parameters. For OSCommand jobs, use two SCALAR parameters: `command` with value `%job_default_shell%`, and `args` with the actual command text provided by the user. The `command` value must be exactly `%job_default_shell%`; do not append the user command to it.
Show Source
Nested Schema : runtimeProperties
Type: array
Optional runtime properties for job submission. This is a generic runtime property collection; supported property names and values depend on runtime support.
Show Source
Nested Schema : Schedule
Type: object
Defining time schedule
Show Source
  • To indicate the time should be interpreted in target's timezone or not. If Timezone is specified in time and useTargetZone is true, it will be reported as an ERROR condition
    Example: true
  • Frequency at which the operation must be executed repeatedly
    Example: Weekly
  • Currently we support ical specification default is ICAL, in future it can be extended to other types e.g CRON.
  • Time in minutes after which the job will be marked as skipped if not started. Null or Negative value means no grace period.
    Example: 60
  • end time for the job in the format YYYY-MM-DDTHH24:Mi:SSZTimezone Timezone specification is optional and will be defaulted to UTC.
    Example: 2021-03-02 22:00:13
  • start time for the job in the format YYYY-MM-DDTHH24:Mi:SSZTimezone Timezone specification is optional and will be defaulted to UTC.
    Example: 2021-03-01 21:23:03
Nested Schema : targets
Type: array
list of targets
Show Source
Nested Schema : Credential
Type: object
Credentials object
Show Source
Nested Schema : ParameterSummary
Type: object
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Match All
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Show Source
  • Parameter
    Job configuration parameter, identified by context name / parameter name. Contains a single value. In case the value is not defined on given context, the value is populated from metadata (default value) or from the GLOBAL context. Alternatively, user can ask to see values from all related contexts.
  • ParameterSummary-allOf[1]
Nested Schema : Parameter
Type: object
Job configuration parameter, identified by context name / parameter name. Contains a single value. In case the value is not defined on given context, the value is populated from metadata (default value) or from the GLOBAL context. Alternatively, user can ask to see values from all related contexts.
Show Source
Nested Schema : ParameterSummary-allOf[1]
Type: object
Nested Schema : contextValues
Type: object
Additional Properties Allowed
Show Source
Parameter values from all related contexts / metadata
Nested Schema : value
Parameter value
Match One Schema
Show Source
Nested Schema : TargetSummary
Type: object
Summary information about a target.
Show Source
Examples

Back to Top

Response

Supported Media Types

200 Response

Status of job creation. Runtime behavior returns at least the created `id` and `links`. Use `GET /jobs/{id}` (and `GET /jobs/{id}/executions`) to fetch full details.
Body ()
Root Schema : Job
Type: object
Job resource
Match All
Job resource
Show Source
  • JobSummary
    An object representing a job definition. This is not an execution record.
Nested Schema : JobSummary
Type: object
An object representing a job definition. This is not an execution record.
Show Source
Nested Schema : executions
Type: array
Execution collection for this job when `expand=executions` is set. Use this collection (or `/jobs/{jobId}/executions`) for runtime/run-result statuses.
Show Source
Nested Schema : parameters
Type: array
show parameters collection used by this job when expand=parameters is set. Includes runtime properties when configured.
Show Source
Nested Schema : targets
Type: array
show targets collection used by this job when expand=targets is set
Show Source
Nested Schema : ExecutionSummary
Type: object
This is the representation of an Execution.
Match All
This is the representation of an Execution.
Show Source
Nested Schema : ExecutionDetails
Type: object
It represents an execution.
Show Source
Nested Schema : runtimeData
Type: object
Execution run time data
Match All
Execution run time data
Show Source
Nested Schema : InstanceData
Type: object
This is the representation of instance submission data.
Match All
This is the representation of instance submission data.
This is the representation of instance submission data.
Show Source
Nested Schema : DeploymentProcedureTargetList
Type: array
Defining list of procedure targets
Show Source
Nested Schema : DeploymentProcedureVariableCollection
Type: object
Collections of Procedure Variable
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : DeploymentProcedureTargetCollection
Type: object
Collections of Procedure Target
Show Source
Nested Schema : items
Type: array
The list of targets
Show Source
Nested Schema : DeploymentProcedureTargetSummary
Type: object
This is the representation of Procedure Target
Match All
This is the representation of Procedure Target
Show Source
Nested Schema : DeploymentProcedureTargetDetails
Type: object
Defining Target for Deployment Procedure
Show Source
Nested Schema : CredentialReference
Type: array
This is the representation of credential references.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
The list of procedure variables
Show Source
Nested Schema : DeploymentProcedureVariableSummary
Type: object
This is the representation of Procedure Variable
Match All
This is the representation of Procedure Variable
Show Source
Nested Schema : DeploymentProcedureVariableDetails
Type: object
Defining Variable for Deployment Procedure
Show Source
Nested Schema : ParameterSummary
Type: object
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Match All
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Show Source
  • Parameter
    Job configuration parameter, identified by context name / parameter name. Contains a single value. In case the value is not defined on given context, the value is populated from metadata (default value) or from the GLOBAL context. Alternatively, user can ask to see values from all related contexts.
  • ParameterSummary-allOf[1]
Nested Schema : Parameter
Type: object
Job configuration parameter, identified by context name / parameter name. Contains a single value. In case the value is not defined on given context, the value is populated from metadata (default value) or from the GLOBAL context. Alternatively, user can ask to see values from all related contexts.
Show Source
Nested Schema : ParameterSummary-allOf[1]
Type: object
Nested Schema : contextValues
Type: object
Additional Properties Allowed
Show Source
Parameter values from all related contexts / metadata
Nested Schema : value
Parameter value
Match One Schema
Show Source
Nested Schema : TargetSummary
Type: object
Summary information about a target.
Show Source

401 Response

Unauthorized
Body ()
Root Schema : ErrorResponse
Type: object
Response sent back in the case of an error
Show Source
  • The status code of the error
    Example: IllegalArgument
  • A descriptive error message
    Example: The argument given is not supported

500 Response

Internal Server Error
Body ()
Root Schema : ErrorResponse
Type: object
Response sent back in the case of an error
Show Source
  • The status code of the error
    Example: IllegalArgument
  • A descriptive error message
    Example: The argument given is not supported

503 Response

Service Unavailable
Body ()
Root Schema : ErrorResponse
Type: object
Response sent back in the case of an error
Show Source
  • The status code of the error
    Example: IllegalArgument
  • A descriptive error message
    Example: The argument given is not supported
Back to Top