导出事件 本节主要介绍如何使用API导出事件。 此操作用来导出HBlock事件信息。 请求语法 plaintext GET /rest/v1/system/event/file?numbernumebr&typetype HTTP/1.1 Date: date Host: ip:port Authorization: authorization 请求参数 参数 类型 描述 是否必须 number Integer 指定导出最近HBlock事件的个数。 说明 如果不指定,默认导出系统记录的所有HBlock事件,系统记录至少6个月的HBlock事件信息。 取值:[1, 10000]。 否 type String 指定事件的类型。 取值: user:用户事件。 system:系统事件。 默认值为user。 否 响应头 名称 类型 描述 ContentDisposition String 响应内容的显示形式。 TransferEncoding String 实体传输给用户的编码形式。 请求示例1 导出HBlock用户事件。 plaintext GET /rest/v1/system/event/file?number3 HTTP/1.1 Date: Mon, 21 Mar 2022 01:53:48 GMT Authorization: HBlock userName:signature Host:192.168.0.121:1443 响应示例1 plaintext HTTP/1.1 200 OK xhblockrequestid: 9fd643aa73bd4b60ab59a29e2904ab49 Connection: keepalive Date: Mon, 21 Mar 2022 01: 53: 48 GMT ContentDisposition: attachment;filenameevents20220321095348.csv TransferEncoding: chunked Server: HBlock eventId,eventTime,module,name,requestId,requesterIP,method,URL,body,statusCode,errorCode,errorMessage a38308307f8a40b2a7648ebfa6083f33, 20220321 09: 53: 28,LUN,ExpandLUN, 5929bcbd0cf54e7f8a50b41f8bdd549b, 111.198.231.68,PUT,http: //218.78.41.185:1443/rest/v1/block/lun/lunName1/expand,"{ ""capacity"": 200000 } ",400,LessThanCurrentCapacity,Value 200000 at 'capacity' failed to satisfy constraint: Argument must be greater than 200000. 79a4c7b35b5c46da9725f14237d462be, 20220321 09: 53: 21,LUN,SwitchLUN,a9be97449f434964960dbc8b48c05818, 111.198.231.68,PUT,http: //218.78.41.185:1443/rest/v1/block/lun/Lun1/switch,,200,, 9481763eda7143548a77bff1c2d3effd, 20220321 09: 53: 09,LUN,SetLUN, 9718a304ab1f4f03b9530ebeef3b51fc, 111.198.231.68,PUT,http: //218.78.41.185:1443/rest/v1/block/lun/Lun1,"{ ""config"": { ""writePolicy"": ""WriteThrough"" } } ",200,,