監査エンドポイント
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
監査インデックスのクエリに使用できるエンドポイントのリストは、/api/audit
にあります。
URL テンプレートの展開パラメーターに注目してください。
*
を使用すると、URL は、値のリストを持つキーではなく、キーと値のペアのリストに展開されます。
例:
Uri.expand("{?userIds*}", { userIds: [1, 2] })
?userIds=1,2
ではなく ?userIds=1&userIds=2
に展開されます。
クエリ
クエリ エンドポイントでは、次の形式の URL を使用します。
GET /api/audit/<index name>/query{/entityId}{?from,to,fullText,skip,take,sort,order}
クエリ エンドポイントでは、次のパラメーターがサポートされています。
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
entityId | long | 9962 | 監査対象エンティティの ID (任意) |
from | DateTime | 2018-07-01T08:00Z | 開始日時 |
to | DateTime | 2018-07-02T08:00Z | 終了日時 |
fullText | string | asset | 全文検索のフレーズ |
skip | int | 0 | ページング - 指定したアイテム インデックスを起点とします |
take | int | 10 | ページング - 指定した数のアイテムを表示します |
sort | string | timeStamp | 並べ替えの基準とする Elasticsearch 検索フィールド |
order | 文字列 | desc | 並べ替え順序 -「asc」または「desc」 |
応答:
{
"items": [
... documents ...
],
"total_items": 15,
"returned_items": 10,
"next": {
"href": "<link to next page>",
"title": ...
},
"previous": {
"href": "<link to previous page>",
"title": ...
},
"self": {
"href": "<link to current page>",
"title": ...
}
}
一部のエンドポイントには、追加のパラメーター セットが用意されています。 違いについては、対応する各セクションで示します。
スクロール
ES (Elasticsearch) クエリで許容される数よりも多くのアイテムをフェッチする必要がある場合は、スクロール API を使用する必要があります。 ページングは一方向にのみ可能で、エンティティのスクロール エンドポイントと同様に機能します。
エンドポイントのベース アドレス テンプレートは次のとおりです。
GET /api/audit/<index name>/scroll{/entityId}{?scroll_time,scroll_id,from,to,fullText,skip,take,sort,order}
各スクロール エンドポイントは、対応するクエリ エンドポイントと同じパラメーター セットを受け入れます。
スクロール固有のパラメーターは、次の 2 つです。
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
scroll_id | 文字列 | DXF1..U1QQ== | ES によって割り当てられたスクロール ID。このパラメーターは、応答ペイロードの next リンクに自動的に追加されます。 |
scrol_time | TimeSpan | raw | 作成されたスクロールを ES で存続させる期間を決定します。指定されていない場合、値は一元化された設定の reporting セクションから取得されます (既定は 5000 ミリ秒)。 |
生成
生成エンドポイントは、ログ全体またはそのサブセットのダウンロードを指示するために使用されます。 エンドポイントでは、次の形式の URL を使用します。
POST /api/audit/<index name>/generate
生成エンドポイントでは、次のパラメーターがサポートされています。
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
audit_type | 文字列 | raw | raw、business、scripting、action、trigger のいずれかの値 |
format | string | csv | csv、json のいずれかの値 |
from | DateTime | 2018-07-01T08:00Z | 開始日時 |
to | DateTime | 2018-07-02T08:00Z | 終了日時 |
filter | dict | { "user_id": ["6"] } | 選択した監査インデックスに適用される一連のフィルター |
応答ヘッダー:
Location: <url to download order>
未処理のクエリ
未処理のクエリは、プロパティやリレーションの変更など、エンティティを含む未処理の監査インデックスをクエリします。
エンドポイント:
GET /api/audit/raw/query{/entityId}{?eventTypes*,definitionNames*,userIds*,properties*,relations*,culture,from,to,fullText,skip,take,sort,order}
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
eventTypes | 文字列 | EntityUpdated | 監査対象のイベントのタイプ |
definitionNames | string | M.Asset | エンティティの定義名 |
userIds | long | 1211 | ユーザー ID |
properties | string | Title | 指定したプロパティに対して行われた変更を基準としたフィルタリング |
relations | string | AssetToAssetMedia | 指定したリレーションに対して行われた変更を基準としたフィルタリング |
culture | string | en-US | 応答データのカルチャ |
ビジネス クエリ
ビジネス クエリは、ビジネス監査インデックスをクエリします。
エンドポイント:
GET /api/audit/business/query{/entityId}{?logType*,raw,from,to,fullText,skip,take,sort,order}
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
logType | 文字列 | useraudit | 指定したタイプを基準としたフィルタリング |
raw | 文字列 | (非推奨) 未処理の Elasticsearch 検索クエリ - 互換性のために残されたパラメーター |
ビジネス生成
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
log_type | 文字列 | useraudit | フィルター プロパティを上書きして、指定したログ タイプをフィルターとして設定します |
スクリプト クエリ
スクリプト監査インデックスをクエリします。
エンドポイント:
GET /api/audit/scripting/query{/entityId}{?scriptType,scriptName,scriptContentId,scriptContentIdentifier,errorMessage,executionSource,id,eventType,severity,targetId,targetIdentifier,userId,from,to,fullText,skip,take,sort,order}
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
scriptType | 文字列 | UserPreRegistration | スクリプトのタイプ。 可能な値: UserPreRegistration、UserPostRegistration、UserSignIn、MetadataProcessing、ActionScript |
scriptName | string | fooScript | スクリプト名 |
scriptContentId | long | 1234 | スクリプト コンテンツ エンティティの ID |
scriptContentIdentifier | string | zfSGGTUNhkKVdY9U-z49iQ | スクリプト コンテンツ エンティティの ID |
errorMessage | string | failed | エラー メッセージのフラグメント |
executionSource | string | Automatic | スクリプトの実行ソース。 可能な値: Automatic、Trigger、WebApi、Command、ExternalAction、MassEdit |
id | guid | 0ccd58cf-c83f-42ba-907f-44d8950a20fd | 監査メッセージの ID |
eventType | string | Created | イベント タイプ。 可能な値: Created、Updated、Deleted、Enabled、Disabled、Executed |
severity | string | Warning | 監査エントリの重大度。 可能な値: Debug、Warning、Info、Error、Fatal |
targetId | long | 1234 | 監査対象エンティティの ID |
targetIdentifier | string | zfSGGTUNhkKVdY9U-z49iQ | 監査対象エンティティの ID |
userId | long | 1234 | 監査エントリの作成をトリガーしたユーザーの ID |
アクション クエリ
アクション監査インデックスをクエリします。
エンドポイント:
GET /api/audit/action/query{/entityId}{?actionType,actionPhase,executionType,executionSource,executionTime,messageId,retryCount,success,id,eventType,severity,targetId,targetIdentifier,userId,from,to,fullText,skip,take,sort,order}
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
actionType | 文字列 | ApiCall | アクションのタイプ。 可能な値: ApiCall、ActionScript、AzureEventHub、ReportingChannel、PrintEntityGeneration、StartBpmAutomation、StartSmAutomation、AzureServiceBus、MAzureServiceBus |
actionPhase | string | Pre | アクションが実行されるフェーズ。可能な値: Post、Pre、Security、Validation、Audit |
executionType | string | InProcess | 実行のタイプ。 可能な値: OutOfProcess、InProcess |
executionSource | string | Trigger | 実行ソース。 可能な値: Unknown、Trigger、ExternalAction、Command、WebApi、MassEdit、BPM |
executionTime | long | 234 | ミリ秒単位の経過実行時間 |
messageId | long | 1234 | メッセージ ID |
retryCount | int | 3 | 再試行回数 |
success | bool | true | アクションが正常に実行されたかどうか |
id | guid | 0ccd58cf-c83f-42ba-907f-44d8950a20fd | 監査メッセージの ID |
eventType | string | Created | イベント タイプ。 可能な値: Created、Updated、Deleted、Enabled、Disabled、Executed |
severity | string | Warning | 監査エントリの重大度。 可能な値: Debug、Warning、Info、Error、Fatal |
targetId | long | 1234 | 監査対象エンティティの ID |
targetIdentifier | string | zfSGGTUNhkKVdY9U-z49iQ | 監査対象エンティティの ID |
userId | long | 1234 | 監査エントリの作成をトリガーしたユーザーの ID |
トリガー クエリ
トリガー監査インデックスをクエリします。
エンドポイント:
GET /api/audit/trigger/query{/entityId}{?executionType,objective,id,eventType,severity,targetId,targetIdentifier,userId,from,to,fullText,skip,take,sort,order}
追加のパラメーター:
名前 | 型 | サンプル値 | 説明 |
---|---|---|---|
executionType | 文字列 | InProcess | 実行のタイプ。 可能な値: OutOfProcess、InProcess |
objective | string | EntityDeletion | イベントを分類する目的。 可能な値: EntityDefinitionCreation、EntityDefinitionModification、EntityDefinitionDeletion、EntityCreation、EntityModification、EntityDeletion |
id | guid | 0ccd58cf-c83f-42ba-907f-44d8950a20fd | 監査メッセージの ID |
eventType | string | Created | イベント タイプ。 可能な値: Created、Updated、Deleted、Enabled、Disabled、Executed |
severity | string | Warning | 監査エントリの重大度。 可能な値: Debug、Warning、Info、Error、Fatal |
targetId | long | 1234 | 監査対象エンティティの ID |
targetIdentifier | string | zfSGGTUNhkKVdY9U-z49iQ | 監査対象エンティティの ID |
userId | long | 1234 | 監査エントリの作成をトリガーしたユーザーの ID |