IntroductionΒΆ

The WebFaction API is an XML-RPC interface for managing many control panel and account tasks. With the WebFaction API, you can automate application installation, email address configuration, and more.

Like other XML-RPC APIs, the WebFaction API works by sending a short piece of XML over HTTP. Luckily, many languages have XML-RPC libraries to help you make such requests.

For example, you can send an XML-RPC request using Python‘s xmlrpclib module:

>>> import xmlrpclib
>>> server = xmlrpclib.ServerProxy('https://api.webfaction.com/')
>>> session_id, account = server.login('widgetsco', 'widgetsrock', 'Web500', 2)

Or with Ruby’s xmlrpc package:

>> require 'xmlrpc/client'
=> true
>> require 'pp'
=> true
>> server = XMLRPC::Client.new2("https://api.webfaction.com/")
#<XMLRPC::Client:0x5b1698 @cookie=nil, @create=nil, @port=443>
>> pp server.call("login", "widgetsco", "widgetsrock", "Web55", 2)
["ca4c008c24c0de9c9c8",
 {"mail_server"=>"Mail5",
  "web_server"=>"Web55",
  "username"=>"widgetsco",
  "id"=>687,
  "home"=>"/home"}]
=> nil

To learn more about XML-RPC and find an implementation in your favorite language, please visit XMLRPC.com.

For a more in-depth tour of the API, see Tutorial. For a complete reference of calls, parameters, and return values, see API Reference.

Table Of Contents


Search the documentation


Example: "configure email"
or "create database"