GetDetectionTarget

Prev Next

VPC 환경에서 이용 가능합니다.

탐지 대상 서버의 상태와 정보를 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET /servers

요청 헤더

Webshell Behavior Detector API에서 공통으로 사용하는 헤더에 대한 정보는 Webshell Behavior Detector 공통 헤더를 참조해 주십시오.

요청 쿼리 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
pageIndex Integer Optional 페이지 번호
pageSize Integer Optional 페이지 출력 개수

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request GET 'https://wbd.apigw.gov-ntruss.com/api/v1/servers?pageIndex=0&pageSize=1' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--header 'X-NCP-USE_PLATFORM_TYPE: VPC'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
success Boolean - 요청 처리 여부
code Integer - 응답 코드
message String - 응답 메시지
result Object - 응답 결과
content Array - 탐지 대상 목록
totalCount Integer - 응답 결과 개수
pageSize Integer - 페이지 출력 개수
pageIndex Integer - 페이지 번호
totalPages Integer - 총 페이지 개수

content

content에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
instanceNo String - VM의 인스턴스 번호
serverName String - VM의 서버 이름
serverImageName String - VM의 서버 이미지 이름
serverStatus String - VM의 현재 상태
serverType String - VM 유형
serverEnvType String - 서버 환경 유형
ipAddress String - 서버 IP
agentStatus String - 에이전트 상태
serverGroupId String - 서버 그룹 ID
serverGroupName String - 서버 그룹 이름
platform String - 서버 플랫폼
  • VPC | CLASSIC
wasConfigList Array - WAS 탐지 설정
registeredTime Integer - 탐지 대상 등록 일시(Timestamp)
activationTime Integer - 에이전트 활성화 일시(Timestamp)
latestActivationTime Integer - 에이전트의 마지막 활성화 일시(Timestamp)
latestDeactivationTime Integer - 에이전트의 마지막 비활성화 일시(Timestamp)
lastUpdatedTime Integer - 탐지 대상의 마지막 정보 수정 일시(Timestamp)
memberNo Integer - VM 사용 회원 번호
memo String - 메모
commandResult String - 명령의 결과에 대한 상세 메시지
resultCode String - 명령의 결과 코드
agentVersion String - 설치된 에이전트 버전
agentEnable Boolean - 에이전트 활성화 여부
  • true | false
    • true: 활성
    • false: 비활성
agentStage String - 에이전트 상태
chargeInstanceNo String - 과금 기준이 되는 인스턴스 번호
resultParam JSON - 에이전트의 실행/오류 등에 대한 상세 내용
clusterName String - 에이전트가 설치된 Pod의 클러스터 이름

wasConfigList

wasConfigList에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
wasType String - WAS 유형
  • jsp | php
webRootPaths Array - 웹 루트 디렉터리
fileUploadPaths Array - 파일의 업로드 디렉터리

응답 상태 코드

Webshell Behavior Detector API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Webshell Behavior Detector 공통 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
    "success": true,
    "code": 0,
    "message": "success",
    "result": {
        "content": [
            {
                "instanceNo": "25****43",
                "serverName": "tomcat",
                "serverImageName": "CentOS 7.8 (64-bit) with Tomcat",
                "serverStatus": "running",
                "serverType": "VPCServer",
                "serverEnvType": "HOST",
                "ipAddress": "172.***.***.***",
                "agentStatus": "enable",
                "serverGroupId": null,
                "serverGroupName": null,
                "platform": "VPC",
                "wasConfigList": [
                    {
                        "wasType": "jsp",
                        "webRootPaths": [
                            "/opt/tomcat/webapps"
                        ],
                        "fileUploadPaths": [
                            "/opt/tomcat/webapps/helloworld"
                        ]
                    }
                ],
                "registeredTime": 1722409425616,
                "activationTime": 1722410006635,
                "latestActivationTime": 1722475527004,
                "latestDeactivationTime": null,
                "lastUpdatedTime": 1722475536504,
                "memberNo": 27***85,
                "memo": "",
                "commandResult": "OK",
                "resultCode": 0,
                "agentVersion": "1.0.5.030",
                "agentEnable": true,
                "agentStage": "RUNNING",
                "chargeInstanceNo": "25****65",
                "resultParam": null,
                "clusterName": null
            }
        ],
        "totalCount": 1,
        "pageSize": 10,
        "pageIndex": 0,
        "totalPages": 1
    }
}