Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Arzkaz2
New Contributor

Filtering Fortinac-F API hosts

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 1
ebilcari
Staff
Staff

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
If you have found a solution, please like and accept it to make it easily accessible for others.
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors