GetDetectionTarget

Prev Next

VPC環境で利用できます。

検知対象サーバの状態と情報を照会します。

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
GET /servers

リクエストヘッダ

Webshell Behavior Detector APIで共通して使用されるヘッダの詳細は、Webshell Behavior Detectorの共通ヘッダをご参照ください。

リクエストクエリパラメータ

パラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
pageIndex Integer Required ページ番号
pageSize Integer Required ページ表示数

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location --request GET 'https://wbd.apigw.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
    }
}