Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Smart Assign, Direct assign parameters and example URLs updated

...

Delete Tag

URL/api/v1/api.php?target=ipam&action=deleteTag
DescriptionRemoves a tag from an IP block.
Returns

Examples:

SUCCESSFUL{ "success":1,"message":"Tag Removed.", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
ERROR { "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
id*INTEGER125ID of the block
block*STRING192.0.0.0/24CIDR of the block
*Either block or id can be used, but only one must be provided
tagSTRINGCustomerThe tag to delete
Example URL/api/v1/api.php?target=ipam&action=deleteTag&id=125&tag=Customer

Smart Assign

URL/api/v1/api.php?target=ipam&action=smartAssign
DescriptionSelects a block based on supplied parameters (rir, tags, etc.) and assigns to an Resource Holder.
Returns

Examples:

SUCCESSFUL{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234) via Smart Assign", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
ERROR { "success":0, "message":"error message" }


Required Parameters
Arbitrary user-defined block code
NameTypeExampleDescriptioncodeSTRINGCode X
maskINTEGER24The size of the block to be assigned
lirIdINTEGER101The ID of an LIR resource
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
resourceId*INTEGER1234Integer ID of the resource to assign the block to
resourceQuery*JSON

 

{"custom_id":"cust-001"}

 

A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.
*Either resourceId or resourceQuery can be used, but only one must be provided
resourceHolderIdSTRING6c-1234The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder resourceHolderIdSTRING6c-1234The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder details in the 6Connect database back to your organization. Consider using internal customer numbers or department numbers for this field depending on your use case. Example: Customer-001 or 000213.
resourceQuerytypeJSON STRING{"custom_id":"cust-001"}

 

A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.typeSTRING"IPv4" IPv4" or "IPv6"The type of block to assign
Optional Parameters*
tagsAshburn
NameTypeExampleDescription
assignedResourceIdINTEGER123The ID of the resource the block is assigned to
codeSTRINGCode XArbitrary user-defined block code
lirIdINTEGER101The ID of an LIR resource
regionSTRINGAshburnRegion to assign from
tagsSTRINGcustomer,vpnComma separated string of tags. Matches blocks customer,vpnComma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter
tagsModeSTRING"strict" or "exclude"

"strict" - matches ONLY blocks that have the EXACT set of tags of specified.

"exclude" - matches ONLY blocks which are NOT tagged with any of the blocks specified.

regionSTRING

Region to assign fromvlanINTEGER1023VLAN designated to a given block

*Additional or fewer "optional" parameters may be required in order to result in a successful assignment, depending on the attributes of available blocks.

Example URL/api/v1/api.php?target=ipam&action=smartAssign&mask=24&type=IPv4&resourceHolderId=SJS-00316con-003&resourceID=250&rir=ARIN&tags=customer,vpn
"Customer"

Direct Assign

URL/api/v1/api.php?target=ipam&action=directAssign
DescriptionAssigns a block to an Resource Holder
Returns

Examples:

 

SUCCESSFULSINGLE BLOCK{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234)", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
SUCCESSFULMULTIPLE BLOCKS{ "success":1,"message":"Assigned 5 blocks to Resource (1234) via Direct Assign", "data":{ "ids":[12345, 12346, 12347, ...] } }
ERROR  { "success":0, "message":"error message" }


Required Parameters
"SFO"
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*INTEGER125ID of the IP block, comma separated list of ids, or json encoded array of ids
*Either block or id can be used, but only one must be provided
codeSTRING"code-1"

User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name

lirId

INTEGER105

The numeric ID of an LIR resource the block should be linked to

regionSTRINGRegion to assign from
resourceHolderId**STRING6c-1234The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder details in the 6Connect database back to your organization. Consider using internal customer numbers or department numbers for this field depending on your use case. Example: Customer-001 or 000213.
resourceId**INTEGER1234Integer ID of the resource to assign the block to
resourceQuery**JSON

 

{"custom_id":"cust-001"}

 

A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.
**Either resourceId, resourceQuery, or resourceHolderId can be used, but only one must be provided
Optional Parameters*
NameTypeExampleDescription
assignedResourceIdINTEGER123The ID of the resource the block is assigned to
codeSTRINGCode XArbitrary user-defined block code
lirIdINTEGER101The ID of an LIR resource
regionSTRINGAshburnRegion to assign from
rirSTRINGARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC

tagsSTRING
customer,vpnComma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter
tagsModeSTRING"strict" or "exclude"

"strict" - matches ONLY blocks that have the EXACT set of tags of specified.

"exclude" - matches ONLY blocks which are NOT tagged with any of the blocks specified.

vlanINTEGER1023VLAN designated to a given block
Optional ParametersNone

*Additional or fewer "optional" parameters may be required in order to result in a successful assignment, depending on the attributes of available blocks.

Example URL/api/v1/api.php?target=ipam&action=directAssign&block=213.37.29.0/24&resourceHolderId=SJS-0031

...