Using the utility

Edge for Private Cloud v4.19.01

The calls the Edge management API to perform many maintenance tasks.



You invoke from a Management Server node. When you invoke the utility, you must define the following as either environment variables or command line options:

  • ADMIN_EMAIL (corresponds to the admin command line option)
  • EDGE_SERVER (host)

The following example invokes and passes the required values as command line options:

/opt/apigee/apigee-adminapi/bin/ buildinfo list --admin --pwd abcd1234 --host localhost

The following example defines the required options as temporary environment variables and then invokes the utility:

export ADMIN_PASSWORD=abcd1234
/opt/apigee/apigee-adminapi/bin/ servers list

If you do not pass the password as an option or define it as an environment variable, will prompt you to enter it.

Set parameters

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, you can specify the organization name by either:

  • Using the -o command line switch:
    /opt/apigee/apigee-adminapi/bin/ orgs -o testOrg
  • Setting an environment variable named ORG:
    export ORG=testOrg
    /opt/apigee/apigee-adminapi/bin/ 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 option (which corresponds to the EDGE_SERVER environment variable), responds with the following error:

Error with required variable or parameter

If you receive an HTTP STATUS CODE: 401 error, then you entered the wrong password.

Get help

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:

/opt/apigee/apigee-adminapi/bin/ 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:

/opt/apigee/apigee-adminapi/bin/ 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

Pass a file to

The utility is a wrapper around curl. As a result, some 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:

/opt/apigee/apigee-adminapi/bin/ 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:

/opt/apigee/apigee-adminapi/bin/ 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 an XML-formatted request body:

<VirtualHost name="myVHostUtil">

Display debug and API information

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

For example, the following command uses the --debug option. The results display the underlying curl command's output in verbose mode:

/opt/apigee/apigee-adminapi/bin/ orgs add -o testOrg2 --admin --host localhost --debug
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