Tables - Get
获取 Log Analytics 工作区表。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}?api-version=2025-02-01
		URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 | 
|---|---|---|---|---|
| 
						 resource 
					 | 
					path | True | 
			 string minLength: 1maxLength: 90  | 
					
						 资源组的名称。 名称不区分大小写。  | 
				
| 
						 subscription 
					 | 
					path | True | 
			 string minLength: 1 | 
					
						 目标订阅的 ID。  | 
				
| 
						 table 
					 | 
					path | True | 
			 string minLength: 4maxLength: 63 pattern: ^[A-Za-z0-9-_]+$  | 
					
						 表的名称。  | 
				
| 
						 workspace 
					 | 
					path | True | 
			 string minLength: 4maxLength: 63 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$  | 
					
						 工作区的名称。  | 
				
| 
						 api-version 
					 | 
					query | True | 
			 string minLength: 1 | 
					
						 用于此作的 API 版本。  | 
				
响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| 200 OK | 
		 确定响应定义。  | 
|
| Other Status Codes | 
		 描述作失败的原因的错误响应。  | 
安全性
azure_auth
Azure Active Directory OAuth2 流
					类型: 
					oauth2
					流向: 
					implicit
					授权 URL: 
					https://login.microsoftonline.com/common/oauth2/authorize
			
