zoweejesapi

Make requests with the (E)JES REST API to the (E)JES API using options that correspond to object models in the (E)JES REST API swagger documentation. You should refer to that document, refer to chapter 10 of the (E)JES Reference, and issue "zowe ejes api init --helpApp" further details.

All responses are returned in JSON format by using the --rfj (--response-format-json) option.

The tools necessary manage the spool with (E)JES are provided. You will be able to download sysout, email it as PDF, and submit jobs from MVS and the local workstation. All downloads are saved to a file in the current working directory, or to the path specified on the EJES_DOWNLOAD_PATH environment variable.

The CLI generates exit codes. 0 indicates the transaction completed, but you should check the output for (E)JES errors. A non-zero exit code below 100 indicates a problem coding an options or a download file filesystem issue. An exit code above 100 is a response code from the host through the API. If use the host host "return" command in the --command option, you will receive a 500 exit code. Use a stateless init request or issue a term request to avoid this result.

This CLI was developed to provide an easy scripting option to avoid coding directly to the REST API. However, it can be used to experiment with the REST API. The --debug option will return the host requests and responses as objects and properties in JSON.

Usage

zowe ejes api <command>

Where <command> is one of the following:

Examples

Example:

  * `$  zowe ejes api init --cookie write --command "status hrlyjba;1 b"`

Example:

  * `$  zowe ejes api exec -d pdf --cc interpret --rfj --cookie read`

Example:

  * `$  zowe ejes api exec -d pdf --cc interpret --command "status hrlyjbb;1b" --rfj --cookie read`

Example:

  * `$  zowe ejes api term --cookie read`

Example:

  * `$  zowe ejes api cancel-download --rfj --cookie read`

Example:

  * `$  zowe ejes api exec --command "submit api-array;st iefbr14;sort time d;upd" --enumvalue 5 -q message,lines,submittedJobs --rfj --commanddata "//IEFBR14  JOB IEFBR14,'IEFBR14',CLASS=A,MSGCLASS=H\n//EXEC     EXEC PGM=IEFBR14\n//"`

Example:

  * `$  zowe ejes api exec --command "submit api-array;st iefbr14;sort time d;upd" --enumvalue 5 -q message,lines,submittedJobs --rfj --commanddatafile "iefbr14.jcl"`

Commands