Appendix B.
RHN API Access
In an effort to provide customers with added flexibility, RHN makes an application pro-
gramming interface (API) available. This interface can be found by clicking
Help
at the
top-right corner of the RHN website, then clicking
API
in the left navigation bar. Or you
may go directly to: https://rhn.redhat.com/rpc/api/. Use this URL for your XMLRPC server
and your browser.
Warning
This API should be considered experimental and used strictly for evaluation by advanced
users. Red Hat strongly discourages you from using this interface to alter production
systems, unless you are sure your changes will not result in errors.
The RHN API is based upon XML-RPC, which allows distinct pieces of software on dis-
parate systems to make remote procedure calls using XML over HTTP. For this reason,
any calls you make are expected to meet the constraints of XML-RPC. You can find out
more at http://www.xmlrpc.com/.
Because documentation for each class and method is available via the RHN API interface,
this section bypasses a list of classes and methods in favor of tips for using the API effi-
ciently. These include steps for determining required values and a sample script that makes
some of the calls.
B.1. Using the auth Class and Getting the Session
It is worth noting that you will almost invariably use the auth class first. This class offers
a single method, login. Use this to establish an RHN session. It requires values for three
parameters: username, password, and duration. The first two come directly from your RHN
account, while the third is the length of time the session should last in seconds, typically
1200. It returns a session string than can be used in all other methods.
B.2. Obtaining the system_id
Many of the methods require a value for the
system_id
parameter. This is the unique
alphanumeric value assigned to each system when registered to RHN. It can be found
within the
/etc/sysconfig/rhn/systemid
file on each machine. In addition, you may
use the
download_system_id
method within the system class to obtain the value.
Summary of Contents for NETWORK 4.0 -
Page 1: ...Red Hat Network 4 0 Reference Guide...
Page 10: ......
Page 16: ...vi Introduction to the Guide...
Page 24: ...8 Chapter 1 Red Hat Network Overview...
Page 40: ...24 Chapter 2 Red Hat Update Agent Figure 2 11 Available Package Updates...
Page 58: ...42 Chapter 2 Red Hat Update Agent...
Page 80: ...64 Chapter 5 Red Hat Network Registration Client Figure 5 15 Text Mode Welcome Screen...
Page 186: ...170 Chapter 7 Monitoring...
Page 200: ...184 Chapter 8 UNIX Support Guide...
Page 214: ...198 Appendix A Command Line Config Management Tools...
Page 274: ...258 Appendix C Probes...
Page 282: ...266 Glossary...