Skip to main content
Arzkaz2
New Member
December 31, 2024
Question

Filtering Fortinac-F API hosts

  • December 31, 2024
  • 1 reply
  • 596 views

Hi!

I'm trying to list spesific host types usig API;

curl -k --location --request GET 'https://x.x.x.x:8443/api/v2/host?filter=iconType==camera' --header 'Authorization: Bearer XXXXXXX'

 

(just using at this example icon type, that is one differentiator between host types in our case)

 

This filter doesn't work. Am I doing something wrong?

 

Also one interesting thing is, that only 25 hosts are shown, when no filter is used...

Although the last line tells:

..."filtered":4865,"total":4865}

 

NAC version 7.4.0

 

BR, A

 

1 reply

ebilcari
Staff
Staff
December 31, 2024

The default API call will return 25 entries, you can try to increase by specifying it like '?count=999'. There is no syntax present for filtering the content like shown in your example.

API call.PNG

 

You can get more information about API in Fortinet Developer Network.

Emirjon
Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.