Getting, adding, deleting, and updating objects - BlueCat Address Manager - 9.2.0

Address Manager API Guide

BlueCat Address Manager

Use the get, add, delete, and update methods to manipulate Address Manager objects. This example shows the addition of a new configuration with a shared network:
# Add a new configuration with a shared network
my $configuration = APIEntity->new( "id" => 0,
             "name" => "Test Configuration",
             "type" => ObjectTypes::Configuration,
             "properties" =>              ObjectProperties::sharedNetwork."=".$existingSharedNetwork1->
             get_id()."|" );
my $configurationId = $service->addEntity( SOAP::Data->type( 'long' )->
             name( 'parentId' )->
             value( 0 )->
             attr({xmlns => ''}),
SOAP::Data->type( 'APIEntity' )->name( 'entity' )->
             value( $configuration )->
             attr({xmlns => ''}) )->
print "New Configuration id = ".$configurationId.->get_id()."\n";
Use the getUserDefinedFields method to find the user-defined fields with their settings and values in Address Manager. For example:
my @udfs= $service->getUserDefinedFields( SOAP::Data->type( 'string' )->name( 'type' )->value( ObjectTypes::Device )->attr({xmlns => ''}),
SOAP::Data->type( 'boolean' )->name( 'requiredFieldsOnly' )->value( 'false' )
->attr({xmlns => ''}) )

print"number of fields=".@udfs."\n";

for my $eachUDF ( @udfs )
my $udf = BAMConnection->blessAPIUserDefinedField( "object" => $eachUDF );
print $udf->get_name()."\n";
print "Name=".$udf->get_name()."\n";
print "DisplayName=".$udf->get_displayName()."\n";
print "Type=".$udf->get_type()."\n";
print "defaultValue=".$udf->get_defaultValue()."\n";
print "Validator Properties=".$udf->get_validatorProperties()."\n";
print "PredefinedValues=".$udf->get_predefinedValues()."\n";
print "Required=".$udf->get_required()."\n";
print "Hide from search=".$udf->get_hideFromSearch()."\n";
print "Radio=".$udf->get_renderAsRadioButton()."\n";
For almost all object types, the add and most get methods require parentID, which is the ID of the parent object. The following objects can take zero (0) as the parentID:
  • Configuration
  • TagGroup
  • User
  • UserGroup
  • Authenticator