API for All Users

Plain HTML / Printer friendly.Plain HTML / Printer friendly.

 

Gateways

API is accessible for all users through:

Most up-to-date languages have XML-RPC, HTTP and JSON modules or libraries, which allows you to easily interact with our services.

 

References

The quickest way to find out what are the supported methods is through the system.listMethods introspection from commonly implemented by many XML-RPC clients and servers. For HTTP+JSON, send your request to /api/rpc?v=2&s=system&m=listMethods&no_auth.

For further explanations on the API, refer to the API Reference Document. If you require them as a ZIP or tarball, please contact us.

 

Usage

Authentication

Except methods of system namespace, all methods require a username and API key (generated through the Portal) for identification and authentication purposes. For better credential control, we do not recommend you to share the same key for all API clients.

The first two parameters of a method are mandatory and meant for your credentials, e.g. surrogate.get('username', 'secret', ...). Your username is your email registered with our system (unless you customized it), contact support otherwise if it does not work.

 

Examples

Examples in PHP

Client Construction
$prefix = 'user';
$client = XML_RPC2_Client::create('http://api.aflexi.net/core/xmlrpc', array(
    'prefix' => $prefix
));

 

Retrieving a list of Publishers
$prefix = 'publisherLink';
$client = ...
$client->get($u, $s, array('status' => array('ACTIVE', 'VALIDATING')), array('maximumResults' => 40));

 

Examples in Java/Groovy

There's no huge distiction on how an XML-RPC request can be constructed in other languages. We have some Groovy scripts written a while back that you may find useful.

 

HTTP+JSON

The HTTP+JSON service is written on top of the XML-RPC service. We use it internally for Portal's AJAX features and we only recommend it to Publishers for private labeling reason, but if there is a need to, you can read about its usage notes from this page.