Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add

URL/api/v1/api.php?target=ipam&action=add
DescriptionAdds an IPv4 or IPv6 block
Returns

Examples:

SUCCESSFUL{"success":1,"message":"Block 192.168.0.0/24 (12345) added", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
ERROR{ "success":0, "message":"error message" }


Required Parameters
NameTypeExampleDescription
blockSTRING213.37.29.0/24CIDR block description
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918
Optional Parameters
NameTypeExampleDescription
allowDuplicateBOOLtrueAllow the creation of duplicate blocks. The default behavior is to reject duplicates.
allowSubAssignmentsBOOLtrueDoes the block allow sub-assignments? If the block is assigned and allowSubAssignments is "true", children split from this block will be able to be assigned to different resources.
Acceptable values: "true" or "false"
asnINTEGER1000ASN for the block
codeSTRINGCode XUser-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
resourceIdINTEGER1234The ID of the resource the block is assigned to
tagsSTRINGcustomer,vpnComma-separated list of tags
vlanINTEGER123VLAN for the block
Example URL/api/v1/api.php?target=ipam&action=add&block=213.37.29.0/24&rir=ARIN

...