次の方法で共有


Audit - Query

資産、用語集Term、classificationDef などの監査ログに対してクエリを実行します。

POST {endpoint}/datamap/api/audit/query?api-version=2023-10-01-preview

URI パラメーター

名前 / 必須 説明
endpoint
path True

string (url)

Purview アカウントのデータマップ エンドポイント。 例: https://{accountName}.purview.azure.com

api-version
query True

string

API のバージョン。

要求本文

名前 説明
category

AuditCategory

AuditCategory
監査ログ クエリ要求の監査カテゴリ。

continuationToken

string

次のページを取得する継続トークン。

endTime

string

監査ログの終了時刻。ISO-8601 表記。 既定値は UTC になりました。

guid

string

targe 資産、用語集の用語、または分類の定義の GUID。

keywords

string

監査ログの古い値または新しい値部分に含まれるキーワード。

operationType

AuditOperationType

AuditOperationType
監査操作の種類。

pageSize

integer (int32)

返すアイテムの数を 1 ページで指定します。 最大値は 1000 です。

qualifiedName

string

アセットにのみ適用されます。は、資産修飾名を指定します。

sortBy

string

並べ替えの基準にするプロパティ。 値は、監査ログ スキーマ フィールドのいずれかである必要があります。 "SortOrder" と共に使用する必要があります。 CreationTime が推奨されます。

sortOrder

AuditSortOrder

AuditSortOrder
クエリ結果の並べ替え順序を監査します。

startTime

string

監査ログの開始時刻。ISO-8601 表記。 既定値は 1970-01-01T00:00:00Z です。

typeName

string

アセットにのみ適用されます。は資産の種類名を指定します。

userId

string

ユーザー プリンシパル名またはサービス プリンシパル オブジェクト ID。

応答

名前 説明
200 OK

AuditLogQueryResponse

OK です。 検索条件内の監査ログが正常に検索された場合。

Other Status Codes

ErrorResponse

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントの借用

Audit_Query

要求のサンプル

POST {endpoint}/datamap/api/audit/query?api-version=2023-10-01-preview

{
  "category": "Asset",
  "guid": "330bd2f1-cf28-4737-8d86-e6f6f6f60000",
  "userId": "contoso@microsoft.com",
  "operationType": "EntityUpdated",
  "keywords": "Tag1",
  "startTime": "2023-05-01T00:00:00.000Z",
  "endTime": "2023-05-30T00:00:00.000Z",
  "sortBy": "CreationTime",
  "sortOrder": "Descending",
  "pageSize": 10
}

応答のサンプル

{
  "continuationToken": "<token>",
  "lastPage": true,
  "totalResultCount": 2,
  "recordCount": 2,
  "resultData": [
    {
      "workload": "PurviewDataMap",
      "recordType": 227,
      "id": "12ea3a18-3712-4417-a12d-7df936e327c9",
      "creationTime": "2023-05-06T08:27:05",
      "operation": "EntityUpdated",
      "organizationId": "4f1dc10a-df9b-4f93-be0c-504b04f6309d",
      "userType": 0,
      "userKey": "1715f5c5-c81d-489e-9ca1-8d40281ef0d8",
      "userId": "contoso@microsoft.com",
      "accountId": "644ab9c7-893a-4a4d-8e0a-591a6556d1a0",
      "catalogId": "d8757510-c866-61ba-486f-1afca09f43b8",
      "changeRequestId": "34d2aa4a-d5bf-4bdf-a954-77df88d9c3df",
      "cloudType": "Azure",
      "serviceType": "[\"Azure Blob Storage\"]",
      "objectId": "330bd2f1-cf28-4737-8d86-e6f6f6f60000",
      "objectName": "Audit Log Test",
      "objectFullyQualifiedName": "https://contoso.blob.core.windows.net/testfolder1/auditlogtest.json",
      "objectType": "azure_blob_path",
      "oldValue": "{\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\":{\"attributes\":{\"name\":\"Audit Log Test\"},\"guid\":\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\",\"labels\":[\"Tag1\"]}}",
      "newValue": "{\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\":{\"attributes\":{\"name\":\"Audit Log Test\"},\"guid\":\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\",\"labels\":[]}}"
    },
    {
      "workload": "PurviewDataMap",
      "recordType": 227,
      "id": "6abb069e-aefc-4dff-97f4-f36b3d5ac2be",
      "creationTime": "2023-05-06T08:27:01",
      "operation": "EntityUpdated",
      "organizationId": "4f1dc10a-df9b-4f93-be0c-504b04f6309d",
      "userType": 0,
      "userKey": "1715f5c5-c81d-489e-9ca1-8d40281ef0d8",
      "userId": "contoso@microsoft.com",
      "accountId": "644ab9c7-893a-4a4d-8e0a-591a6556d1a0",
      "catalogId": "d8757510-c866-61ba-486f-1afca09f43b8",
      "changeRequestId": "122a460f-9d87-47cd-9683-e27351a3dadd",
      "cloudType": "Azure",
      "serviceType": "[\"Azure Blob Storage\"]",
      "objectId": "330bd2f1-cf28-4737-8d86-e6f6f6f60000",
      "objectName": "Audit Log Test",
      "objectFullyQualifiedName": "https://contoso.blob.core.windows.net/testfolder1/auditlogtest.json",
      "objectType": "azure_blob_path",
      "oldValue": "{\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\":{\"attributes\":{\"name\":\"Audit Log Test\"},\"guid\":\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\",\"labels\":[\"Tag1\",\"Tag2\"]}}",
      "newValue": "{\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\":{\"attributes\":{\"name\":\"Audit Log Test\"},\"guid\":\"330bd2f1-cf28-4737-8d86-e6f6f6f60000\",\"labels\":[\"Tag1\"]}}"
    }
  ]
}

