FortiGate API 쿼리할 때 반환되는 항목 수는 요청당 1,000개로 제한된다.
하지만 일부 query의 경우 응답수가 1,000개를 넘어 가는 경우가 있다,.
예를 들어 Microsoft-Azure(id=327786)에 대한 ISDB 리스트는 약 4만개를 넘는데, 쿼리 결과는 1,000개만 반환하게 된다.
전체 카운트는 아래 명령어로 확인 가능하다.
GET /api/v2/monitor/firewall/internet-service-details?id=<service_id>&summary_only=1
테스트 장비의 Microsoft-Azure(id=327786)에 대한 ISDB 리스트는 45,646개 이지만, 아래와 같이 1,000개만 리턴된다.
이럴 경우 아래의 방식을 1,000개 단위로 끊어서 순차적으로 결과를 받아 올수 있다.
GET /api/v2/monitor/firewall/internet-service-details?id=327786&count=1000&start=0&vdom=root
GET /api/v2/monitor/firewall/internet-service-details?id=327786&count=1000&start=1000&vdom=root
GET /api/v2/monitor/firewall/internet-service-details?id=327786&count=1000&start=2000&vdom=root
...
'FortiGate > REST API' 카테고리의 다른 글
Rest API를 이용하여 group에 멤버 추가(append) 하는 방법 (0) | 2025.03.07 |
---|---|
서로 다른 FortiGate에 동일한 API Token을 사용하는 방법 (0) | 2025.01.23 |
REST API를 이용한 사용자 password 변경 (0) | 2024.04.16 |
Postman tool을 이용하여 REST API 사용 예 (0) | 2024.04.15 |
CURL을 이용한 REST API 사용 예 (Token 방식) (0) | 2024.04.15 |
댓글