作用域
| 名称 | 说明 | 
|---|---|
| user_impersonation | 模拟用户帐户 | 
示例
TablesGet 
			示例请求
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1_SRCH?api-version=2025-02-01
示例响应
{
  "systemData": {
    "createdBy": "00000000-0000-0000-0000-00000000000",
    "createdAt": "2020-02-03T04:05:06Z"
  },
  "properties": {
    "resultStatistics": {
      "progress": 75,
      "ingestedRecords": 5,
      "scannedGb": 23.5
    },
    "searchResults": {
      "query": "Heartbeat | where SourceSystem != '' | project SourceSystem",
      "description": "This table was created using a Search Job with the following query: 'Heartbeat | where SourceSystem != '' | project SourceSystem'.",
      "limit": 1000,
      "startSearchTime": "2020-02-03T04:05:06Z",
      "endSearchTime": "2020-02-02T04:05:06Z",
      "sourceTable": "Heartbeat"
    },
    "schema": {
      "name": "table1_SRCH",
      "tableSubType": "DataCollectionRuleBased",
      "tableType": "SearchResults",
      "displayName": null,
      "description": null,
      "columns": [],
      "standardColumns": [
        {
          "isHidden": false,
          "name": "TenantId",
          "type": "guid",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "SourceSystem",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "MG",
          "type": "guid",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "ManagementGroupName",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "TimeGenerated",
          "type": "dateTime",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "Computer",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        },
        {
          "isHidden": false,
          "name": "RawData",
          "type": "string",
          "dataTypeHint": null,
          "displayName": null,
          "description": null,
          "isDefaultDisplay": false
        }
      ],
      "categories": null,
      "labels": null,
      "source": null,
      "solutions": [
        "LogManagement"
      ]
    },
    "provisioningState": "InProgress",
    "retentionInDays": 50,
    "totalRetentionInDays": 50,
    "archiveRetentionInDays": 0,
    "retentionInDaysAsDefault": false,
    "totalRetentionInDaysAsDefault": true,
    "plan": "Analytics"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1_SRCH",
  "name": "table1_SRCH"
}
				定义
| 名称 | 说明 | 
|---|---|
| Column | 
							 表列。  | 
					
| 
							Column | 
						
							 列数据类型逻辑提示。  | 
					
| 
							Column | 
						
							 列数据类型。  | 
					
| 
							created | 
						
							 创建资源的标识的类型。  | 
					
| 
							Error | 
						
							 资源管理错误附加信息。  | 
					
| 
							Error | 
						
							 错误详细信息。  | 
					
| 
							Error | 
						
							 错误响应  | 
					
| 
							Provisioning | 
						
							 表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。  | 
					
| 
							Restored | 
						
							 还原参数。  | 
					
| 
							Result | 
						
							 搜索作业执行统计信息。  | 
					
| Schema | 
							 表的架构。  | 
					
| 
							Search | 
						
							 启动此表的搜索作业的参数。  | 
					
| 
							Source | 
						
							 表的创建者。  | 
					
| 
							system | 
						
							 与创建和上次修改资源相关的元数据。  | 
					
| Table | 
							 工作区数据表定义。  | 
					
| 
							Table | 
						
							 指示系统如何处理和收费引入到此表的日志。  | 
					
| 
							Table | 
						
							 子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。  | 
					
| 
							Table | 
						
							 表的创建者。  | 
					
Column
表列。
| 名称 | 类型 | 说明 | 
|---|---|---|
| dataTypeHint | 
		 列数据类型逻辑提示。  | 
|
| description | 
			 string  | 
	
		 列说明。  | 
| displayName | 
			 string  | 
	
		 列显示名称。  | 
| isDefaultDisplay | 
			 boolean  | 
	
		 默认显示。  | 
| isHidden | 
			 boolean  | 
	
		 是否隐藏列。  | 
| name | 
			 string  | 
	
		 列名。  | 
| type | 
		 列数据类型。  | 
ColumnDataTypeHintEnum    
			
			列数据类型逻辑提示。
| 值 | 说明 | 
|---|---|
| uri | 
		 与 URI 模式匹配的字符串,例如,scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment  | 
| guid | 
		 标准形状 xxxxxxxx-xxxx-xxxx-xxxxxx 后的标准 128 位 GUID  | 
| armPath | 
		 Azure 资源模型 (ARM) 路径:/subscriptions/{...}/resourceGroups/{...}/providers/Microsoft。{...}/{...}/{...}/{...}...  | 
| ip | 
		 标准形状 x.x.x.x.x/y:y:y:y:  | 
ColumnTypeEnum  
			
			列数据类型。
| 值 | 说明 | 
|---|---|
| string | |
| int | |
| long | |
| real | |
| boolean | |
| dateTime | |
| guid | |
| dynamic | 
createdByType 
			
			创建资源的标识的类型。
| 值 | 说明 | 
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key | 
ErrorAdditionalInfo  
			
			资源管理错误附加信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| info | 
			 object  | 
	
		 其他信息。  | 
| type | 
			 string  | 
	
		 其他信息类型。  | 
ErrorDetail 
			
			错误详细信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| additionalInfo | 
		 错误附加信息。  | 
|
| code | 
			 string  | 
	
		 错误代码。  | 
| details | 
		 错误详细信息。  | 
|
| message | 
			 string  | 
	
		 错误消息。  | 
| target | 
			 string  | 
	
		 错误目标。  | 
ErrorResponse 
			
			错误响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| error | 
		 错误对象。  | 
ProvisioningStateEnum  
			
			表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。
| 值 | 说明 | 
|---|---|
| Updating | 
		 表架构仍在生成和更新中,表当前已锁定进行任何更改,直到完成该过程。  | 
| InProgress | 
		 表架构稳定且不发生更改,表数据将更新。  | 
| Succeeded | 
		 表状态稳定且没有更改,表已解锁并打开以供新更新使用。  | 
| Deleting | 
		 表状态正在删除。  | 
RestoredLogs 
			
			还原参数。
| 名称 | 类型 | 说明 | 
|---|---|---|
| azureAsyncOperationId | 
			 string  | 
	
		 搜索结果表异步作 ID。  | 
| endRestoreTime | 
			 string (date-time)  | 
	
		 结束还原的时间戳(UTC)。  | 
| sourceTable | 
			 string  | 
	
		 要从中还原数据的表。  | 
| startRestoreTime | 
			 string (date-time)  | 
	
		 从 (UTC) 开始还原的时间戳。  | 
ResultStatistics 
			
			搜索作业执行统计信息。
| 名称 | 类型 | 说明 | 
|---|---|---|
| ingestedRecords | 
			 integer (int32)  | 
	
		 搜索作业返回的行数。  | 
| progress | 
			 number multipleOf: 0.01 | 
	
		 搜索作业完成百分比。  | 
| scannedGb | 
			 number multipleOf: 0.01 | 
	
		 搜索作业:扫描的数据量。  | 
Schema
表的架构。
| 名称 | 类型 | 说明 | 
|---|---|---|
| categories | 
			 string[]  | 
	
		 表类别。  | 
| columns | 
			 Column[]  | 
	
		 表自定义列的列表。  | 
| description | 
			 string  | 
	
		 表说明。  | 
| displayName | 
			 string  | 
	
		 表显示名称。  | 
| labels | 
			 string[]  | 
	
		 表标签。  | 
| name | 
			 string  | 
	
		 表名。  | 
| solutions | 
			 string[]  | 
	
		 表所属的解决方案列表  | 
| source | 
		 表的创建者。  | 
|
| standardColumns | 
			 Column[]  | 
	
		 表标准列的列表。  | 
| tableSubType | 
		 子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。  | 
|
| tableType | 
		 表的创建者。  | 
SearchResults 
			
			启动此表的搜索作业的参数。
| 名称 | 类型 | 说明 | 
|---|---|---|
| azureAsyncOperationId | 
			 string  | 
	
		 搜索结果表异步作 ID。  | 
| description | 
			 string  | 
	
		 搜索作业说明。  | 
| endSearchTime | 
			 string (date-time)  | 
	
		 按 UTC 结束搜索的时间戳  | 
| limit | 
			 integer (int32)  | 
	
		 将搜索作业限制为最多返回指定行数。  | 
| query | 
			 string  | 
	
		 搜索作业查询。  | 
| sourceTable | 
			 string  | 
	
		 搜索作业中使用的表。  | 
| startSearchTime | 
			 string (date-time)  | 
	
		 从 (UTC) 开始搜索的时间戳  | 
SourceEnum 
			
			表的创建者。
| 值 | 说明 | 
|---|---|
| microsoft | 
		 由系统预配的表,通过诊断设置、代理或任何其他标准数据收集方式收集。  | 
| customer | 
		 由工作区所有者创建的表,并且仅在此工作区中找到。  | 
systemData 
			
			与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 | 
|---|---|---|
| createdAt | 
			 string (date-time)  | 
	
		 资源创建时间戳(UTC)。  | 
| createdBy | 
			 string  | 
	
		 创建资源的标识。  | 
| createdByType | 
		 创建资源的标识的类型。  | 
|
| lastModifiedAt | 
			 string (date-time)  | 
	
		 上次修改的资源时间戳(UTC)  | 
| lastModifiedBy | 
			 string  | 
	
		 上次修改资源的标识。  | 
| lastModifiedByType | 
		 上次修改资源的标识的类型。  | 
Table
工作区数据表定义。
| 名称 | 类型 | 说明 | 
|---|---|---|
| id | 
			 string  | 
	
		 资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}  | 