定義

名前 説明
AuditCategory

AuditCategory

AuditLog

AuditLog

AuditLogQueryRequest

AuditLogQueryRequest

AuditLogQueryResponse

AuditLogQueryResponse

AuditOperationType

AuditOperationType

AuditSortOrder

AuditSortOrder

ErrorResponse

サービスからのエラー応答

AuditCategory

AuditCategory

説明
Asset
ClassificationDef
GlossaryTerm

AuditLog

AuditLog

名前 説明
accountId

string

Purview アカウント ID。

catalogId

string

Purview カタログ ID。

changeRequestId

string

関連付け ID。

clientIP

string

クライアント IP アドレス。

cloudType

string

オブジェクトが属するクラウドの種類

creationTime

string

監査ログが作成されたときのタイムスタンプ。

id

string

ログ ID。

newValue

string

新しいデータ値。

objectCollectionId

string

オブジェクト コレクション ID。

objectFullyQualifiedName

string

オブジェクトの完全修飾名。

objectId

string

targe 資産、用語集の用語、または分類の定義の GUID。

objectName

string

オブジェクト名

objectType

string

オブジェクトの種類名。

oldValue

string

古いデータ値。

operation

AuditOperationType

AuditOperationType
監査操作の種類。

organizationId

string

顧客テナント ID。

recordType

integer (int32)

ログ メタデータ。 監査ログのレコードの種類を示します。

serviceType

string

オブジェクトが属するサービスの種類

userId

string

ユーザー プリンシパル名。

userKey

string

ユーザー ID。

userType

integer (int32)

操作を実行したユーザーの種類。

workload

string

ログ メタデータ。 監査ログのワークロードの種類を示します。

AuditLogQueryRequest

AuditLogQueryRequest

名前 説明
category

AuditCategory

AuditCategory
監査ログ クエリ要求の監査カテゴリ。

continuationToken

string

次のページを取得する継続トークン。

endTime

string

監査ログの終了時刻。ISO-8601 表記。 既定値は UTC になりました。

guid

string

targe 資産、用語集の用語、または分類の定義の GUID。

keywords

string

監査ログの古い値または新しい値部分に含まれるキーワード。

operationType

AuditOperationType

AuditOperationType
監査操作の種類。

pageSize

integer (int32)

返すアイテムの数を 1 ページで指定します。 最大値は 1000 です。

qualifiedName

string

アセットにのみ適用されます。は、資産修飾名を指定します。

sortBy

string

並べ替えの基準にするプロパティ。 値は、監査ログ スキーマ フィールドのいずれかである必要があります。 "SortOrder" と共に使用する必要があります。 CreationTime が推奨されます。

sortOrder

AuditSortOrder

AuditSortOrder
クエリ結果の並べ替え順序を監査します。

startTime

string

監査ログの開始時刻。ISO-8601 表記。 既定値は 1970-01-01T00:00:00Z です。

typeName

string

アセットにのみ適用されます。は資産の種類名を指定します。

userId

string

ユーザー プリンシパル名またはサービス プリンシパル オブジェクト ID。

AuditLogQueryResponse

AuditLogQueryResponse

名前 説明
continuationToken

string

次のページを取得する継続トークン。 "lastPage" が false の場合。 クライアントは、クエリ ペイロードでこのトークンを使用して、次のページを取得します。

lastPage

boolean

最後のページかどうかを示します。

recordCount

integer (int32)

現在のページ内のアイテムの数。

resultData

AuditLog[]

監査ログの配列。

totalResultCount

integer (int32)

検索条件に対して修飾されたアイテムの合計数。

AuditOperationType

AuditOperationType

説明
ClassificationAdded
ClassificationDefinitionCreated
ClassificationDefinitionDeleted
ClassificationDefinitionUpdated
ClassificationDeleted
ClassificationUpdated
EntityCreated
EntityDeleted
EntityUpdated
GlossaryTermAssigned
GlossaryTermCreated
GlossaryTermDeleted
GlossaryTermDisassociated
GlossaryTermUpdated
SensitivityLabelChanged

AuditSortOrder

AuditSortOrder

説明
Ascending
Descending

ErrorResponse

サービスからのエラー応答

名前 説明
errorCode

string

エラー コード。

errorMessage

string

エラー メッセージ。

requestId

string

要求 ID です。