Add/Update Scheduler
Use these APIs to provide all necessary scheduler data to the REST API. The caller is responsible for beginning and ending the transaction by calling /startTransaction and /endTransaction/{transactionId} before and after supplying all data. This will provide the caller with a transactionId to reference in the individual calls. During edits or updates, if a resource that was present on an existing scheduler is not included in the data in the update, it will be treated as a request to delete that resource from the scheduler. Within the transaction, the calls can be made in any order:
Create/edit scheduler
begin transaction
in any order: {
create/edit jobs
create/edit conditions
create/edit machines
create/edit calendars
create/edit resources
}
end transaction
This page includes the following:
Requests
You can use the following requests to add or update a scheduler:
| HTTP Verb | Resource | Input | Expected Output (HTTP/1.1) |
|---|---|---|---|
| POST | /schedulers | {
“name” : [String],
“schedulerType” : [String],
“instanceName” : [String]
}
|
Success Code: 201 Created Content: {
“schedulerId”: [String]
}
|
| POST | /calendar | {
“transactionId” : [String],
“data” : [{
“calendarName” : [String],
“calendarDates” : [[String],...],
“altCalendarDates” : [[String],...],
“periodType”: [String],
“interval”: [Integer],
“intervalOrigin”: [ [String],… ],
“intervalEnd”: [ [String],…]
}]
}
|
Success Code: 202 Accepted Content: {} |
| POST | /conditions | {
“transactionId” : [String],
“data” : [{
“jobIdentifier” : [String],
“rootCondition” : {
“type” : [String],
“operator” : [String],
“condMode” : [String],
“joinValue” : [Integer],
“conditions” : [{
“type” : [String],
“dependantJobIdentifier” : [String],
“dependantJobServerName” : [String],
“value” : [Integer],
“testGlovalue” : [String],
“lookbackSecs” : [Long],
“matchingCriteriaType”: [String],
“matchingCriteriaFrom”:[Integer],
“matchingCriteriaTo”:[Integer],
“isExternal”: [boolean]
}
]
}
}]
}
For more information, see Appendix C - Condition Usage Examples. |
Success Code: 202 Accepted Content: {} |
| POST | /machines | {
“transactionId” : [String],
“data” : [{
“name” : [String],
“parentName” : [String],
“status” : [String],
“type” : [String],
“maxLoad” : [Integer]
“properties” :
[{“propertyName”: [String],
“propertyValue” : [String],
“propertyType” : [String]
}]
}]
}
|
Success Code: 202 Accepted Content: {} |
| POST | /jobs | {
“transactionId” : [String],
“data” : [{
“jobId” : [String],
“jobName” : [String],
“parentJobId” : [Integer],
“jobType” : [String],
“machine” : [String],
“properties” :
[{“propertyName”: [String],
“propertyValue” : [String],
“propertyType” : [String]
}]
}]
}
|
Success Code: 202 Accepted Content: {} |
| POST | /resource | {
“transactionId” : [String],
“data” : [{
“name” : [String],
“status” : [String],
“type” : [String],
“limit” : [Integer],
“properties” :
[{“propertyName”: [String],
“propertyValue” : [String],
“propertyType” : [String]
}]
}]
}
|
Success Code: 202 Accepted Content: {} |
Add/Update Scheduler Data Dictionary
Scheduler Fields
-
name
Allowed values: Name of new scheduler
Must be unique in JAWS
-
schedulerType
Allowed values:
-
AutoSys Custom
-
Application Landscape
-
Custom AutoSys V2
-
IWS
-
IWSd
Note:-
IWS means IWS/z scheduler type
-
Not updatable
-
-
instanceName
For AutoSys Custom and Custom AutoSys V2
Allowed values: Alternate reference name
-
path1
For IWS/z
Allowed values: Definition path
-
path2
For IWS/z
Allowed values: Event path
-
serverName2
For IWS/z and IWS/d
Allowed values: IWS Connector API URL
-
databaseUserId
Allowed values:
-
Default Calendar Name for IWS/z
-
User ID for DBMS for IWS/d
-
-
timeZone
For IWS/z and IWS/d
Allowed values: Time zone
-
serverName
Allowed values:
-
Plan extend time (hh:mm) for IWS/z
-
Host name for IWS/d
-
-
databaseName
For IWS/z
Allowed values: Plan extend from time (hh:mm)
-
archivePattern
For IWS/z
Allowed values: Date/Time format
Preset formats (by name):
-
Default
Format: yyMMdd.HHmm
-
Connect:Direct &JDATE.&SUBTIME
Format: yyyyDDD.HHmmss
-
Connect:Direct &SUBDATE.&SUBTIME
Format: 1yyMMdd.HHmmss
-
Connect:Direct &SUBDATE1.&SUBTIME
Format: yyyyMMdd.HHmmss
-
Connect:Direct &SUBDATE2.&SUBTIME
Format: yyyyddMM.HHmmss
-
Connect:Direct &SUBDATE3.&SUBTIME
Format: MMddyyyy.HHmmss
-
Connect:Direct &SUBDATE4.&SUBTIME
Format: ddMMyyyy.HHmmss
Or custom format follows Java SimpleDateFormat. For more information, see Class SimpleDateFormat.
-
-
databaseType
For IWS/d
Allowed values: Scheduler DBMS
-
serverPort
For IWS/d
Allowed values: Port for Scheduler DBMS
-
databaseName
For IWS/d
Allowed values: Database name or service name (for Oracle)
-
databasePassword
For IWS/d
Allowed values: Password for DBMS
-
databaseName2
For IWS/d
Allowed values: IWS API URL
-
databaseUserUd2
For IWS/d
Allowed values: IWS API User ID
-
databasePassword2
For IWS/d
Allowed values: IWS API Password
-
startTime
For IWS/d
Allowed values: Start Time of Day (hh:mm)
Calendar Fields
-
transactionId
Allowed values: Id of a currently open transaction
-
calendarName
Allowed values: Calendar name or period name
-
calendarDates
Allowed values: A collection of dates belonging to the calendar
Format : yyyy-MM-dd
Leave blank for period
-
periodType
Allowed values: A, W, N
-
A: all days cyclic
-
W: work days only cyclic
-
N: noncyclic
-
-
interval
For cyclic periods, number of days. For noncyclic periods, leave blank.
-
intervalOrigin
Allowed values: A collection of start dates
Format: yyyy-MM-dd
For cyclic periods, the date of the start of the first interval in the period. For noncyclic periods, the start of every interval.
-
intervalEnd
Allowed values: A collection of end dates
Format: yyyy-MM-dd
For cyclic periods, leave blank. For noncyclic periods, the end of every interval; the intervals must not overlap. If left blank, the interval ends the day before the next interval.
Condition Fields
-
jobIdentifier
Allowed values: A unique identifier of a job
For AutoSys this would be the jobName, for every other scheduler this will refer to jobId.
-
type
Allowed values:
-
AutoSys:
Conjunction,s,e,f,t,d,success,failure,terminated,done,exitcode,global,g,notrunning,n,r,x
-
IWS/d:
Success, Failure, Abend, Suppress, JobStarted
Note:-
f type = s, success, f, failure, t, terminated, d, done, n, notrunning, x then the only other attribute required is dependantJobIdentifier
-
If type = g, global then attributes dependantJobIdentifier, operator and testGlovalue are also required
-
If type = e, exitcode then attributes dependantJobIdentifier, operator and value are also required
-
-
operator
Allowed values: &,|,<,<=,>,>=,!=,=
If type = conjunction operator can be & or |. If type is e, exitcode, g, or global then operator must be one of the other allowable values
-
joinValue
Allowed values: The number of conditions in an OR conjunction that must be satisfied.
Example
s(j1) OR s(j2) OR s(j3)
Default: 1
joinValue=2 means that ANY two of the above success conditions must be true for the complete condition to be satisfied.
-
condMode
Allowed values: job_start, box_success, box_failure
Default: job_start
-
conditions
Notes: A collection of subconditions for a conjunction (otherwise should not be included). Must be at least 2.
-
dependantJobIdentifier
Notes: Identifier of predecessor job
-
dependantJobServerName
Server that predecessor job lives on, default is null which is same server as job. For custom AutoSys this is instanceName
-
value
Exit code values
-
testGlovalue
Global values required only if type is g or global
-
lookbackSecs
Time that condition is valid
-
matchingCriteriaType
(IWS)C,S,R,A
-
matchingCriteriaFrom
A positive or negative duration in millis
-
matchingCriteriaTo
A positive or negative duration in millis
-
isExternal
Optional, indicates internal/external condition. Default is false(internal)
Machine Fields
-
name
Allowed values: Name of machine
-
parentName
Allowed values: Virtual parent
-
status
Allowed values: One digit or letter referring to status
Default: o (online), anything not m is considered to be offline
-
type
Allowed values: AutoSys machine types: a, c, I, L, n, p, r, u and v or IWS machine types m, f, x, s, b, a, l, y and e
Default:
-
AutoSys: r
-
IWS: a
-
-
maxload
Job Fields
-
jobId
Allowed values: Id of job on scheduler
-
jobName
-
parentJobId
Allowed values: Id of parentJob
-
jobType
Allowed values: c,b,f,w
Note:c is a jobstream in IWS
-
machine
Allowed values: Name of machine associated with job
-
properties
Resource Fields
-
name
-
status
-
type
-
limit
-
resourceMachine