| name | 
			 string  | 
	
		 资源的名称  | 
| properties.archiveRetentionInDays | 
			 integer (int32)  | 
	
		 表数据存档保留期(以天为单位)。 计算结果为 (totalRetentionInDays-retentionInDays)  | 
| properties.lastPlanModifiedDate | 
			 string  | 
	
		 上次修改表计划的时间戳(UTC)。  | 
| properties.plan | 
		 指示系统如何处理和收费引入到此表的日志。  | 
|
| properties.provisioningState | 
		 表的当前预配状态。 如果设置为“updateing”,则表示由于正在进行的作而导致的资源锁,禁止对表进行任何更新,直到正在进行的作结束。  | 
|
| properties.restoredLogs | 
		 启动此表的还原作的参数。  | 
|
| properties.resultStatistics | 
		 搜索作业执行统计信息。  | 
|
| properties.retentionInDays | 
			 integer (int32) minimum: 4maximum: 730  | 
	
		 表保留期(以天为单位,介于 4 到 730 之间)。 将此属性设置为 -1 默认为工作区保留期。  | 
| properties.retentionInDaysAsDefault | 
			 boolean  | 
	
		 True - 值源自工作区保留天数,False - 特定于客户。  | 
| properties.schema | 
		 表架构。  | 
|
| properties.searchResults | 
		 启动此表的搜索作业的参数。  | 
|
| properties.totalRetentionInDays | 
			 integer (int32) minimum: 4maximum: 4383  | 
	
		 表总保留期(以天为单位,介于 4 到 4383 之间)。 将此属性设置为 -1 默认为表保留。  | 
| properties.totalRetentionInDaysAsDefault | 
			 boolean  | 
	
		 True - 值源自天数的保留期,False - 特定于客户。  | 
| systemData | 
		 与创建和上次修改资源相关的元数据。  | 
|
| type | 
			 string  | 
	
		 资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”  | 
TablePlanEnum  
			
			指示系统如何处理和收费引入到此表的日志。
| 值 | 说明 | 
|---|---|
| Basic | 
		 调整为支持高容量低值详细日志的日志。  | 
| Analytics | 
		 允许监视和分析的日志。  | 
TableSubTypeEnum   
			
			子类型描述了哪些 API 可用于与表交互,以及哪些功能可用于表。
| 值 | 说明 | 
|---|---|
| Any | 
		 创建内置表的默认子类型。  | 
| Classic | 
		 指示通过数据收集器 API 或 MMA 代理的自定义日志功能或为其创建自定义字段的任何表创建的表。  | 
| DataCollectionRuleBased | 
		 符合通过数据收集规则支持的任何手段将数据发送到其中的条件的表:数据收集终结点 API、引入时间转换或数据收集规则提供的任何其他机制  | 
TableTypeEnum  
			
			表的创建者。
| 值 | 说明 | 
|---|---|
| Microsoft | 
		 Azure Monitor 收集的标准数据。  | 
| CustomLog | 
		 自定义日志表。  | 
| RestoredLogs | 
		 还原的数据。  | 
| SearchResults | 
		 搜索作业收集的数据。  |