Requesting examples of how to access AEWS (AutoSys WebSerice) via curl commands to display the JIL of a job and insert and update the definition.
Here is an example of how to view the job definition via AEWS
curl -X GET "https://localhost:9443/AEWS/jil/job?name=<jobname>&timeout=300" -k --user "<username>:<password>" -i
Replace the <jobname> with an actual job name.
Replace the <username>:<password> with a valid id/password combination that can successfully query the AEWS.
This means a valid user in EEM that is a member of the WorkloadAutomationAEWebService group.
Example of updating a job's definition via AEWS.
Here is an example of how to insert a job:
curl -X POST "https://localhost:9443/AEWS/command/run" -H "accept: */*" -H "Content-Type: application/xml" -d "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commandRequest>\t<timeout>0</timeout>\t<command>jil < %InFile</command><inFile>insert_job: jil_test job_type:cmd machine: localhost command: sleep 30</inFile></commandRequest>" -k --user <username>:<password>
To update the job, change the insert_job to update_job and adjust the values for the other job definition attributes you want to modify
Example of an update_job:
curl -X POST "https://localhost:9443/AEWS/command/run" -H "accept: */*" -H "Content-Type: application/xml" -d "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commandRequest>\t<timeout>0</timeout>\t<command>jil < %InFile</command><inFile>update_job: jil_test command: sleep 300</inFile></commandRequest>" -k --user <username>:<password>
For more details see: AEWS details