このセクションでは、Apex CentralがAPI要求にどのように応答するかについて説明します。
目的のAPIに認証要求を送信した後、Apex CentralはJSON形式の応答オブジェクトを返します。応答の形式はアクセスされるリソースによって異なります。
一般APIの応答
Apex CentralはJSON形式の応答を返し、標準のHTTP応答コードを使用します。
Apex Centralは、JSON形式の応答オブジェクトを次の形式で返します。
{
'Data': (if provided, a JSON object representing the return value of the API),
'Meta': {
'Result': (an integer indicating the result of this API call),
'ErrorCode': (an integer indicating the nature of an encountered error),
'ErrorMsg': (a string describing the error code)
},
'PermissionCtrl': (an object indicating the permissions assigned to the logged-on user account for accessing Apex Central features),
'FeatureCtrl': (an object indicating the Apex Central deployment model),
'SystemCtrl': (an object indicating the suspicious object distribution role of the Apex Central server)
}
次の表は応答本文の特定のフィールドに関する詳細を示しています。
|
フィールド |
詳細 |
|---|---|
|
PermissionCtrl |
|
|
FeatureCtrl |
モード: 配信モデルを示す整数
|
|
SystemCtrl |
TmcmSoDist_Role: 不審オブジェクトの配信に関する役割を示す文字列
|
次の表は、有効な応答を示しています。
|
HTTPステータスコード |
応答ステータス |
応答本文 |
|---|---|---|
|
200 |
成功 |
{
'Data': (if provided, a JSON object representing the return value of the API),
'Meta': {
'Result': (an integer indicating the result code of this API call),
'ErrorCode': (an integer indicating the nature of an encountered error),
'ErrorMsg': (a string describing the error code)
},
'PermissionCtrl': {'permission': '255', 'elements': None},
'FeatureCtrl': {'mode': '0'},
'SystemCtrl': {'TmcmSoDist_Role': 'none'}
}
|
|
400 |
無効なパラメータによる失敗 |
{
'Data': (if provided, a JSON object representing the return value of the API),
'Meta': {
'Result': (an integer indicating the result code of this API call),
'ErrorCode': (an integer indicating the nature of an encountered error),
'ErrorMsg': (a string describing the error code)
},
'PermissionCtrl': {'permission': '255', 'elements': None},
'FeatureCtrl': {'mode': '0'},
'SystemCtrl': {'TmcmSoDist_Role': 'none'}
}
|
|
401 |
認証エラーによる失敗 |
{
'Data': (if provided, a JSON object representing the return value of the API),
'Meta': {
'Result': (an integer indicating the result code of this API call),
'ErrorCode': (an integer indicating the nature of an encountered error),
'ErrorMsg': (a string describing the error code)
},
'PermissionCtrl': {'permission': '255', 'elements': None},
'FeatureCtrl': {'mode': '0'},
'SystemCtrl': {'TmcmSoDist_Role': 'none'}
}
|
|
500 |
不明なエラー |
{
'Data': (if provided, a JSON object representing the return value of the API),
'Meta': {
'Result': (an integer indicating the result code of this API call),
'ErrorCode': (an integer indicating the nature of an encountered error),
'ErrorMsg': (a string describing the error code)
},
'PermissionCtrl': {'permission': '255', 'elements': None},
'FeatureCtrl': {'mode': '0'},
'SystemCtrl': {'TmcmSoDist_Role': 'none'}
}
|
サーバおよびセキュリティエージェントのAPI応答
このセクションでは、サーバおよびセキュリティエージェントAPIで使用されるJSON形式の応答と標準のHTTP応答コードについて説明します。
Apex Centralは、JSON形式の応答オブジェクトを次の形式で返します。
{
"result_code":(an integer indicating the result of this API call),
"result_description":"(a string describing the result code)",
"result_content":"(if provided, a JSON object representing the return value of the API)"
}
応答本文内のResult_descriptionフィールドは変更されることがあります。アプリケーションがApex Central API応答に依存している場合は、result_code値を使用します。
result_codeステータス値の全リストについては、APIの結果コードを参照してください。
次の表は、有効な応答を示しています。
|
HTTPステータスコード |
応答ステータス |
応答本文 |
|---|---|---|
|
200 |
成功 |
{
"result_code":(an integer indicating the result of this API call),
"result_description":"(a string describing the result code)",
"result_content":"(if provided, a JSON object representing the return value of the API)"
}
|
|
400 |
無効なパラメータによる失敗 |
{
"result_code":(an integer indicating the result of this API call),
"result_description":"(a string describing the result code)",
"result_content":""
}
|
|
401 |
認証エラーによる失敗 |
{
"result_code":(an integer indicating the result of this API call),
"result_description":"(a string describing the result code)",
"result_content":""
}
|
|
500 |
不明なエラー |
{
"result_code":(an integer indicating the result of this API call),
"result_description":"(a string describing the result code)",
"result_content":""
}
|
APIの結果コード
Apex Centralは標準のHTTP応答コードを使用します。
次の表は、Apex CentralオートメーションAPIの結果コードと対応する説明を示しています。
結果コード |
説明 |
|---|---|
|
1 |
処理が正常に終了しました |
|
-2 |
認証に失敗しました: 認証トークンが設定されていません |
|
-3 |
認証失敗: 認証トークンの形式が正しくありません |
|
-4 |
認証失敗: 認証トークンのバージョンがサポートされていません |
|
-5 |
認証失敗: アプリケーションIDが無効です |
|
-6 |
認証失敗: 認証トークンが期限切れです |
|
-7 |
認証失敗: 認証トークンの署名が無効です |
|
-8 |
認証失敗: 要求チェックサムが無効です |
|
-9 |
認証失敗: 認証トークンの署名アルゴリズムがサポートされていません |
|
-21 |
不正なパラメータが入力されました |
-22 |
処理が無効です |
|
-50 |
サポートされていないHTTPメソッドです |
|
-99 |
内部サーバエラー |
|
-102 |
エージェントの処理失敗: 複数の一致はサポートされていません |
|
-103 |
エージェントの処理に失敗しました: 別のApex Centralサーバにレポートを送信するエージェントは隔離できません |
|
-104 |
エージェントの処理失敗: リモートサーバに接続できません |
-105 |
エージェントの処理に失敗しました: 対象サーバが見つかりません |
-106 |
エージェントの処理に失敗しました: 対象サーバが下位Apex Centralサーバで管理されています |
-107 |
エージェントの処理に失敗しました: 対象サーバがコマンドをサポートしていません |
-1101 |
不審オブジェクトの処理に失敗しました: 最大量を超えています |
-1102 |
不審オブジェクトの処理に失敗しました: アップロードされたファイルのScan Prefilterを生成できません。ファイルがウイルス対策によってブロックされている可能性があります |
