cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2070
Views
0
Helpful
1
Replies

FMC API - obtain interface IP addresses

cyodesigns
Level 1
Level 1

I am having a look at the FMC API via API Explorer but I can't find where an interfaces IP address is? If I go to "object/interfaceobjects", here is an example of Response text if I do a GET:

 

"items": [
{
"name": "inside",
"id": "8ce5bde6-xxx",
"type": "SecurityZone",
"links": {
"self": "https://10.1.1.1/api/fmc_config/v1/domain/e276abec-xxx/object/securityzones/8ce5bde6-xxx",
"parent": "https://10.1.1.1/api/fmc_config/v1/domain/e276abec-xxx/object/interfaceobjects"
}
}

 

If I try to put in a unique identifier of 8ce5bde6-xxx into the query, I get this as Response Text:

 

{
"error": {
"category": "FRAMEWORK",
"messages": [
{
"description": "Only GET listing is supported for this resource. GET by id is not supported."
}
],
"severity": "ERROR"
}
}

 

Anyone know how to get an interfaces IP address via the API?

Regards,
Mark

1 Reply 1

cyodesigns
Level 1
Level 1

Answering myself:
In API-Explorer go to "Devices"
Click on devices/devicerecords
Run GET
Obtain the UUID of the device whose Interface of the IP address you want to know.
Put the UUID of this device into the "Container UUID"
Click GET next to physicalinteraces
Obtain the interface UUID you require then put that UUID into the filter box to the right
Click GET
Then if you assigned an IP on that interface you should see something like this in the Response Text:
{
"metadata": {
"timestamp": 1524828336620,
"domain": {
"name": "Global",
"id": "e276abec-xxx"
}
},
"links": {
"self": "https://10.1.1.2/api/fmc_config/v1/domain/e276abec-xxx/devices/devicerecords/e35fe18e-xxx/physicalinterfaces/6CB2AE1E-xxx"
},
"type": "PhysicalInterface",
"mode": "NONE",
"hardware": {
"duplex": "AUTO",
"speed": "AUTO"
},
"enabled": true,
"MTU": 1500,
"managementOnly": false,
"securityZone": {
"id": "6c1f9bce-xxx",
"type": "SecurityZone"
},
"ifname": "inside",
"fragmentReassembly": false,
"enableDNSLookup": false,
"enableAntiSpoofing": false,
"ipv4": {
"static": {
"address": "10.1.1.1",
"netmask": "24"
}
},
"ipv6": {
"enforceEUI64": false,
"enableIPV6": false,
"reachableTime": 0,
"enableRA": true,
"raLifeTime": 1800,
"raInterval": 200,
"enableAutoConfig": false,
"enableDHCPAddrConfig": false,
"enableDHCPNonAddrConfig": false,
"dadAttempts": 1,
"nsInterval": 1000
},
"name": "GigabitEthernet1/3",
"description": "Connected to server xxx",
"id": "6CB2AE1E-xxx"
}

Review Cisco Networking products for a $25 gift card