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
- application/json
Root Schema : schema
Type:
objectCreate job operation request body
Show Source
-
credentials: array
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`. -
description: string
Job description
-
isLibrary: boolean
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.
-
isReplaceParameters: boolean
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
-
isReplaceTargets: boolean
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
-
libraryName: string
If set together with `isLibrary=true` and optional `libraryOwner`, then it submits library job with that name
-
libraryOwner: string
If set it will match the library job owner to be submitted
-
name(required): string
Job name
-
parameters: array
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.
-
runAsUser: string
user as which job should be run
-
runtimeProperties: array
runtimeProperties
Optional runtime properties for job submission. This is a generic runtime property collection; supported property names and values depend on runtime support.
-
schedule: object
Schedule
Defining time schedule
-
system: number
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: array
targets
list of targets
-
type(required): string
Job type
Nested Schema : credentials
Type:
arrayList 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
-
Array of:
object Credential
Credentials object
Nested Schema : parameters
Type:
arrayList 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
-
Array of:
object ParameterSummary
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Nested Schema : runtimeProperties
Type:
arrayOptional runtime properties for job submission.
This is a generic runtime property collection; supported property
names and values depend on runtime support.
Show Source
-
Array of:
object ParameterSummary
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Nested Schema : Schedule
Type:
objectDefining time schedule
Show Source
-
isTargetZoneUsed: boolean
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 conditionExample:
true -
recurring: string
Frequency at which the operation must be executed repeatedlyExample:
Weekly -
scheduleType: string
Currently we support ical specification default is ICAL, in future it can be extended to other types e.g CRON.
-
startGracePeriodInMinutes: number
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 -
timeToEnd: string
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 -
timeToStart: string
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:
arraylist of targets
Show Source
-
Array of:
object TargetSummary
Summary information about a target.
Nested Schema : Credential
Type:
objectCredentials object
Show Source
-
credentialType: string
Allowed Values:
[ "NormalCredentials", "SYSDBACredentials", "MonitoringCredentials", "NormalCredentials", "PrivilegedCredentials" ]resource credentials type -
name(required): string
credentials name
-
owner(required): string
credentials owner
-
targetName(required): string
target name
-
targetType(required): string
Target type for the credential association. For SQLScript jobs on an `oracle_database` target, use `targetType: oracle_database` for both the `defaultHostCred` entry and the `defaultDBCred` entry.
-
usage(required): string
Credentials usage name, for example `defaultHostCred`. Usage values are case-sensitive. For SQLScript database jobs use exact values `defaultHostCred` and `defaultDBCred`.
Nested Schema : ParameterSummary
Type:
objectJob 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
-
object
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.
-
object
ParameterSummary-allOf[1]
Nested Schema : Parameter
Type:
objectJob 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
-
contextName(required): string
Context name
-
contextValues: object
contextValues
Additional Properties Allowed: additionalPropertiesParameter values from all related contexts / metadata
-
links(required): object
SelfLink
A link to self
-
name(required): string
Parameter name
-
value(required):
value
Parameter value
Nested Schema : ParameterSummary-allOf[1]
Type:
objectNested Schema : contextValues
Type:
objectAdditional Properties Allowed
Show Source
Parameter values from all related contexts / metadata
Nested Schema : SelfLink
Type:
objectA link to self
Show Source
-
self(required): object
Link
A link referencing to another api
Nested Schema : Link
Type:
objectA link referencing to another api
Show Source
-
href: string
the reference
Nested Schema : TargetSummary
Type:
objectSummary information about a target.
Show Source
-
blackoutStatus: string
Target blackout status display name.Example:
Started -
displayName(required): string
Display of the targetExample:
My Database Instance -
id(required): string
Target IDExample:
D91786E288D35455C3ADA1B329B49BB5 -
links: object
links
Target related links
-
name(required): string
Target NameExample:
my_database -
owner(required): string
Owner of the targetExample:
SYSMAN -
status: string
Allowed Values:
[ "DOWN", "UP", "METRIC_ERROR", "AGENT_DOWN", "UNREACHABLE", "BLACKOUT", "PENDING", "REMOTE_HOST_UNREACHABLE" ]This is the representation of a target status.Example:UP -
statusDisplayName: string
Localized statusExample:
Hochgefahren -
statusIconPath: string
Path to the status icon which is used in UIExample:
/sdk/core/uifwk/images/status/stat_arrowup_16.png -
typeDisplayName(required): string
Localized type display name of the targetExample:
Datenbankinstanz -
typeName(required): string
Target Type NameExample:
oracle_database
Examples
Back to Top
Response
Supported Media Types
- application/json
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.
Root Schema : Job
Type:
objectJob resource
Match All
Job resource
Show Source
-
object
JobSummary
An object representing a job definition. This is not an execution record.
Nested Schema : JobSummary
Type:
objectAn object representing a job definition.
This is not an execution record.
Show Source
-
description(required): string
Job description
-
executionCount: number
Number of executions recorded for this job definition
-
executions: array
executions
Execution collection for this job when `expand=executions` is set. Use this collection (or `/jobs/{jobId}/executions`) for runtime/run-result statuses.
-
id(required): string
Job id
-
isCorrectiveAction(required): boolean
Determine if Job is CA job
-
isLibrary(required): boolean
Determine if Job is library job
-
links(required): object
links
Navigation links for this job
-
name(required): string
Job name
-
owner(required): string
Job owner
-
parameterCount: number
Number of parameters used by the job
-
parameters: array
parameters
show parameters collection used by this job when expand=parameters is set. Includes runtime properties when configured.
-
runAsUser: string
Job run as user
-
status(required): number
Job definition status (job-level state, not execution result). 0 = Active - Job is running 1 = Suspended - Job was suspended 2 = Stopped - Job was stopped 3 = Reassigned - The owner was changed typically because the original owner was deleted 4 = Expired - The job type was disabled 5 = Delete Pending - The job is logically deleted and will be purged. Objects set to delete pending may be deleted at any time by background processes and should generally be treated as if they are already deleted.
-
statusDisplayName(required): string
Allowed Values:
[ "Active", "Suspended", "Stopped", "Reassigned", "Expired", "Delete Pending" ]Human-readable form of job definition status (maps to `status` values above). -
system: number
Determine if Job is system job 0 = User visible job(not system job) 1 = One time system job 2 = Retry system job 3 = System job associated with a http session
-
targetCount: number
Number of targets used by the job
-
targets: array
targets
show targets collection used by this job when expand=targets is set
-
type(required): string
Job type
Nested Schema : executions
Type:
arrayExecution collection for this job when `expand=executions` is set.
Use this collection (or `/jobs/{jobId}/executions`) for runtime/run-result statuses.
Show Source
-
Array of:
object ExecutionSummary
This is the representation of an Execution.
Nested Schema : links
Type:
objectNavigation links for this job
Show Source
-
executions: object
Link
A link referencing to another api
-
parameters: object
Link
A link referencing to another api
-
self(required): object
Link
A link referencing to another api
-
targets: object
Link
A link referencing to another api
Nested Schema : parameters
Type:
arrayshow parameters collection used by this job when expand=parameters is set.
Includes runtime properties when configured.
Show Source
-
Array of:
object ParameterSummary
Job parameter summary returned by LIST operation. Maps directly to Parameter object.
Nested Schema : targets
Type:
arrayshow targets collection used by this job when expand=targets is set
Show Source
-
Array of:
object TargetSummary
Summary information about a target.
Nested Schema : ExecutionSummary
Type:
objectThis is the representation of an Execution.
Match All
This is the representation of an Execution.
Show Source
-
object
ExecutionDetails
It represents an execution.
Nested Schema : ExecutionDetails
Type:
objectIt represents an execution.
Show Source
-
id: string
Unique identifier for an executionExample:
CDAAE80FDD3D7987E053E00F4B64DEBB -
links: object
links
the Execution related links
-
name: string
Name of of an instanceExample:
hostcmd-executiontest -
runtimeData: object
runtimeData
Execution run time data
-
status: string
Represents status of an executionExample:
COMPLETED
Nested Schema : links
Type:
objectthe Execution related links
Show Source
-
self: object
Link
A link referencing to another api
Nested Schema : runtimeData
Type:
objectExecution run time data
Match All
Execution run time data
Show Source
-
object
allOf
InstanceData
This is the representation of instance submission data.
Nested Schema : Link
Type:
objectA link referencing to another api
Show Source
-
href: string
the reference
Nested Schema : InstanceData
Type:
objectThis 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
-
array
DeploymentProcedureTargetList
Defining list of procedure targets
-
object
DeploymentProcedureVariableCollection
Collections of Procedure Variable
Nested Schema : DeploymentProcedureTargetList
Type:
arrayDefining list of procedure targets
Show Source
Nested Schema : DeploymentProcedureVariableCollection
Type:
objectCollections of Procedure Variable
Show Source
-
items: array
items
The list of procedure variables
Nested Schema : items
Type:
Show Source
object-
name: string
name of target typeExample:
host -
targets: object
DeploymentProcedureTargetCollection
Collections of Procedure Target
Nested Schema : DeploymentProcedureTargetCollection
Type:
objectCollections of Procedure Target
Show Source
-
items: array
items
The list of targets
Nested Schema : items
Type:
arrayThe list of targets
Show Source
-
Array of:
object DeploymentProcedureTargetSummary
This is the representation of Procedure Target
Nested Schema : DeploymentProcedureTargetSummary
Type:
objectThis is the representation of Procedure Target
Match All
This is the representation of Procedure Target
Show Source
-
object
DeploymentProcedureTargetDetails
Defining Target for Deployment Procedure
Nested Schema : DeploymentProcedureTargetDetails
Type:
objectDefining Target for Deployment Procedure
Show Source
-
credentialReferences: array
CredentialReference
This is the representation of credential references.
-
targetName: string
Target NameExample:
host1.oracle.com -
targetType: string
Target TypeExample:
host
Nested Schema : CredentialReference
Type:
arrayThis is the representation of credential references.
Show Source
Nested Schema : items
Type:
Show Source
object-
credentialName: string
Represents credential nameExample:
EMGA -
credentialType: string
Represents type of the credentialExample:
NAMED -
owner: string
Represents owner of the credentialExample:
SYSMAN -
usage: string
Represents credential usageExample:
defaultHostCred
Nested Schema : items
Type:
arrayThe list of procedure variables
Show Source
-
Array of:
object DeploymentProcedureVariableSummary
This is the representation of Procedure Variable
Nested Schema : DeploymentProcedureVariableSummary
Type:
objectThis is the representation of Procedure Variable
Match All
This is the representation of Procedure Variable
Show Source
-
object
DeploymentProcedureVariableDetails
Defining Variable for Deployment Procedure
Nested Schema : DeploymentProcedureVariableDetails
Type:
objectDefining Variable for Deployment Procedure
Show Source
-
variableName: string
Displays Deployment Procedure varibale nameExample:
userId -
variableValue: string
Displays Deployment Procedure varibale valueExample:
10001
Nested Schema : ParameterSummary
Type:
objectJob 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
-
object
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.
-
object
ParameterSummary-allOf[1]
Nested Schema : Parameter
Type:
objectJob 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
-
contextName(required): string
Context name
-
contextValues: object
contextValues
Additional Properties Allowed: additionalPropertiesParameter values from all related contexts / metadata
-
links(required): object
SelfLink
A link to self
-
name(required): string
Parameter name
-
value(required):
value
Parameter value
Nested Schema : ParameterSummary-allOf[1]
Type:
objectNested Schema : contextValues
Type:
objectAdditional Properties Allowed
Show Source
Parameter values from all related contexts / metadata
Nested Schema : SelfLink
Type:
objectA link to self
Show Source
-
self(required): object
Link
A link referencing to another api
Nested Schema : TargetSummary
Type:
objectSummary information about a target.
Show Source
-
blackoutStatus: string
Target blackout status display name.Example:
Started -
displayName(required): string
Display of the targetExample:
My Database Instance -
id(required): string
Target IDExample:
D91786E288D35455C3ADA1B329B49BB5 -
links: object
links
Target related links
-
name(required): string
Target NameExample:
my_database -
owner(required): string
Owner of the targetExample:
SYSMAN -
status: string
Allowed Values:
[ "DOWN", "UP", "METRIC_ERROR", "AGENT_DOWN", "UNREACHABLE", "BLACKOUT", "PENDING", "REMOTE_HOST_UNREACHABLE" ]This is the representation of a target status.Example:UP -
statusDisplayName: string
Localized statusExample:
Hochgefahren -
statusIconPath: string
Path to the status icon which is used in UIExample:
/sdk/core/uifwk/images/status/stat_arrowup_16.png -
typeDisplayName(required): string
Localized type display name of the targetExample:
Datenbankinstanz -
typeName(required): string
Target Type NameExample:
oracle_database
401 Response
Unauthorized
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error
Show Source
-
code: string
The status code of the errorExample:
IllegalArgument -
message: string
A descriptive error messageExample:
The argument given is not supported
500 Response
Internal Server Error
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error
Show Source
-
code: string
The status code of the errorExample:
IllegalArgument -
message: string
A descriptive error messageExample:
The argument given is not supported
503 Response
Service Unavailable
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error
Show Source
-
code: string
The status code of the errorExample:
IllegalArgument -
message: string
A descriptive error messageExample:
The argument given is not supported