Apex CLI

The REST API can be used by automation tools and is also used by the Apex CLI, for which we will now provide a few examples.

More information about available commands can be found at http://apex.apache.org/docs/apex/apex_cli/.

Assuming the example application is still running, let's attach with the CLI and collect some details from it:

apex@apex-sandbox:~$ apex 
Apex CLI 3.5.0 14.03.2017 @ 08:14:36 UTC rev: d86f0da branch: d86f0da78b7be9bffb30b73c5fa762711dbce379 
apex> list-apps 
{"apps": [{ 
  "startTime": "2017-03-22 04:42:04 +0000", 
  "id": 2, 
  "name": "MyFirstApplication", 
  "state": "RUNNING", 
  "trackingUrl": "http:\/\/apex- sandbox:8088\/proxy\/application_1490156780107_0001\/", "finalStatus": "UNDEFINED", "tags": [] }]} 1 active, total ...

Get Learning Apache Apex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.