POST /v1/assignNextAvailableIP4Address - BlueCat Integrity - 9.5.0

Address Manager Legacy v1 API Guide

Locale
English
Product name
BlueCat Integrity
Version
9.5.0

Description

Assign the next available IPv4 address. Assigns a MAC address and other properties to the next available and unallocated IPv4 address within a configuration, block, or network.

Parameters

Name Description
action

Location: query

Type: string

This parameter must be set to one of the constants shown in IP assignment action values.
configurationId

Location: query

Type: integer (int64)

The object ID of the configuration in which the IPv4 address is located.
hostInfo

Location: query

Type: string

A string containing host information for the address in the following format:
hostname,viewId,reverseFlag,sameAsZoneFlag[,
hostname,viewId,reverseFlag,sameAsZoneFlag,...]
Where:
  • hostname - The FQDN of the host record to be added.
  • viewId - The object ID of the view under which this host should be created.
  • reverseFlag - The flag indicating if a reverse record should be created. The possible values are true or false.
  • sameAsZoneFlag - The flag indicating if record should be created as same as zone record. The possible values are true or false.

The comma-separated parameters may be repeated in the order shown above. The string must not end with a comma.

macAddress

Location: query

Type: string

The MAC address to assign to the IPv4 address. The MAC address can be specified in the format nnnnnnnnnnnn, nn-nn-nn-nn-nn-nn, or nn:nn:nn:nn:nn:nn, where nn is a hexadecimal value.
parentId

Location: query

Type: integer (int64)

The object ID of the configuration, block, or network in which to look for the next available address.
properties

Location: query

Type: string

A string containing the following property, including user-defined fields:
  • ptrs —a string containing the list of unmanaged external host records to be associated with the IPv4 address in the format:
    viewId,exHostFQDN[, viewId,exHostFQDN,...]
    You can assign External Host records to an IPv4 address using the following method:
    EntityProperties props = new EntityProperties;
    props.addProperty
    ObjectProperties.ptrs,  "123,exHostFQDN.com,456,exHostFQDN.net"
    long addressId = service.assignIP4Address
    configurationId, IPv4Address, macAddressStr, hostInfo, IPAssignmentActionValues.MAKE_STATIC, props.getPropertiesString;
  • name —name of the IPv4 address.
  • locationCode —the hierarchical location code consists of a set of 1 to 3 alpha-numeric strings separated by a space. The first two characters indicate a country, followed by next three characters which indicate a city in UN/LOCODE. New custom locations created under a UN/LOCODE city are appended to the end of the hierarchy. For example, CA TOR OF1 indicates CA= Canada TOR=Toronto OF1=Office 1.
    Note: The code is case-sensitive. It must be all UPPER CASE letters. The county code and child location code should be alphanumeric strings.
  • skip —This is optional. Use to specify the IP address ranges or IP addresses to skip. You can specify multiple IP addresses separated by comma. To specify the range between the start and end addresses, use a hyphen (-). For example,
    skip=192.0.2.128-192.0.2.222,192.0.2.223
  • offset —This is optional. Use to specify from which address to start to assign IPv4 address. For example,
    offset=192.0.2.100
  • excludeDHCPRangetrue or false. To specify whether IP addresses in DHCP ranges should be excluded from assignment. The default value is false. For example,
    offset=192.0.2.100
    excludeDHCPRange=true
  • allowDuplicateHost (optional) —check for duplicate hostnames. There are three possible values for this property:
    • Enable—enable the duplicate host checking process. If a duplicate hostname is found, assignment will be refused.
    • Disable—disable the duplicate host checking process. Duplicate hostnames will be allowed.
      Note: Disable is the default value for allowDuplicateHost.
    • Inherit—set to make the hostname use the option specified in the higher-level parent object.
  • pingBeforeAssign (optional) —specifies whether Address Manager performs a ping check before assigning the IP address. The property can be one of the following values:
    • enable —specifies that Address Manager performs a ping check before assigning the IP address.
      Note:
      • If Address Manager successfully pings the IP address but the address is in use, the following error is returned:
        The address <IP address> is in use.
      • If Address Manager cannot successfully ping the IP address, the following error is returned:
        The address <IP address> is invalid.
    • disable —specifies that Address Manager will not perform a ping check before assigning the IP address.
      Note: This is the default value.

Responses

Code Description
200

Type: APIEntity

Returns the object ID for the newly assigned IPv4 address.