Chapter 2. Using XML-RPC with the Red Hat Satellite API


XML-RPC uses HTTP to send an XML-encoded request to a server. The request contains the following:
Namespace
A namespace is a grouping of methods based upon a particular function, object or resource. For example, the auth namespace groups authentication function, or the errata namespace groups function that control errata.
Method
A method represents a certain action. Each method controls a specific function of the Red Hat Satellite. For example, the login method in the auth namespace logs a user into Red Hat Satellite and returns a session key.
Parameter
A parameter is a piece of input to control specific aspects of a method. For example, the login method in the auth namespace requires username and password parameters to specify the login details of a certain user. The login method also accepts an optional duration parameter to specify the length of time until the user session expires..
The XML-encoded request usually appears in the following structure:
<methodCall>
  <methodName>namespace.method</methodName>
  <params>
    <param>
      <value><name>parameter</name></value>
    </param>
    <param>
      <value><name>parameter</name></value>
    </param>
    ...
  </params>
</methodCall>
Copy to Clipboard Toggle word wrap
For example, use the following XML-RPC request to retrieve a list of all Red Hat Satellite API namespaces:
<methodCall>
  <methodName>auth.login</methodName>
  <params>
    <param>
      <value><username>admin</username></value>
    </param>
    <param>
      <value><password>p@55w0rd!</password></value>
    </param>
  </params>
</methodCall>
Copy to Clipboard Toggle word wrap
In this example, the request sends the username and password as a parameters to the login method, which is a part of the auth namespace. The Satellite server returns the following response:
<methodResponse>
  <params>
    <param>
      <value><sessionKey>83d8b35f</sessionKey></value>
    </param>
  </params>
</methodResponse>
Copy to Clipboard Toggle word wrap
The response contains a returned parameter for sessionKey, which is a key used to authenticate most of the API methods.
Most programming languages include XML-RPC modules and libraries that automatically parse the desired method and parameters into the XML-encoded request and parse the resulting response as returned variable. For examples, see Part II, “Examples”.
For more information about XML-RPC, see http://www.xmlrpc.com/.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat