예외 규칙 목록 조회

검색 조건과 일치하는 시나리오 예외 규칙 목록을 조회합니다.

HTTP 요청

GET /api/sonar/exception-rules
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
     "https://HOSTNAME/api/sonar/exception-rules?scenario_guid=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
요청 매개변수
필수타입설명비고
scenario_guidO문자열시나리오 GUID36자 GUID
typeX문자열유형STREAM 또는 BATCH
offsetX32비트 정수건너뛸 갯수기본값 0
limitX32비트 정수최대 갯수미지정 시 전체 조회
keywordsX문자열검색 키워드
is_expiredX불리언만료 여부
guidsX문자열 목록예외 규칙 GUID 목록쉼표(,)를 구분자로 하는 GUID 목록

정상 응답

{
  "total_count": 1,
  "rules": [
    {
      "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "type": "STREAM",
      "description": "테스트 서버 예외 처리",
      "exprs": {
        "operator": "and",
        "operands": [
          {
            "field": "src_ip",
            "type": "ip",
            "operator": "eq",
            "value": "192.0.2.1"
          }
        ]
      },
      "valid_from": "2025-01-01 00:00:00+0900",
      "valid_until": "2025-12-31 23:59:59+0900",
      "created_at": "2025-01-01 00:00:00+0900",
      "user_guid": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
      "user_name": "관리자",
      "scenario_guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "scenario_name": "DMZ 포트 스캔"
    }
  ]
}
  • total_count (32비트 정수): 검색 조건과 일치하는 전체 예외 규칙 갯수
  • rules (배열): 페이징된 예외 규칙 목록
    • guid (문자열): 예외 규칙 GUID
    • type (문자열): 유형. STREAM 또는 BATCH.
    • description (문자열): 메모
    • exprs (객체): 조건 트리
    • valid_from (날짜): 유효 시작 일자
    • valid_until (날짜): 유효 종료 일자
    • created_at (날짜): 생성일시
    • user_guid (문자열): 생성한 사용자 GUID
    • user_name (문자열): 생성한 사용자 성명
    • scenario_guid (문자열): 시나리오 GUID
    • scenario_name (문자열): 시나리오 이름

오류 응답

시나리오 GUID가 누락된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "null-argument",
  "error_msg": "scenario_guid should be not null"
}
시나리오 GUID가 GUID 형식이 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-param-type",
  "error_msg": "scenario_guid should be guid type."
}
offset, limit 값이 정수가 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' parameter should be int type"
}