Step-by-Step Guide:
Internal IP Address Management API
This API empowers you to take control of your internal IP addresses by providing a seamless mechanism for creating custom metadata. By harnessing the power of custom metadata, you can elevate your resource categorization and streamline the way you manage your network infrastructure.
All operations in this context utilize the Nethub API.
Before using the API, please make sure to complete API Authorization
Note
Currently Internal Metadata available only for existing Nethub prefixes that are pre-populated based on RIR Allocations, existing Whois Inetnums and Internet Routing (BGP Routing table) - internal subnetting not available at this time.
1. Create a basic Internal Metadata for selected prefix
In this example, we will create an Internal Location metadata for single prefix.
Request
BASH
curl 'https://apigw.ipxo.com/nethub-data/c4a84238-3a89-43f0-8a83-8d5edc9c8c65/prefixes/metadata' \
-X 'PATCH' \
-H 'Authorization: Bearer jZwuDUdni6eObyTiYBzzee5mRw9SSi57l0SV0ernFKU.IDcqN8Tf1ASO6McPiVYWllCzcbY27OAIRi3vuKjYoxs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '[{
"notation": "2.57.16.0/24",
"metadata": {
"location":
{
"dc-branch": "uk-ldn-01",
"silo": "b2b-europe"
}
}
}
]'
Response
JSON
[
{
"notation": "2.57.16.0/24",
"ipNet": {
"IP": "2.57.16.0",
"Mask": "////AA=="
},
"maskSize": 24,
"holderMetadata": {
"b13a637c-2552-4732-a3b6-24d61446a392": {
"location": [
{
"dc-branch": "uk-ldn-01",
"silo": "b2b-europe"
}
]
}
}
}
]
Note
Same way you can create any type of internal metadata, few of our examples are:
- "customer" metadata with fields: 1) "name"/"company": "JohnVPN"; 2) "id": "1234-9864"; 3) "type": "vip"
- "server" metadata: 1) "name": "srv-web-001"; 2) "type": "web"; 3) "vlan": "VLAN201"
- "byoip" metadata: 1) "hyperscaler: "Azure"; 2) "location": "westeu-3"; 3) "resource_id": "21x13a"; 4) "subscription_id": "d10asd1x"
2. Delete created metadata
In this example, we will delete silo metadata from location
Request
BASH
curl 'https://apigw.ipxo.com/nethub-data/c4a84238-3a89-43f0-8a83-8d5edc9c8c65/prefixes/metadata' \
-X 'DELETE' \
-H 'Authorization: Bearer jZwuDUdni6eObyTiYBzzee5mRw9SSi57l0SV0ernFKU.IDcqN8Tf1ASO6McPiVYWllCzcbY27OAIRi3vuKjYoxs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '[ {
"notation": "2.57.16.0/24",
"metadata": [
"location.silo"
]
}
]'
Response
Returns full prefix details with deleted silo metadata
JSON
[
{
"notation": "2.57.16.0/24",
"ipNet": {
"IP": "2.57.16.0",
"Mask": "////AA=="
},
"maskSize": 24,
"holderMetadata": {
"b13a637c-2552-4732-a3b6-24d61446a392": {
"location": [
{
"dc-branch": "uk-ldn-01"
}
]
}
}
}
]
For any inquiries or feedback, please feel free to reach out to us.