While making the API calls to FortiNAC, we are trying to use pagination, but it is not working as expected.
We are using this API reference: https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/b0dca655-7aec-11ec-a0d0-fa163e...
This is the command we're trying:
curl --location 'https://10.50.4.178:8443/api/v2/device?start=2&count=5' --header 'Authorization: Bearer MHPnxA4L3vza0IF0nQFjn4rQ08yanX' --header 'Cookie: JSESSIONID=A0BFF010C063F13EB28610B6B10C9EDA; JSESSIONID_PORTAL=FB3ECB4D3BAC500A841E1B79BA473FC7'
Could you please help us know if we should use this parameter (count) in some other way? count parameter doesn't seem to be working.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
If you want to just count devices use this URL: https://fnac.eb.eu:8443/api/v2/device/count
More information related to API can be found here: https://fndn.fortinet.net/
Hi @ebilcari,
Actually, we don't want only count, but data as well.
We are also using this API:
https://10.50.4.178:8443/api/v2/device?start=2&count=5
However, the count parameter doesn't seem to be working in this case. As a result, instead of getting a paginated response, we are getting all the devices in a single API call.
Now, if the environment size is large, then this will cause an issue because the payload size will be too large to fetch in a single API call.
So, can you please guide us how can we paginate the data? Are we supposed to use count parameter in some other way?
We have referred this guide: https://fortinetweb.s3.amazonaws.com/docs.fortinet.com/v2/attachments/b0dca655-7aec-11ec-a0d0-fa163e...
I tested the same and it looks like the start and count get ignored, at least as I see it from postman.
Hi @ebilcari, so is this something which is a known issue? Or does it have any workaround?
So you know what can we do get the resolution to this?
In our case, start parameter is working, but count is not working.
I searched internally and yes there is an open Engineering ticket investigating this issue. It looks like currently the "count" get's ignored on the REST API call. You can search in the release notes when this fix will be included in the next builds with reference number: 951436
Hi @georgebenzy,
I am not sure if this is a doc issue or a bug in the API.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1721 | |
1098 | |
752 | |
447 | |
234 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.