12-06-2018 03:16 AM - edited 02-21-2020 08:32 AM
Hi,
I have an FMC with 1260 TCP/UDP protocol objects configured in it. However when I try to pull down all the objects via a python script using a GET request using this URL:
https://10.0.0.1/api/fmc_config/v1/domain/12345678-12345678/object/protocolportobjects?limit=2000 (<<notice the 2000 here)
Only 1000 objects are extracted.
The script writes the GET data to a file, and in the file is the "links" section:
"links": {
"self": "https://10.232.6.65/api/fmc_config/v1/domain/12345678-12345678/object/protocolportobjects?offset=0&limit=1000" (<<notice the 1000 here)
}
It looks like the FMC changes the 2000 to 1000 and starts using an offset of 0.
I assume I can create a loop in python and get all the objects by changing the offset value and making multiple GET requests, but is it the case the FMC will only allow 1000 objects per GET request. Does anyone know if this is a hardcoded maximum?
Regards
Mark
Solved! Go to Solution.
12-07-2018 01:25 AM
1000 is the limit in Firepower 6.2.x.
They haven't updated that guide for 6.3 yet - it may have changed as they have been working on increasing API functionality a lot.
12-07-2018 01:25 AM
1000 is the limit in Firepower 6.2.x.
They haven't updated that guide for 6.3 yet - it may have changed as they have been working on increasing API functionality a lot.
12-07-2018 02:06 AM
Thanks Marvin!!
07-19-2019 11:34 AM
Looks like the limit is still there in 6.3. Is there a workaround? Is the pagination support in the API? If so, how?
Thanks.
07-24-2019 02:25 AM
Of course there is.
So an implementation in Perl 5 from me at https://metacpan.org/release/Net-Cisco-FMC-v1/source/lib/Net/Cisco/FMC/v1.pm#L46
09-27-2021 11:22 AM
This document -> https://www.cisco.com/c/en/us/td/docs/security/firepower/ftd-api/guide/ftd-rest-api.pdf up to 7.0 2021 stills says the limit is 1000 on the bottom of p. 29. Multiple queries is still the answer.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide