导入/导出
导出导入审计
登录后可跨设备保存划线和私人笔记登录
导出与导入审计
背景
针对导出和导入操作的新审计功能,同样提供了相应的 REST API,可用于以编程方式获取审计条目。
REST API
| 标题 | 集群复制审计 |
|---|---|
| 示例 | 见下文。 |
| URL | api/atlas/admin/expimp/audit |
| 方法 | GET |
| URL 参数 | sourceClusterName:源集群的名称。 |
| targetClusterName:目标集群的名称。 | |
| userName:发起该操作的用户名。 | |
| operation:EXPORT 或 IMPORT 操作类型。 | |
| startTime:操作开始的时间(毫秒)。 | |
| endTime:操作结束的时间(毫秒)。 | |
| limit:要返回的结果数量。 | |
| offset:偏移量。 | |
| 数据参数 | 无 |
| 成功响应 | ExportImportAuditEntry 列表 |
| 错误响应 | 以 AtlasBaseException 形式返回的错误 |
| 备注 | 无 |
CURL
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache"
http://localhost:port/api/atlas/admin/expimp/audit?sourceClusterName=cl2
响应
{
"queryType": "BASIC",
"searchParameters": {
"typeName": "ReplicationAuditEntry",
"excludeDeletedEntities": false,
"includeClassificationAttributes": false,
"includeSubTypes": true,
"includeSubClassifications": true,
"limit": 100,
"offset": 0,
"entityFilters": {
"attributeName": "name",
"operator": "eq",
"attributeValue": "cl2",
"criterion": []
}
},
"entities": [{
"typeName": "ReplicationAuditEntry",
"attributes": {
"owner": null,
"uniqueName": "cl2:EXPORT:1533037289411",
"createTime": null,
"name": "cl2",
"description": null
},
"guid": "04844141-af72-498a-9d26-f70f91e8adf8",
"status": "ACTIVE",
"displayText": "cl2",
"classificationNames": []
}, {
"typeName": "ReplicationAuditEntry",
"attributes": {
"owner": null,
"uniqueName": "cl2:EXPORT:1533037368407",
"createTime": null,
"name": "cl2",
"description": null
},
"guid": "837abe66-20c8-4296-8678-e715498bf8fb",
"status": "ACTIVE",
"displayText": "cl2",
"classificationNames": []
}]
}评论
登录后参与评论
正在加载评论…
KnowForge