AppNexus Cloud Services Application Programming Interface and Command-Line Tools
The Application Programming Interface and the associated command-line tools are your way of interacting with the AppNexus Cloud.
This documentation is for the AppNexus Cloud services. If you're looking for documentation on API services for the AppNexus Console, see the AppNexus Console API.
The manual pages for each command are available below as well as inside the AppNexus environment. Please note that there are some functions that can also be accessed through the graphical Customer Portal (https://portal.appnexus.com/) such as viewing a list of your reserved servers and viewing a list your current ACLs.
To authenticate yourself in order to use the API, you will use the same individual username and password that you use for the Customer Portal. Authentication can be done one of two ways:
- Specify your login in the command line. Note that due to security purposes the password is replaced by an 'xxx' sequence in the process list.
- Place your credentials into the CLI configuration file '
rpc.cfg' (expected locations:
/etc/appnexus/). The CLI then behaves as if the login is in the command line.
Syntax for the '
rpc.cfg' configuration file:
Note that hashes (#) contained in passwords must be escaped by preceding them with a backslash (\).
The most secure method of authenticating with a username/password is to type the username into the command line or in the "rpc.cfg" configfile, but not the password. This avoids a record of the password on the disk in the shell history file. The user will be prompted for a password, and this time the password will not be displayed on the screen during typing, and will not be recorded in any files, including the API logs on API servers.
Client certificate authentication is not supported anymore.
Linux Man Pages for the AppNexus CLI
Reserve, modify, release, and restart servers as well as list reserved and available servers.
Launch, list, modify, shutdown, bundle, and restart instances.
Manage disk volumes on instances
List available load balancers
Reserve a floating IP address in order to create a load-balancing pool.
Manage your local load-balancing pools by listing, creating, modifying, deleting them, managing search and request strings, and adding and deleting individual nodes.
View and manage your IP address space
View and manage your Network Attached Storage
To update to the latest version of the AppNexus CLI:
Please install the new RPM package via one of the following steps.
A) If the management instance is configured to use the AppNexus YUM repository, run:
B) If you'd rather install the RPM manually, run:
- Yum Repository Configuration Files (Contains API update files)
API Servers in Each Datacenter
- Each datacenter runs its own copy of an API server and its own API database. There are two locally load balanced API server nodes in each datacenter for redundancy.
- API servers are globally load balanced. In normal conditions all informational requests are directed to their local API server. If the local server fails, commands are redirected to the API server in another datacenter.
- For efficiency, all "list" CLI commands (e.g.
manage-server list) are directed to the API server in the datacenter where the command was issued.
- CLI commands that perform "real" actions are directed to the datacenter where the manipulated object is.
Managing API Users
Please see: Managing API Users.