Using the utility

Edge for Private Cloud v. 4.16.05

Use the utility to perform the same Edge configuration tasks that you perform by making calls to the Edge management API. The advantage to the utility is that it:

  • Use a simple command-line interface
  • Implements tab-based command completion
  • Provides help and usage information
  • Can display the corresponding API call if you decide to try the API

The utility is not a replacement for the apigee-provision utility. The apigee-provision utility actually uses the utility to perform its tasks.

The main differences between the two are:

  • The utility performs atomic functions that replace individual Edge API calls. For example, to create an organization, environment, and virtual host requires three separate commands corresponding to three API calls.
  • The apigee-provision utility is designed to perform a complete high-level operation in a single command. For example, you can create an organization, environment, and virtual host with a single apigee-provision command by passing a config file with all necessary information.

The Edge documentation uses both utilities where appropriate.


The utility is automatically installed when you install the apigee-provision or the apigee-validate utility.

The utility is installed in the following location:

/opt/apigee/apigee-adminapi/bin/ syntax

The utility uses a simple command line syntax. At any time, use the tab key to display a prompt that lists the available command options.

To see all possible commands, invoke the utility with no options:


If you press the tab key after typing, you will see the list of possible options:

analytics  classification  logsessions  regions  securityprofile  userroles
buildinfo  GET             orgs         runtime  servers          users

The tab key displays options based on the context of the command. If you enter the tab key after typing:

> orgs

You will see the possible options for completing the orgs command:

add  apis  apps  delete  envs  list  pods  userroles

Use the -h option to display help for any command. For example, if you use the -h option as shown below:

> orgs -h

The utility displays complete help information for all possible options to the orgs command. The first item in the output shows the help for the "orgs add" command:

orgs add
    -o ORG Organization name
    -H HEADER add http header in request
    --admin ADMIN_EMAIL admin email address
    --pwd ADMIN_PASSWORD admin password
    --host EDGE_SERVER edge server to make request to
    --port EDGE_PORT port to use for the http request
    --ssl set EDGE_PROTO to https, defaults to http
    --debug ( set in debug mode, turns on verbose in curl )
    -h      Displays Help

Setting parameters using command-line switches and environment variables

You must enter all parameters to a command by using either command-line switches, or by using environment variables. Prefix the command line switches with a single dash (-) or double dash (--) as required.

For example, from the help show above for the the "orgs add" command, you can specify the organization name by either:

  • Using the -o command line switch:
    > orgs -o testOrg
  • Setting an environment variable named ORG:
    > export ORG=testOrg
    > orgs

If you omit any required parameters to the command, the utility displays an error message describing the missing parameters. For example, if you omit the --host or EDGE_SERVER environment variable specifying the Edge Management Server when creating an org, you see the following error message:

Error with required variable or parameter

Two common parameters that you often set as environment variables are the sys admin email address and IP address of the Management Server:

> export
> export EDGE_SERVER=

Passing a file to the utility

Some utility commands correspond to PUT and POST API calls that take a request body. For example, creating a virtual host corresponds to a POST API call that requires information about the virtual host in the request body.

When using the utility to create a virtual host, or any command that takes a request body, you can pass all of the necessary information on the command line as shown below:

> orgs envs virtual_hosts add -e prod -o testOrg --host localhost --admin -v myVHostUtil -p 9005 -a

Or, you can pass a file containing the same information as would be contained in the request body of the POST. For example, the following command takes a file defining the virtual host:

> orgs envs virtual_hosts add -e prod -o testOrg --host localhost --admin -f vhostcreate

where the file vhostcreate contains the POST body of the call. In this example, it is a XML-formatted request body:

<VirtualHost name="myVHostUtil">

Displaying debug and API information

Use the --debug option to the utility to display detailed information about the command. This infomration includes the cURL command generated by the utility to perform the operation.

For example, this command uses the --debug option:

> orgs add -o testOrg2 --admin --host localhost --debug

And displays the following output, including the generated cURL command:

curl -H Content-Type: application/xml -v -X POST     -s -k -w \n==> %{http_code} 
-u ********     http://localhost:8080/v1/o -d <Organization name="testOrg2" 
* About to connect() to localhost port 8080 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 8080 (#0)
* Server auth using Basic with user ''
> POST /v1/o HTTP/1.1
> Authorization: Basic c2dp234234NvbkBhcGlnZ2342342342342341Q5
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1
Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:8080
> Accept: */*
> Content-Type: application/xml
> Content-Length: 43
} [data not shown]
< HTTP/1.1 201 Created
< Content-Type: application/json
< Date: Tue, 03 May 2016 02:08:32 GMT
< Content-Length: 291
{ [data not shown]
* Connection #0 to host localhost left intact
* Closing connection #0

Send feedback about...

Edge for Private Cloud v4.16.05