Warning message

Documentation is currently being migrated into the new system. Some pages might be temporarily missing, and some guides might appear empty. Thank you for your patience while we are improving Drupal.org documentation.

XML-RPC overview

Last updated on
November 30, 2016 - 15:26

From Drupal 4.0.x to 7.x, the XML-RPC subsystem is included in Drupal core. In Drupal 8, it has been moved to the XML-RPC contributed module.

The XML-RPC subsystem gives external systems the opportunity to communicate with the site through the XML-RPC protocol. Pointing an XML-RPC client at http://sitename/xmlrpc.php allows this communication to take place. For more information, see the online handbook entry for XML-RPC API.

Performs one or more XML-RPC request(s).

Usage example

$result = xmlrpc('http://example.com/xmlrpc.php', array(
  'service.methodName' => array($parameter, $second, $third),
  • $url: An absolute URL of the XML-RPC endpoint.
  • $args: An associative array whose keys are the methods to call and whose values are the arguments to pass to the respective method. If multiple methods are specified, a system.multicall is performed.
  • $headers: (optional) An array of headers to pass along.
  • @return
    • For one request:
      • Either the return value of the method on success, or FALSE.
      • If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
    • For multiple requests:
      • An array of results. Each result will either be the result returned by the method called, or an xmlrpc_error object if the call failed. See xmlrpc_error().

Issue Queue