212 Appendix B. RHN API Accessuse the list_user_systems method within the system class to obtain a list of systemsavailable to the user that contains the associated sids.B.4. Viewing the cidLike servers, channels have their own IDs. This value, the cid, is a required parameterfor some methods, including set_base_channel and set_child_channels. Also likethe sid, the cid can be obtained through the RHN website. Just click on the name of achannel and view the end of the URL. It follows the "=" symbol, as part of a string thatresembles the following: "details.pxt?cid=54".B.5. Getting the sgidSystem groups also have their own IDs. This value, the sgid, is a required parameterfor the set_group_membership method, for instance. Like the sid and cid, the sgidcan be obtained through the RHN website. Just click on the name of a system groupand view the end of the URL. It follows the "=" symbol, as part of a string that resem-bles the following: "details.pxt?sgid=334958". Note that the member parameter within theset_group_membership method requires only yes or no as input to make the associa-tion.B.6. Sample API ScriptThe following sample script depicts how to construct an RHN API client. Review thecomments and links for a full discussion of the calls made.#!/usr/bin/perl -wuse strict;use Frontier::Client;use Data::Dumper;############################################################################# This is a sample script for use of the experimental RHN Management APIs. ## The API is currently available using XMLRPC only, which is described in ## depth at: ## ## http://www.xmlrpc.com/ ## ## We use the Frontier modules, available from: ## ## http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?dist=Frontier-RPC ## #############################################################################