Sequence of calls in the client - BlueCat Address Manager - 9.3.0

Address Manager API Guide

English (United States)
Product name
BlueCat Address Manager
The following example shows how to add a host record to an existing zone. It demonstrates a complete session using the Address Manager API from Java.
  1. Connect to the Address Manager API service.
  2. Log in.
  3. Get the parent configuration object by name.
  4. Get the parent view object by name.
  5. Get the parent zone object by name (you can use the absolute name), and then retrieve its child. In this case, to retrieve, we retrieve the parent com to find its child object,
  6. Define a host record object and add it to the parent zone object.
  7. Log out.

public class ProteusAddHostRecord
    public static void main( String[] args ) throws Exception
        ProteusAPI service = APILoginUtils.connect( "ProteusIPAddress" );
        service.login( "api_user", "password" );
        APIEntity existingConfiguration = service.getEntityByName( 0, "Existing Config", ObjectTypes.Configuration );
        APIEntity existingView = service.getEntityByName( existingConfiguration.getId(), "Existing View", ObjectTypes.View );
        long hostRecordId = service.addHostRecord( existingView.getId(), "", ",", 1, "" );